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

This commit is contained in:
Andre Arko 2011-04-28 20:22:41 -07:00
parent ead039b2f2
commit ae1ae1cfbd

View File

@ -10,12 +10,12 @@ module Guard
def self.notify(message, options = {}) def self.notify(message, options = {})
unless @disable || ENV["GUARD_ENV"] == "test" unless @disable || ENV["GUARD_ENV"] == "test"
image = options[:image] || :success image = options.delete(:image) || :success
title = options[:title] || "Guard" options[:title] ||= "Guard"
case Config::CONFIG['target_os'] case Config::CONFIG['target_os']
when /darwin/i when /darwin/i
if growl_installed? 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 end
when /linux/i when /linux/i
if libnotify_installed? if libnotify_installed?