Sha256: df6b2e3f2fc552efc791cc417e3d4d007841c2b769a44fd1ca444f975a14f18c

Contents?: true

Size: 644 Bytes

Versions: 8

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true

module RubyEasyRSA
  module Commands
    module Mixins
      module SubCAConfig
        # rubocop:disable Style/RedundantAssignment
        def configure_command(builder, opts)
          builder = super(builder, opts)
          builder = with_sub_ca_length(builder, opts[:sub_ca_length])
          builder
        end
        # rubocop:enable Style/RedundantAssignment

        private

        def with_sub_ca_length(builder, sub_ca_length)
          return builder unless sub_ca_length

          builder.with_option(
            '--subca-len', sub_ca_length
          )
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_easy_rsa-0.12.0.pre.4 lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb
ruby_easy_rsa-0.12.0.pre.3 lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb
ruby_easy_rsa-0.12.0.pre.2 lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb
ruby_easy_rsa-0.12.0.pre.1 lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb
ruby_easy_rsa-0.11.0 lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb
ruby_easy_rsa-0.10.0.pre.10 lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb
ruby_easy_rsa-0.10.0.pre.9 lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb
ruby_easy_rsa-0.10.0.pre.8 lib/ruby_easy_rsa/commands/mixins/sub_ca_config.rb