Class: Jumpup::Deis::Configuration
- Inherits:
-
Object
- Object
- Jumpup::Deis::Configuration
- Defined in:
- lib/jumpup/deis/configuration.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#host ⇒ Object
Returns the value of attribute host.
-
#production_app ⇒ Object
Returns the value of attribute production_app.
-
#run_database_tasks ⇒ Object
Returns the value of attribute run_database_tasks.
-
#staging_app ⇒ Object
Returns the value of attribute staging_app.
Instance Method Summary collapse
- #deploy_branch ⇒ Object
- #deploy_to_production_branch ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 |
# File 'lib/jumpup/deis/configuration.rb', line 17 def initialize @run_database_tasks ||= true end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
15 16 17 |
# File 'lib/jumpup/deis/configuration.rb', line 15 def app @app end |
#host ⇒ Object
Returns the value of attribute host.
15 16 17 |
# File 'lib/jumpup/deis/configuration.rb', line 15 def host @host end |
#production_app ⇒ Object
Returns the value of attribute production_app.
15 16 17 |
# File 'lib/jumpup/deis/configuration.rb', line 15 def production_app @production_app end |
#run_database_tasks ⇒ Object
Returns the value of attribute run_database_tasks.
15 16 17 |
# File 'lib/jumpup/deis/configuration.rb', line 15 def run_database_tasks @run_database_tasks end |
#staging_app ⇒ Object
Returns the value of attribute staging_app.
15 16 17 |
# File 'lib/jumpup/deis/configuration.rb', line 15 def staging_app @staging_app end |
Instance Method Details
#deploy_branch ⇒ Object
27 28 29 |
# File 'lib/jumpup/deis/configuration.rb', line 27 def deploy_branch 'master' end |
#deploy_to_production_branch ⇒ Object
31 32 33 34 |
# File 'lib/jumpup/deis/configuration.rb', line 31 def deploy_to_production_branch return 'production' if production_app 'master' end |
#valid? ⇒ Boolean
21 22 23 24 25 |
# File 'lib/jumpup/deis/configuration.rb', line 21 def valid? host_is_set? && boolean_run_database_tasks? && (only_app? || only_production_and_staging_apps?) end |