Sha256: 240016ed597faa56c6a5c5f880884ca5d76d25cb5e5d8b7576b0fbb9651b6ce4

Contents?: true

Size: 746 Bytes

Versions: 11

Compression:

Stored size: 746 Bytes

Contents

# frozen_string_literal: true

# Specify the client certificate for connecting to PuppetDB. This must be specified along with
# --puppetdb-ssl-client-key in order to work.
# @param parser [OptionParser object] The OptionParser argument
# @param options [Hash] Options hash being constructed; this is modified in this method.
OctocatalogDiff::Cli::Options::Option.newoption(:puppetdb_ssl_client_cert) do
  has_weight 310

  def parse(parser, options)
    parser.on('--puppetdb-ssl-client-cert FILENAME', 'SSL client certificate to connect to PuppetDB') do |x|
      raise Errno::ENOENT, "--puppetdb-ssl-client-cert #{x} does not point to a valid file" unless File.file?(x)
      options[:puppetdb_ssl_client_cert] = File.read(x)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
octocatalog-diff-1.5.0 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.4.1 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.4.0 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.3.0 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.2.0 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.1.0 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.0.4 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.0.3 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.0.2 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.0.1 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
octocatalog-diff-1.0.0 lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb