Sha256: 4ce76632bfac75d57e7b2693e06fdd70f5d704226c0007bd66e02ab063cefb7f

Contents?: true

Size: 737 Bytes

Versions: 1

Compression:

Stored size: 737 Bytes

Contents

require 'rake_factory'
require 'ruby_easy_rsa'

require_relative '../mixins/global_parameters'
require_relative '../mixins/ssl_parameters'

module RakeEasyRSA
  module Tasks
    module Certificate
      class Revoke < RakeFactory::Task
        include Mixins::GlobalParameters
        include Mixins::SSLParameters

        default_name :revoke
        default_argument_names [:filename_base]
        default_description "Revoke a certificate of the PKI"

        action do |t, args|
          puts "Revoking certificate '#{args.filename_base}'... "
          RubyEasyRSA.revoke(
              t.parameter_values.merge(
                  filename_base: args.filename_base))
          puts "Done."
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rake_easy_rsa-0.2.0.pre.6 lib/rake_easy_rsa/tasks/certificate/revoke.rb