Sha256: 9cb5a78a3ce92adc43a4637da58da0085f18fead5d1679fb20265018e3359925

Contents?: true

Size: 1.05 KB

Versions: 12

Compression:

Stored size: 1.05 KB

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'
require_relative '../../mixins/easy_rsa_ensure_prerequisite'

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

        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

12 entries across 12 versions & 1 rubygems

Version Path
rake_easy_rsa-0.10.0.pre.3 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.10.0.pre.2 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.10.0.pre.1 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.9.0 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.8.0.pre.1 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.7.0 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.6.0.pre.2 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.6.0.pre.1 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.5.0 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.4.0.pre.1 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.3.0 lib/rake_easy_rsa/tasks/client/create.rb
rake_easy_rsa-0.2.0.pre.11 lib/rake_easy_rsa/tasks/client/create.rb