Class: Heploy::Configuration
- Inherits:
-
Object
- Object
- Heploy::Configuration
- Defined in:
- lib/heploy/configuration.rb
Instance Attribute Summary collapse
-
#development_branch ⇒ Object
Returns the value of attribute development_branch.
-
#heroku_api_key ⇒ Object
Returns the value of attribute heroku_api_key.
-
#production_app_name ⇒ Object
Returns the value of attribute production_app_name.
-
#production_branch ⇒ Object
Returns the value of attribute production_branch.
-
#staging_app_name ⇒ Object
Returns the value of attribute staging_app_name.
-
#staging_branch ⇒ Object
Returns the value of attribute staging_branch.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 22 23 |
# File 'lib/heploy/configuration.rb', line 19 def initialize @development_branch = "dev" @staging_branch = "staging" @production_branch = "production" end |
Instance Attribute Details
#development_branch ⇒ Object
Returns the value of attribute development_branch.
4 5 6 |
# File 'lib/heploy/configuration.rb', line 4 def development_branch @development_branch end |
#heroku_api_key ⇒ Object
Returns the value of attribute heroku_api_key.
4 5 6 |
# File 'lib/heploy/configuration.rb', line 4 def heroku_api_key @heroku_api_key end |
#production_app_name ⇒ Object
Returns the value of attribute production_app_name.
4 5 6 |
# File 'lib/heploy/configuration.rb', line 4 def production_app_name @production_app_name end |
#production_branch ⇒ Object
Returns the value of attribute production_branch.
4 5 6 |
# File 'lib/heploy/configuration.rb', line 4 def production_branch @production_branch end |
#staging_app_name ⇒ Object
Returns the value of attribute staging_app_name.
4 5 6 |
# File 'lib/heploy/configuration.rb', line 4 def staging_app_name @staging_app_name end |
#staging_branch ⇒ Object
Returns the value of attribute staging_branch.
4 5 6 |
# File 'lib/heploy/configuration.rb', line 4 def staging_branch @staging_branch end |
Class Method Details
.find ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/heploy/configuration.rb', line 11 def self.find load Dir["config/heploy.rb"].first Heploy.configuration rescue TypeError puts "Error: You don't have a configuration file." exit end |