Required growl/libnotify each time in Guard::Notifier.notify for guard-rspec formatter that is called out of guard scope

This commit is contained in:
Thibaud Guillaume-Gentil 2011-05-13 22:24:49 +02:00
parent e0ca761a25
commit 55946927c2

View File

@ -24,8 +24,10 @@ module Guard
title = options[:title] || "Guard" title = options[:title] || "Guard"
case Config::CONFIG['target_os'] case Config::CONFIG['target_os']
when /darwin/i when /darwin/i
require_growl # need for guard-rspec formatter that is called out of guard scope
Growl.notify message, :title => title, :icon => image_path(image), :name => "Guard" Growl.notify message, :title => title, :icon => image_path(image), :name => "Guard"
when /linux/i when /linux/i
require_libnotify # need for guard-rspec formatter that is called out of guard scope
Libnotify.show :body => message, :summary => title, :icon_path => image_path(image) Libnotify.show :body => message, :summary => title, :icon_path => image_path(image)
end end
end end