Class: HerokuDeployer

Inherits:
Object
  • Object
show all
Defined in:
lib/heroku_deployer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#appObject (readonly)

Returns the value of attribute app.



3
4
5
# File 'lib/heroku_deployer.rb', line 3

def app
  @app
end

Instance Method Details

#deployObject



13
14
15
# File 'lib/heroku_deployer.rb', line 13

def deploy
  push; restart; tag;
end

#migrationsObject



9
10
11
# File 'lib/heroku_deployer.rb', line 9

def migrations
  push; turn_app_off; migrate; restart; turn_app_on; tag;
end

#rollbackObject



17
18
19
# File 'lib/heroku_deployer.rb', line 17

def rollback
  turn_app_off; push_previous; restart; turn_app_on;
end