Skip to content

Instantly share code, notes, and snippets.

@bkeepers
Created October 14, 2010 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkeepers/626858 to your computer and use it in GitHub Desktop.
Save bkeepers/626858 to your computer and use it in GitHub Desktop.
def run(cmd)
system 'clear'
puts cmd
system cmd
end
cmd = ARGV[1..-1].join(' ')
watch('(app|spec|lib|test)/*') { run cmd }
Signal.trap('QUIT') { run cmd }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment