Class: Kamal::Lint::Context
- Inherits:
-
Struct
- Object
- Struct
- Kamal::Lint::Context
- Defined in:
- lib/kamal/lint/loader.rb
Overview
Holds all the data a check needs to inspect a single Kamal config.
Instance Attribute Summary collapse
-
#base_parsed ⇒ Object
Returns the value of attribute base_parsed.
-
#config_file ⇒ Object
Returns the value of attribute config_file.
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#destination_secrets_path ⇒ Object
Returns the value of attribute destination_secrets_path.
-
#gitignore_path ⇒ Object
Returns the value of attribute gitignore_path.
-
#include_kamal_errors ⇒ Object
Returns the value of attribute include_kamal_errors.
-
#kamal_load_error ⇒ Object
Returns the value of attribute kamal_load_error.
-
#kamal_loaded ⇒ Object
Returns the value of attribute kamal_loaded.
-
#kamal_version ⇒ Object
Returns the value of attribute kamal_version.
-
#line_index ⇒ Object
Returns the value of attribute line_index.
-
#override_parsed ⇒ Object
Returns the value of attribute override_parsed.
-
#parsed ⇒ Object
Returns the value of attribute parsed.
-
#secrets ⇒ Object
Returns the value of attribute secrets.
-
#secrets_path ⇒ Object
Returns the value of attribute secrets_path.
-
#working_dir ⇒ Object
Returns the value of attribute working_dir.
Instance Method Summary collapse
Instance Attribute Details
#base_parsed ⇒ Object
Returns the value of attribute base_parsed
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def base_parsed @base_parsed end |
#config_file ⇒ Object
Returns the value of attribute config_file
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def config_file @config_file end |
#destination ⇒ Object
Returns the value of attribute destination
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def destination @destination end |
#destination_secrets_path ⇒ Object
Returns the value of attribute destination_secrets_path
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def destination_secrets_path @destination_secrets_path end |
#gitignore_path ⇒ Object
Returns the value of attribute gitignore_path
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def gitignore_path @gitignore_path end |
#include_kamal_errors ⇒ Object
Returns the value of attribute include_kamal_errors
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def include_kamal_errors @include_kamal_errors end |
#kamal_load_error ⇒ Object
Returns the value of attribute kamal_load_error
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def kamal_load_error @kamal_load_error end |
#kamal_loaded ⇒ Object
Returns the value of attribute kamal_loaded
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def kamal_loaded @kamal_loaded end |
#kamal_version ⇒ Object
Returns the value of attribute kamal_version
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def kamal_version @kamal_version end |
#line_index ⇒ Object
Returns the value of attribute line_index
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def line_index @line_index end |
#override_parsed ⇒ Object
Returns the value of attribute override_parsed
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def override_parsed @override_parsed end |
#parsed ⇒ Object
Returns the value of attribute parsed
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def parsed @parsed end |
#secrets ⇒ Object
Returns the value of attribute secrets
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def secrets @secrets end |
#secrets_path ⇒ Object
Returns the value of attribute secrets_path
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def secrets_path @secrets_path end |
#working_dir ⇒ Object
Returns the value of attribute working_dir
10 11 12 |
# File 'lib/kamal/lint/loader.rb', line 10 def working_dir @working_dir end |
Instance Method Details
#file_for_finding ⇒ Object
28 29 30 31 32 33 |
# File 'lib/kamal/lint/loader.rb', line 28 def file_for_finding return config_file unless destination override_path = override_file File.exist?(override_path) ? override_path : config_file end |
#line_for(path) ⇒ Object
39 40 41 |
# File 'lib/kamal/lint/loader.rb', line 39 def line_for(path) line_index[Array(path).join(".")] end |
#override_file ⇒ Object
35 36 37 |
# File 'lib/kamal/lint/loader.rb', line 35 def override_file File.join(File.dirname(config_file), "deploy.#{destination}.yml") end |