--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/2cf1c9d1-18ec-4f05-b32e-496afe6d5734%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/8509c5c5-b2e8-4033-aadb-b5637e9d077a%40googlegroups.com.
task :start, :roles => :app do
run "cd #{deploy_to}/current/; RAILS_ENV=production bundle exec unicorn_rails -c #{unicorn_path} -D"
end
task :stop, :roles => :app do
run "if [ -e '#{deploy_to}/shared/pids/unicorn.pid' ]; then kill -QUIT cat #{deploy_to}/shared/pids/unicorn.pid; fi"
end
task :restart, :roles => :app do
stop
start
end
end
task :notify_rollbar, :roles => :app do
set :revision, git log -n 1 --pretty=format:"%H"
set :local_user, whoami
set :rollbar_token, 'token_here'
rails_env = fetch(:rails_env, 'production')
run "curl https://api.rollbar.com/api/1/deploy/ -F access_token=#{rollbar_token} -F environment=#{rails_env} -F revision=#{revision} -F local_username=#{local_user} >/dev/null 2>&1", :once => true
end
after "deploy:update", "deploy:link_uploads", "deploy:link_receipts"
after :deploy, 'notify_rollbar'