From ae1ae1cfbdf82a4bb2caaa585aecb3f13c7abf82 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Thu, 28 Apr 2011 20:22:41 -0700 Subject: [PATCH] Allow options (like :priority) to be passed through to Growl --- lib/guard/notifier.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/guard/notifier.rb b/lib/guard/notifier.rb index d250a22..fad828e 100644 --- a/lib/guard/notifier.rb +++ b/lib/guard/notifier.rb @@ -10,12 +10,12 @@ module Guard 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?