def available?(silent = false, options = {})
if RbConfig::CONFIG['host_os'] =~ /darwin/
require 'growl_notify'
begin
if ::GrowlNotify.application_name != 'Guard'
::GrowlNotify.config do |c|
c.notifications = %w(success pending failed notify)
c.default_notifications = 'notify'
c.application_name = 'Guard'
end
end
true
rescue ::GrowlNotify::GrowlNotFound
::Guard::UI.error 'Please install Growl from http://growl.info' unless silent
false
end
else
::Guard::UI.error 'The :growl_notify notifier runs only on Mac OS X.' unless silent
false
end
rescue LoadError, NameError
::Guard::UI.error "Please add \"gem 'growl_notify'\" to your Gemfile and run Guard with \"bundle exec\"." unless silent
false
end