class Rhelm::Subcommand::Dependency

Helm dependency subcommand: `helm dependency COMMAND CHART [flags]`. docs: helm.sh/docs/helm/helm_dependency/

Constants

COMMANDS

Attributes

chart[R]
command[R]
help[R]
keyring[R]
skip_refresh[R]
verify[R]

Public Class Methods

new(command, chart, options = {}) click to toggle source
Calls superclass method Rhelm::Subcommand::Base::new
# File lib/rhelm/subcommand/dependency.rb, line 17
def initialize(command, chart, options = {})
  super(options)

  @command = command.to_s
  unless COMMANDS.include?(command)
    raise(OptionError, "Invalid command #{command}. Valid values are: #{COMMANDS.join(', ')}")
  end

  @chart = chart
  @help = !!options[:help]
  @keyring = options[:keyring]
  @skip_refresh = !!options[:skip_refresh]
  @verify = !!options[:verify]
end

Public Instance Methods

cli_args() click to toggle source
Calls superclass method Rhelm::Subcommand::Base#cli_args
# File lib/rhelm/subcommand/dependency.rb, line 36
def cli_args
  super.tap do |args|
    args << '--help' if help
    args << ['--keyring', keyring] if keyring
    args << '--skip-refresh' if skip_refresh
    args << '--verify' if verify

    args << command
    args << chart
  end.flatten
end
subcommand_name() click to toggle source
# File lib/rhelm/subcommand/dependency.rb, line 32
def subcommand_name
  "dependency"
end