Sha256: 1343540807d416803ea98505e69963249cf38b01e3a74364f42aad6bc6f69b00

Contents?: true

Size: 643 Bytes

Versions: 8

Compression:

Stored size: 643 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:,
            force:,
            all:
          )
          puts('Locked.')
        rescue RubyGitCrypt::Errors::ExecutionError
          puts('Already locked.')
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rake_git_crypt-0.3.0.pre.2 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.3.0.pre.1 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.2.0 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.34 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.33 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.32 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.31 lib/rake_git_crypt/tasks/lock.rb
rake_git_crypt-0.1.0.pre.30 lib/rake_git_crypt/tasks/lock.rb