Skip to content

Instantly share code, notes, and snippets.

@gvarela
Created August 4, 2011 17:45
Show Gist options
  • Save gvarela/1125736 to your computer and use it in GitHub Desktop.
Save gvarela/1125736 to your computer and use it in GitHub Desktop.
manage spork easily
#!/usr/bin/env bash
if [ $@ == 'start' ]
then
bundle exec spork &
rspec_pid=$!
bundle exec spork cucumber &
cuke_pid=$!
echo "$rspec_pid $cuke_pid" > tmp/spork.pids
exit
fi
if [ $@ == 'kill' ]
then kill -9 `cat tmp/spork.pids`
fi
if [ $@ == 'restart' ]
then ./script/spork kill && ./script/spork start
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment