Class: Rhelm::Subcommand::Lint
- Defined in:
- lib/rhelm/subcommand/lint.rb
Overview
Helm lint subcommand: ‘helm lint PATH [flags]`. docs: helm.sh/docs/helm/helm_lint/
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#set ⇒ Object
readonly
Returns the value of attribute set.
-
#set_file ⇒ Object
readonly
Returns the value of attribute set_file.
-
#set_string ⇒ Object
readonly
Returns the value of attribute set_string.
-
#strict ⇒ Object
readonly
Returns the value of attribute strict.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
-
#with_subcharts ⇒ Object
readonly
Returns the value of attribute with_subcharts.
Attributes inherited from Base
#client, #debug, #kube_apiserver, #kube_as_group, #kube_as_user, #kube_context, #kube_token, #kubeconfig, #namespace, #registry_config, #repository_cache, #repository_config
Instance Method Summary collapse
- #cli_args ⇒ Object
-
#initialize(path, options = {}) ⇒ Lint
constructor
A new instance of Lint.
- #subcommand_name ⇒ Object
Methods inherited from Base
#args, #full_cli_call, #report_failure, #run
Constructor Details
#initialize(path, options = {}) ⇒ Lint
Returns a new instance of Lint.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rhelm/subcommand/lint.rb', line 16 def initialize(path, = {}) super() @path = path @set = [:set] @set_file = [:set_file] @set_string = [:set_string] @strict = [:strict] @values = [:values] @with_subcharts = [:with_subcharts] end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/rhelm/subcommand/lint.rb', line 8 def path @path end |
#set ⇒ Object (readonly)
Returns the value of attribute set.
8 9 10 |
# File 'lib/rhelm/subcommand/lint.rb', line 8 def set @set end |
#set_file ⇒ Object (readonly)
Returns the value of attribute set_file.
8 9 10 |
# File 'lib/rhelm/subcommand/lint.rb', line 8 def set_file @set_file end |
#set_string ⇒ Object (readonly)
Returns the value of attribute set_string.
8 9 10 |
# File 'lib/rhelm/subcommand/lint.rb', line 8 def set_string @set_string end |
#strict ⇒ Object (readonly)
Returns the value of attribute strict.
8 9 10 |
# File 'lib/rhelm/subcommand/lint.rb', line 8 def strict @strict end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
8 9 10 |
# File 'lib/rhelm/subcommand/lint.rb', line 8 def values @values end |
#with_subcharts ⇒ Object (readonly)
Returns the value of attribute with_subcharts.
8 9 10 |
# File 'lib/rhelm/subcommand/lint.rb', line 8 def with_subcharts @with_subcharts end |
Instance Method Details
#cli_args ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/rhelm/subcommand/lint.rb', line 32 def cli_args super.tap do |args| if set && !set.empty? case set when Hash args << set.map { |key, value| ['--set', "#{key}=#{value}" ] }.flatten else args << ['--set', set] end end if set_file && !set_file.empty? case set_file when Hash args << set_file.map { |key, value| ['--set-file', "#{key}=#{value}" ] }.flatten else args << ['--set-file', set_file] end end if set_string && !set_string.empty? case set_string when Hash args << set_string.map { |key, value| ['--set-string', "#{key}=#{value}" ] }.flatten else args << ['--set-string', set_string] end end if values && !values.empty? case values when Array args << values.map { |values_file| ['--values', values_file ] }.flatten else args << ['--values', values] end end args << '--with-subcharts' if with_subcharts args << '--strict' if strict args << path end.flatten end |
#subcommand_name ⇒ Object
28 29 30 |
# File 'lib/rhelm/subcommand/lint.rb', line 28 def subcommand_name 'lint' end |