Helabs/jumpup-heroku — pull request #41 by maurogeorge (2014-03-24 15:56:00+00:00)
Title: Integrate feature branch

Add the ability the run `$ rake integrate` over a feature branch. With this all jump-heroku tasks are skiped unless you are in a branch that send content to heroku. Take a look when I run rake integrate on a feature branch.

```
mauro@optimus-prime:pro2you(mg-test-integrate)$ bundle exec rake integrate
--------------------------------------------------------------------------------
Executing jumpup:heroku:add_remote...
--> Skipping since you are in a feature branch [mg-test-integrate]
--------------------------------------------------------------------------------
Executing jumpup:heroku:check...
--> Skipping since you are in a feature branch [mg-test-integrate]
--------------------------------------------------------------------------------
Executing jumpup:heroku:lock...
--> Skipping since you are in a feature branch [mg-test-integrate]
--------------------------------------------------------------------------------
Executing jumpup:start...
git pull --rebase
Current branch mg-test-integrate is up to date.
--------------------------------------------------------------------------------
Executing jumpup:bundle_install...
bundle install --quiet
--------------------------------------------------------------------------------
Executing db:migrate...
--------------------------------------------------------------------------------
Executing spec...
/Users/mauro/.rvm/rubies/ruby-2.1.0/bin/ruby -S rspec ./spec/acceptance/dummy_spec.rb ./spec/controllers/answers_controller_spec.rb ./spec/controllers/application_controller_spec.rb ./spec/controllers/coachee_sessions_controller_spec.rb ./spec/controllers/dashboard_controller_spec.rb ./spec/controllers/pages_controller_spec.rb ./spec/controllers/payments_controller_spec.rb ./spec/controllers/preparatory_sessions_controller_spec.rb ./spec/controllers/sessions_controller_spec.rb ./spec/factories_spec.rb ./spec/models/answer_spec.rb ./spec/models/interaction_path_spec.rb ./spec/models/interaction_spec.rb ./spec/models/multiple_choice_spec.rb ./spec/models/preparatory_session_spec.rb ./spec/models/session_spec.rb ./spec/models/user/answer_by_area_spec.rb ./spec/models/user/pagseguro_url_spec.rb ./spec/models/user_spec.rb ./spec/presenters/dashboard_index_presenter_spec.rb ./spec/routing/answers_routing_spec.rb ./spec/routing/coachee_sessions_routing_spec.rb ./spec/routing/dashboard_routing_spec.rb ./spec/routing/pages_routing_spec.rb ./spec/routing/payments_routing_spec.rb ./spec/routing/preparatory_session_controller_spec.rb ./spec/routing/sessions_routing_spec.rb
..............................................................................................................................................................................................................................................................................................................................................

Finished in 13.36 seconds
334 examples, 0 failures

Randomized with seed 11729

Coverage report generated for RSpec to /Users/mauro/Desenvolvimento/web/pro2you/coverage. 324 / 324 LOC (100.0%) covered.
--------------------------------------------------------------------------------
Executing jumpup:coverage_verify...
ruby /Users/mauro/.rvm/gems/ruby-2.1.0@pro2you/bundler/gems/jumpup-c790d9a61710/test/coverage_test.rb
Run options:

# Running tests:

[1/1] CoverageTest#test_if_application_is_fully_covered
Congratulations! Your coverage is 100%!
Finished tests in 0.057906s, 17.2694 tests/s, 17.2694 assertions/s.
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin10.0]
--------------------------------------------------------------------------------
Executing jumpup:stats...
--> Generating .stats file
--> Commiting .stats file
[mg-test-integrate 0034f89] Update stats. 2014-03-24 15:41:31 UTC
1 files changed, 1 insertions(+), 1 deletions(-)
--------------------------------------------------------------------------------
Executing jumpup:finish...
git push
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 320 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To git@github.com:Helabs/pro2you.git
f5c6af3..0034f89 HEAD -> mg-test-integrate
--------------------------------------------------------------------------------
Executing jumpup:heroku:deploy...
--> Skipping since you are in a feature branch [mg-test-integrate]
--------------------------------------------------------------------------------
Executing jumpup:heroku:unlock...
--> Skipping since you are in a feature branch [mg-test-integrate]
```

This closes https://github.com/Helabs/jumpup/issues/24.

To follow the flow recommended on [guides to handle hotfix](https://github.com/Helabs/guides/blob/master/sections/branches.md).

We can config the branches like:

```ruby
Jumpup::Heroku.configure do |config|
config.staging_app = 'myapp-staging'
config.production_app = 'myapp'
config.staging_branch = 'staging'
config.production_branch = 'master'
end
```

By default the staging and production branchs are the master.

cc/ @fgrehm @mergulhao @TiuTalk @eduardofiorezi