Sha256: c268662c313e8307a7984e227ca04a5504edfaa21284c30e193ec7a916aa6be7

Contents?: true

Size: 910 Bytes

Versions: 14

Compression:

Stored size: 910 Bytes

Contents

# frozen_string_literal: true

require 'rake_factory'
require 'ruby_easy_rsa'

module RakeEasyRSA
  module Tasks
    class Generate < RakeFactory::Task
      default_name :generate
      default_description 'Generate all pre-requisites for managing the PKI'

      parameter :initialise_task_name, default: 'initialise'
      parameter :ca_create_task_name, default: 'ca:create'
      parameter :crl_generate_task_name, default: 'crl:generate'
      parameter :dh_generate_task_name, default: 'dh:generate'

      action do |t, args|
        puts 'Generating PKI pre-requisites... '
        t.application[t.initialise_task_name, t.scope].invoke(*args)
        t.application[t.ca_create_task_name, t.scope].invoke(*args)
        t.application[t.crl_generate_task_name, t.scope].invoke(*args)
        t.application[t.dh_generate_task_name, t.scope].invoke(*args)
        puts 'Done.'
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rake_easy_rsa-0.16.0.pre.2 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.16.0.pre.1 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.15.0 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.14.0.pre.7 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.14.0.pre.6 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.14.0.pre.5 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.14.0.pre.4 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.14.0.pre.3 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.14.0.pre.2 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.14.0.pre.1 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.13.0 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.12.0.pre.4 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.12.0.pre.3 lib/rake_easy_rsa/tasks/generate.rb
rake_easy_rsa-0.12.0.pre.2 lib/rake_easy_rsa/tasks/generate.rb