Skip to content

Instantly share code, notes, and snippets.

@OpenCoderX
Forked from ianmurrays/deploy.rb
Created February 1, 2013 18:34

Revisions

  1. @ianmurrays ianmurrays created this gist Jul 21, 2011.
    14 changes: 14 additions & 0 deletions deploy.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    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"
    system "rm #{test_log}"
    end
    end
    end