def self.setup_connection_gntp(growl)
return unless growl
require 'ruby_gntp'
if growl.instance_of?(Hash)
@password = growl.include?(:password) ? growl[:password] : nil
@host = growl.include?(:host) ? growl[:host] : 'localhost'
end
@password ||= nil
@host ||= 'localhost'
@growl = GNTP.new('uniform_notifier', @host, @password, 23053)
@growl.register(notifications: [{
name: 'uniform_notifier',
enabled: true,
}])
notify 'Uniform Notifier Growl has been turned on (using GNTP)' if !growl.instance_of?(Hash) || !growl[:quiet]
end