Sha256: f860700639d1ac4630744f647529b7cf1cad801be4613da3e70b9dddf68458bf

Contents?: true

Size: 961 Bytes

Versions: 4

Compression:

Stored size: 961 Bytes

Contents

require 'rake_factory'
require 'ruby_easy_rsa'

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

module RakeEasyRSA
  module Tasks
    module Client
      class Create < RakeFactory::Task
        include Mixins::GlobalParameters
        include Mixins::SSLParameters
        include Mixins::AlgorithmParameters
        include Mixins::EncryptKeyParameters

        default_name :create
        default_argument_names [:filename_base]
        default_description "Create a client certificate for the PKI"

        action do |t, args|
          puts "Creating client certificate '#{args.filename_base}'... "
          RubyEasyRSA.build_client_full(
              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/client/create.rb
rake_easy_rsa-0.2.0.pre.9 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.2.0.pre.8 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.2.0.pre.7 lib/rake_easy_rsa/tasks/client/create.rb