Skip to content

Allow options (like :priority) to be passed through to Growl #51

Merged
merged 1 commit into from May 30, 2011
View
6 lib/guard/notifier.rb
@@ -10,12 +10,12 @@ def self.turn_off
def self.notify(message, options = {})
unless @disable || ENV["GUARD_ENV"] == "test"
- image = options[:image] || :success
- title = options[:title] || "Guard"
+ image = options.delete(:image) || :success
+ options[:title] ||= "Guard"
case Config::CONFIG['target_os']
when /darwin/i
if growl_installed?
- Growl.notify message, :title => title, :icon => image_path(image), :name => "Guard"
+ Growl.notify message, options.merge(:icon => image_path(image), :name => "Guard")
end
when /linux/i
if libnotify_installed?
Something went wrong with that request. Please try again.