Class: HerokuDeployer
- Inherits:
-
Object
- Object
- HerokuDeployer
- Defined in:
- lib/heroku_deployer.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
- #deploy ⇒ Object
-
#initialize(app) ⇒ HerokuDeployer
constructor
A new instance of HerokuDeployer.
- #migrations ⇒ Object
- #rollback ⇒ Object
Constructor Details
#initialize(app) ⇒ HerokuDeployer
Returns a new instance of HerokuDeployer.
4 5 6 7 |
# File 'lib/heroku_deployer.rb', line 4 def initialize(app) @app = app raise "No app flag configured!" unless @app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
3 4 5 |
# File 'lib/heroku_deployer.rb', line 3 def app @app end |
Instance Method Details
#deploy ⇒ Object
13 14 15 |
# File 'lib/heroku_deployer.rb', line 13 def deploy push; restart; tag; end |
#migrations ⇒ Object
9 10 11 |
# File 'lib/heroku_deployer.rb', line 9 def migrations push; turn_app_off; migrate; restart; turn_app_on; tag; end |
#rollback ⇒ Object
17 18 19 |
# File 'lib/heroku_deployer.rb', line 17 def rollback turn_app_off; push_previous; restart; turn_app_on; end |