Jumpup-heroku

RubyGems Code Climate Dependency Status Build Status

Rake tasks to deploy any Rails application on Heroku using Jumpup.

Instalation

Add to your gem file.

gem 'jumpup-heroku'

Without groups on Gemfile, because of initializer.

Usage

  1. Create the initializer on config/initializers/jumpup-heroku.rb
  # config/initializers/jumpup-heroku.rb
  Jumpup::Heroku.configure do |config|
    config.app = 'myapp'
  end if Rails.env.development?
  1. Add to the tasks on jumpup.rake the tasks to deploy on Heroku:
  # lib/tasks/jumpup.rake

  INTEGRATION_TASKS = %w(
    jumpup:heroku:start
    jumpup:start
    jumpup:bundle_install
    db:migrate
    spec
    jumpup:heroku:finish
    jumpup:finish
  )

Production and staging apps

Have production and staging app? Do like this:

Jumpup::Heroku.configure do |config|
  config.staging_app = 'myapp-staging'
  config.production_app = 'myapp'
end if Rails.env.development?

The branch send to staging app is master and the branch send to production is the production.

Using heroku accounts

If you use Heroku Accounts

# config/initializers/jumpup-heroku.rb
Jumpup::Heroku.configure do |config|

  config.(:name_of_account1) do |account1|
    account1.app = 'myapp1'
  end

  config.(:name_of_account2) do |account2|
    account2.app = 'myapp2'
    account2.run_database_tasks = false # Default: true
  end
end if Rails.env.development?

Database tasks

If you need to disable remote database tasks (backup, migrate and seed):

Jumpup::Heroku.configure do |config|
config.app = 'myapp'
config.run_database_tasks = false # Default: true
end if Rails.env.development?

Deploy to production

When I have a single app

Run rake jumpup:heroku:deploy:production or as an alias rake integrate:production

When I have staging and production apps

We have the following config

Branch App Environment
master staging
production production

So to send to production we need to

$ git checkout production
$ git merge master
$ git push -u origin production

And send to Heroku with rake jumpup:heroku:deploy:production or as an alias rake integrate:production

Need to skip spec on integrate to production?

Set the environment variable SKIP_SPEC=1 before integrating to production.

SKIP_SPEC=1 rake integrate:production

Versioning

Jumpup-heroku follow the Semantic Versioning.

Issues

If you have problems, please create a Github Issue.

Contributing

Please see CONTRIBUTING.md for details.

Maintainers

Release

Follow this steps to release a new version of the gem.

  1. Test if everything is running ok;
  2. Change version of the gem on VERSION constant;
  3. Add the release date on the CHANGELOG;
  4. Do a commit "Bump version x.x.x", follow the semantic version;
  5. Run $ rake release, this will send the gem to the rubygems;
  6. Check if the gem is on the rubygems and the tags are correct on the github;

Credits

Jumpup-heroku is maintained and funded by HE:labs. Thank you to all the contributors.

License

Jumpup-heroku is Copyright © 2013-2014 HE:labs. It is free software, and may be redistributed under the terms specified in the LICENSE file.

Made with love by HE:labs

HE:labs

This gem was created and is maintained by HE:labs.