Sha256: d1fceeaaf7be9c2b9dbd5e087366b49a9231b672027eba821522cd1a6473f59e

Contents?: true

Size: 839 Bytes

Versions: 4

Compression:

Stored size: 839 Bytes

Contents

require 'rake_factory'
require 'ruby_easy_rsa'

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

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

        default_name :renew
        default_argument_names [:filename_base]
        default_description "Renew a certificate of the PKI"

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rake_easy_rsa-0.2.0.pre.10 lib/rake_easy_rsa/tasks/certificate/renew.rb
rake_easy_rsa-0.2.0.pre.9 lib/rake_easy_rsa/tasks/certificate/renew.rb
rake_easy_rsa-0.2.0.pre.8 lib/rake_easy_rsa/tasks/certificate/renew.rb
rake_easy_rsa-0.2.0.pre.7 lib/rake_easy_rsa/tasks/certificate/renew.rb