Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Darde thomasdarde

View GitHub Profile
@ianmurrays
ianmurrays / deploy.rb
Created Jul 21, 2011
Runs test locally before deploying on capistrano.
View deploy.rb
set :test_log, "logs/capistrano.test.log"
namespace :deploy do
before 'deploy:update_code' do
puts "--> Running tests, please wait ..."
unless system "bundle exec rake > #{test_log} 2>&1" #' > /dev/null'
puts "--> Tests failed. Run `cat #{test_log}` to see what went wrong."
exit
else
puts "--> Tests passed"