Sha256: 6b507815d89d90d5d1aef3ce0ee7399b8cc6651c745ea8090110b3e942b4d976

Contents?: true

Size: 662 Bytes

Versions: 10

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

require 'rake_factory'
require 'ruby_git_crypt'

module RakeGitCrypt
  module Tasks
    class Lock < RakeFactory::Task
      default_name :lock
      default_description 'Lock git-crypt.'

      parameter :key_name
      parameter :force, default: false
      parameter :all, default: false

      action do
        puts('Locking git-crypt...')
        begin
          RubyGitCrypt.lock(
            key_name: key_name,
            force: force,
            all: all
          )
          puts('Locked.')
        rescue RubyGitCrypt::Errors::ExecutionError
          puts('Already locked.')
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rake_git_crypt-0.1.0.pre.29 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.28 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.27 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.26 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.25 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.24 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.23 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.22 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.21 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.20 lib/rake_git_crypt/tasks/lock.rb