Skip to content

Instantly share code, notes, and snippets.

@lukeledet
Forked from marugoshi/spork.rake
Created March 17, 2011 15:00
Show Gist options
  • Save lukeledet/874469 to your computer and use it in GitHub Desktop.
Save lukeledet/874469 to your computer and use it in GitHub Desktop.
namespace :spork do
desc "start spork in the background"
task :start do
sh %{spork &}
sh %{spork cucumber &}
end
desc "stop spork"
task :stop do
`ps -ef | grep bin/spork | grep -v grep | awk '{ print $2 }'`.split.each do |pid|
Process.kill(:TERM, pid.to_i)
end
end
desc "restart spork"
task :restart => [:stop, :start]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment