Created
July 12, 2011 13:29
-
-
Save mergulhao/1077982 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :heroku do | |
APP = 'contacal' | |
def run(*cmd) | |
system(*cmd) | |
raise "Command #{cmd.inspect} failed!" unless $?.success? | |
end | |
def confirm(message) | |
print "\n#{message}\nAre you sure? [Yn] " | |
raise 'Aborted' unless STDIN.gets.chomp.downcase == 'y' | |
end | |
desc "Deploy app to Heroku" | |
task :deploy do | |
puts "-----> Pushing..." | |
run "git push [email protected]:#{APP}.git HEAD:master -f" | |
puts "-----> Migrating..." | |
run "heroku rake db:migrate --app #{APP}" | |
puts "-----> Restarting..." | |
run "heroku restart --app #{APP}" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.0.10' | |
gem 'rake', '0.8.7' | |
gem 'mysql2', '~> 0.2.11' | |
group :development, :test do | |
gem 'integration', :git => 'git://github.com/mergulhao/integration.git' | |
gem 'rspec-rails', '2.6.1' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INTEGRATION_TASKS = %w( | |
integration:start | |
spec | |
integration:finish | |
heroku:deploy | |
) |
Faz parte do integration gem: https://github.com/mergulhao/integration
PS: não leve em consideração 100% a documentação do README do integration pq ela está desatualizada.
Ah legal! encontrei nos exemplos do projeto.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
O que faz o integration:finish? É outra task customizada como a heroku:deploy?