Skip to content

Instantly share code, notes, and snippets.

@seadowg
Created March 13, 2012 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save seadowg/2030825 to your computer and use it in GitHub Desktop.
Save seadowg/2030825 to your computer and use it in GitHub Desktop.
Add growl 1.3 to buildr
# Add this to a buildr 'buildfile' to receive growl notifications when compilation
# completes or fails (including cc compilations)
require 'ruby_gntp'
# Growl setup
Buildr.application.on_completion do |title, message|
GNTP.notify({
:app_name => "buildr",
:title => title,
:text => message,
})
end
Buildr.application.on_failure do |title, message|
GNTP.notify({
:app_name => "buildr",
:title => title,
:text => message,
})
end
@atoulme
Copy link

atoulme commented Mar 14, 2012

If you add this gist as a patch on https://issues.apache.org/jira/browse/BUILDR-631 and make sure to click the checkbox to give copyright to the Apache Foundation, we can incorporate your patch in Buildr trunk. Otherwise, I will do a gem based on your code. Thanks for doing the work !

@seadowg
Copy link
Author

seadowg commented Mar 14, 2012

Just uploaded the code as a file to the issue with copyright permission. Also included some notes and links to ruby_gntp documentation. How are you planning to integrate it?

@atoulme
Copy link

atoulme commented Mar 14, 2012

We have growl integration but I'm not sure it works with 1.3. I would replace the current code by the code you provide and make an optional dependency on the gem you used, ruby_gntp.
https://github.com/apache/buildr/blob/trunk/lib/buildr/core/osx.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment