Helpful stuffs for Heroku.
Helpful rake tasks for Heroku.
Add this to your Gemfile:
group :development do
gem 'heroku_san'
endTo 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"
endUpdate your Gemfile:
group :development do
gem 'heroku_san'
endUpdate your Rakefile:
require "bundler/setup"
begin
require "heroku_san"
config_file = File.join(File.expand_path(File.dirname(__FILE__)), 'config', 'heroku.yml')
HerokuSan.project = HerokuSan::Project.new(config_file, :deploy => HerokuSan::Deploy::Sinatra)
load "heroku_san/tasks.rb"
rescue LoadError
# The gem shouldn't be installed in a production environment
endIn 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:
rails generate heroku_san rake heroku:create_configCustomize 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_envConfigure your Heroku apps according to config/heroku.yml by running:
rake all heroku:configAfter configuring your Heroku apps you can use rake tasks to control the apps.
rake production deployA 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 restartA special rake task 'all' is created that causes any further commands to execute on all Heroku apps.
rake all restartNeed to add remotes for each app?
rake all heroku:remotes
A full list of tasks provided:
…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'
task 'shell' => 'heroku:shell'Homepage: http://github.com/fastestforward/heroku_san
Issue Tracker: http://github.com/fastestforward/heroku_san/issues
Copyright (c) 2008-2012 Elijah Miller , released under the MIT license.
No open issues yet, or sync has not completed.