Class: EcrDeploy::Config
- Inherits:
-
Object
- Object
- EcrDeploy::Config
- Defined in:
- lib/ecr_deploy/config.rb
Instance Method Summary collapse
- #base_config ⇒ Object
- #environments ⇒ Object
-
#initialize(path) ⇒ Config
constructor
A new instance of Config.
- #register_tasks(environment) ⇒ Object
- #run_tasks(environment) ⇒ Object
- #services(environment) ⇒ Object
Constructor Details
#initialize(path) ⇒ Config
Returns a new instance of Config.
4 5 6 |
# File 'lib/ecr_deploy/config.rb', line 4 def initialize(path) @config = YAML.load(IO.read(path)) end |
Instance Method Details
#base_config ⇒ Object
8 9 10 |
# File 'lib/ecr_deploy/config.rb', line 8 def base_config @config["base_config"] end |
#environments ⇒ Object
24 25 26 |
# File 'lib/ecr_deploy/config.rb', line 24 def environments @config.keys.reject { |e| e == "base_config" } end |
#register_tasks(environment) ⇒ Object
20 21 22 |
# File 'lib/ecr_deploy/config.rb', line 20 def register_tasks(environment) @config[environment]["register_tasks"] || [] end |
#run_tasks(environment) ⇒ Object
16 17 18 |
# File 'lib/ecr_deploy/config.rb', line 16 def run_tasks(environment) @config[environment]["run_tasks"] || [] end |
#services(environment) ⇒ Object
12 13 14 |
# File 'lib/ecr_deploy/config.rb', line 12 def services(environment) @config[environment]["services"] || [] end |