Skip to content

Instantly share code, notes, and snippets.

View benpickles's full-sized avatar
🏎️

Ben Pickles benpickles

🏎️
View GitHub Profile
require 'autotest/redgreen'
module Autotest::Growl
def self.notify(title, message, image, priority = 1, sticky = '')
`growlnotify --image #{image} -p #{priority} -m #{message.inspect} #{title} #{sticky}`
end
Autotest.add_hook :ran_command do |at|
results = [at.results].flatten.join("\n")
if output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?/)
> See http://shortwaveapp.com/waves.txt for instructions.
a http://www.amazon.co.uk/s/?url=search-alias%3Daps&field-keywords=%s Amazon Search.
acr http://acronyms.thefreedictionary.com/%s Acronym search.
f http://flickr.com/search/?q=%s Flickr Search
g http://www.google.com/search?q=%s Google Search
gem http://gemcutter.org/search?query=%s Search Gemcutter.
git http://www.kernel.org/pub/software/scm/git/docs/git-%s.html Git command help.
github http://github.com/search?q=%s Search Github.
gs http://www.google.com/search?q=site:%d%20%s Search the current site