Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Helpful stuffs for Heroku.

This branch is 144 commits behind fastestforward:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
autotest
examples
features
lib
spec
.gitignore
.rvmrc
.travis.yml
CHANGELOG.md
Gemfile
LICENSE
README.rdoc
Rakefile
cucumber.yml
heroku_san.gemspec

README.rdoc

Heroku San

Helpful rake tasks for Heroku.

Build Status

Install

Rails 3

Add this to your Gemfile:

group :development do
  gem 'heroku_san'
end

Rails 2

To install add the following to config/environment.rb:

config.gem 'heroku_san'

Rake tasks are not automatically loaded from gems, so you’ll need to add the following to your Rakefile:

begin
  require 'heroku_san/tasks'
rescue LoadError
  STDERR.puts "Run `rake gems:install` to install heroku_san"
end

Configure

In config/heroku.yml you will need to add the Heroku apps that you would like to attach to this project. You can generate this file by running:

rake heroku:create_config

Customize the file for your project. If this is a fresh project, heroku_san can create all the applications for you, and set each one's RACK_ENV.

rake all heroku:create heroku:rack_env

Configure your Heroku apps according to config/heroku.yml by running:

rake all heroku:config

Usage

After configuring your Heroku apps you can use rake tasks to control the apps.

rake production deploy

A rake task with the shorthand name of each app is now available and adds that server to the list that subsequent commands will execute on. Because this list is additive, you can easily select which servers to run a command on.

rake demo staging restart

A special rake task 'all' is created that causes any further commands to execute on all heroku apps.

Manipulate collaborators on all this project's apps (prompts for email address):

rake all heroku:share
rake all heroku:unshare

Need to add remotes for each app?

rake all heroku:remotes

A full list of tasks provided:

rake heroku:apps                  # Lists configured apps
rake heroku:apps:local            # Lists configured apps without hitting heroku
rake heroku:config                # Add config:vars to each application.
rake heroku:config:list           # Lists config variables as set on Heroku
rake heroku:config:list:local     # Lists local config variables without setting them
rake heroku:config:rack_env       # Add proper RACK_ENV to each application
rake heroku:console               # Opens a remote console
rake heroku:create                # Creates the Heroku app
rake heroku:create_config         # Creates an example configuration file
rake heroku:db:migrate            # Migrates and restarts remote servers
rake heroku:db:pull               # Pull database from stage to local dev database
rake heroku:deploy[commit]        # Pushes the given commit, migrates and restarts (default: HEAD)
rake heroku:deploy:after          # Callback after deploys
rake heroku:deploy:before         # Callback before deploys
rake heroku:deploy:force[commit]  # Force-pushes the given commit, migrates and restarts (default: HEAD)
rake heroku:logs                  # Shows the Heroku logs
rake heroku:logs:tail             # Tail the Heroku logs (requires logging:expanded)
rake heroku:maintenance           # Enable maintenance mode
rake heroku:maintenance_off       # Disable maintenance mode
rake heroku:maintenance_on        # Enable maintenance mode
rake heroku:push[commit]          # Pushes the given commit (default: HEAD)
rake heroku:push:force[commit]    # Force-pushes the given commit (default: HEAD)
rake heroku:rake[task]            # Runs a rake task remotely
rake heroku:remotes               # Add git remotes for all apps in this project
rake heroku:restart               # Restarts remote servers
rake heroku:share                 # Adds a collaborator (asks for email)
rake heroku:unshare               # Removes a collaborator (asks for email)
rake heroku:stage:all             # Select all Heroku apps for later command

Frequently used tasks are aliased into the global namespace:

task :all           => 'heroku:stage:all'
task :deploy        => 'heroku:deploy'
task 'deploy:force' => 'heroku:deploy:force'
task :before_deploy => 'heroku:deploy:before'
task :after_deploy  => 'heroku:deploy:after'
task :console       => 'heroku:console'
task :restart       => 'heroku:restart'
task :migrate       => 'heroku:db:migrate'
task :logs          => 'heroku:logs:default'
task 'logs:tail'    => 'heroku:logs:tail'

Links

Homepage

github.com/fastestforward/heroku_san

Issue Tracker

github.com/fastestforward/heroku_san/issues

Contributors

  • Elijah Miller (elijah.miller@gmail.com)

  • Glenn Roberts (glenn.roberts@siyelo.com)

  • Damien Mathieu (42@dmathieu.com)

  • Matthew Hassfurder (matthew.hassfurder@gmail.com)

  • Peter Jaros

  • Lee Semel

  • Michael Haddad (michael@ludditetechnology.com)

  • Les Hill (leshill@gmail.com)

  • Bryan Ash

  • Barry Hess (barry@bjhess.com)

  • Ryan Ahearn (ryan@craftsoftwaresolutions.com)

  • Jon Wood (jon@blankpad.net)

  • Mat Schaffer (mat@schaffer.me)

  • Jonathan Hironaga (jonathan.hironaga@halogennetwork.com)

  • Ken Mayer (ken@bitwrangler.com)

License

License

Copyright © 2009-2012 Elijah Miller <elijah.miller@gmail.com>, released under the MIT license.

Something went wrong with that request. Please try again.