Class: RailsPushAndMigrate::Heroku
- Defined in:
- lib/rails-push-and-migrate/heroku.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(app, branch) ⇒ Heroku
constructor
A new instance of Heroku.
- #migrate_cmd ⇒ Object
- #remote ⇒ Object
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
#app ⇒ Object
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_cmd ⇒ Object
15 16 17 |
# File 'lib/rails-push-and-migrate/heroku.rb', line 15 def migrate_cmd "heroku run rake db:migrate -a #{app}" end |
#remote ⇒ Object
11 12 13 |
# File 'lib/rails-push-and-migrate/heroku.rb', line 11 def remote "https://git.heroku.com/#{app}.git" end |