Class: RailsPushAndMigrate::Heroku

Inherits:
Base
  • Object
show all
Defined in:
lib/rails-push-and-migrate/heroku.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#branch

Instance Method Summary collapse

Methods inherited from Base

#assets_changed?, #diff_files, #git_push_cmd, #has_migration?, #print_and_execute, #print_and_execute!, #remote_branch, #run, #with_named_repo

Constructor Details

#initialize(app, branch) ⇒ Heroku

Returns a new instance of Heroku.



6
7
8
9
# File 'lib/rails-push-and-migrate/heroku.rb', line 6

def initialize(app, branch)
  @branch = branch
  @app = app
end

Instance Attribute Details

#appObject

Returns the value of attribute app.



5
6
7
# File 'lib/rails-push-and-migrate/heroku.rb', line 5

def app
  @app
end

Instance Method Details

#migrate_cmdObject



15
16
17
# File 'lib/rails-push-and-migrate/heroku.rb', line 15

def migrate_cmd
  "heroku run rake db:migrate -a #{app}"
end

#remoteObject



11
12
13
# File 'lib/rails-push-and-migrate/heroku.rb', line 11

def remote
  "https://git.heroku.com/#{app}.git"
end