Created
July 25, 2012 16:15
-
-
Save jeffrafter/3177021 to your computer and use it in GitHub Desktop.
Don't Growl, Say.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Growl | |
def notify_with_say(message = nil, options = {}, &block) | |
message = message.gsub(/in\s*[0-9\.]+\s*seconds$/, '') | |
`say -v Virginie "#{message}"` | |
return | |
end | |
alias_method_chain :notify, :say | |
module_function :notify | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Try to load a growl override | |
begin | |
load File.expand_path("../../", __FILE__) + '/.growl' | |
rescue LoadError | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment