Class: SimpleDeploy::Configuration::Config
- Inherits:
-
Object
- Object
- SimpleDeploy::Configuration::Config
- Defined in:
- lib/simple_deploy/configuration.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#notifications ⇒ Object
readonly
Returns the value of attribute notifications.
Instance Method Summary collapse
- #access_key ⇒ Object
- #artifact_cloud_formation_url(artifact) ⇒ Object
- #artifact_deploy_variable(artifact) ⇒ Object
- #artifacts ⇒ Object
- #deploy_script ⇒ Object
-
#initialize(environment, notifications) ⇒ Config
constructor
A new instance of Config.
- #region ⇒ Object
- #secret_key ⇒ Object
Constructor Details
#initialize(environment, notifications) ⇒ Config
Returns a new instance of Config.
48 49 50 51 52 53 |
# File 'lib/simple_deploy/configuration.rb', line 48 def initialize(environment, notifications) raise ArgumentError.new("environment must be defined") unless environment @environment = environment @notifications = notifications end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
46 47 48 |
# File 'lib/simple_deploy/configuration.rb', line 46 def environment @environment end |
#notifications ⇒ Object (readonly)
Returns the value of attribute notifications.
46 47 48 |
# File 'lib/simple_deploy/configuration.rb', line 46 def notifications @notifications end |
Instance Method Details
#access_key ⇒ Object
77 78 79 |
# File 'lib/simple_deploy/configuration.rb', line 77 def access_key @environment['access_key'] end |
#artifact_cloud_formation_url(artifact) ⇒ Object
66 67 68 69 70 71 |
# File 'lib/simple_deploy/configuration.rb', line 66 def artifact_cloud_formation_url(artifact) name_to_url_map = { 'chef_repo' => 'ChefRepoURL', 'app' => 'AppArtifactURL', 'cookbooks' => 'CookbooksURL' } name_to_url_map[artifact] end |
#artifact_deploy_variable(artifact) ⇒ Object
59 60 61 62 63 64 |
# File 'lib/simple_deploy/configuration.rb', line 59 def artifact_deploy_variable(artifact) name_to_variable_map = { 'chef_repo' => 'CHEF_REPO_URL', 'app' => 'APP_URL', 'cookbooks' => 'COOKBOOKS_URL' } name_to_variable_map[artifact] end |
#artifacts ⇒ Object
55 56 57 |
# File 'lib/simple_deploy/configuration.rb', line 55 def artifacts ['chef_repo', 'cookbooks', 'app'] end |
#deploy_script ⇒ Object
73 74 75 |
# File 'lib/simple_deploy/configuration.rb', line 73 def deploy_script '/opt/intu/admin/bin/configure.sh' end |
#region ⇒ Object
85 86 87 |
# File 'lib/simple_deploy/configuration.rb', line 85 def region @environment['region'] end |
#secret_key ⇒ Object
81 82 83 |
# File 'lib/simple_deploy/configuration.rb', line 81 def secret_key @environment['secret_key'] end |