Sha256: e5c5aa0bda0c89ca26f74fed759bacec4e083e9c0a4c126d72d568107fb3b814

Contents?: true

Size: 1.59 KB

Versions: 17

Compression:

Stored size: 1.59 KB

Contents

module RubyEasyRSA
  module Commands
    module Mixins
      module GlobalConfig
        def configure_command(builder, opts)
          extensions_directory = opts[:extensions_directory]
          openssl_binary = opts[:openssl_binary]
          ssl_configuration = opts[:ssl_configuration]
          safe_configuration = opts[:safe_configuration]
          vars = opts[:vars]
          batch = opts[:batch]
          pki_directory = opts[:pki_directory]
          input_password = opts[:input_password]
          output_password = opts[:output_password]

          builder = super(builder, opts)
          builder = builder.with_environment_variable(
              'EASYRSA_OPENSSL', openssl_binary) if openssl_binary
          builder = builder.with_environment_variable(
              'EASYRSA_EXT_DIR', extensions_directory) if extensions_directory
          builder = builder.with_environment_variable(
              'EASYRSA_SSL_CONF', ssl_configuration) if ssl_configuration
          builder = builder.with_environment_variable(
              'EASYRSA_SAFE_CONF', safe_configuration) if safe_configuration
          builder = builder.with_option(
              '--vars', vars) if vars
          builder = builder.with_flag(
              '--batch') if batch
          builder = builder.with_option(
              '--pki-dir', pki_directory) if pki_directory
          builder = builder.with_option(
              '--passin', input_password) if input_password
          builder = builder.with_option(
              '--passout', output_password) if output_password
          builder
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ruby_easy_rsa-0.10.0.pre.7 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.10.0.pre.6 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.10.0.pre.5 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.10.0.pre.4 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.10.0.pre.3 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.10.0.pre.2 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.10.0.pre.1 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.9.0 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.8.0.pre.1 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.7.0 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.6.0.pre.2 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.6.0.pre.1 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.5.0 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.4.0.pre.1 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.3.0 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.2.0.pre.11 lib/ruby_easy_rsa/commands/mixins/global_config.rb
ruby_easy_rsa-0.2.0.pre.10 lib/ruby_easy_rsa/commands/mixins/global_config.rb