System notifications using the [ruby_gntp](github.com/snaka/ruby_gntp) gem.
This gem is available for OS X, Linux and Windows and sends system notifications to the following system notification frameworks through the [Growl Network Transport Protocol](www.growlforwindows.com/gfw/help/gntp.aspx):
[Growl](growl.info)
[Growl for Windows](www.growlforwindows.com)
[Growl for Linux](mattn.github.com/growl-for-linux)
[Snarl](sites.google.com/site/snarlapp)
@example Add the `ruby_gntp` gem to your `Gemfile`
group :development gem 'ruby_gntp' end
@example Add the `:gntp` notifier to your `Guardfile`
notification :gntp
@example Add the `:gntp` notifier with configuration options to your `Guardfile`
notification :gntp, sticky: true, host: '192.168.1.5', password: 'secret'
Default options for the ruby gtnp client.
Default options for the ruby gtnp notifications.
# File lib/guard/notifiers/gntp.rb, line 51 def self.available?(opts = {}) super require_gem_safely(opts) end
Shows a system notification.
@param [String] message the notification message body @param [Hash] opts additional notification library options @option opts [String] type the notification type. Either 'success',
'pending', 'failed' or 'notify'
@option opts [String] title the notification title @option opts [String] image the path to the notification image @option opts [String] host the hostname or IP address to which to send
a remote notification
@option opts [String] password the password used for remote
notifications
@option opts [Integer] port the port to send a remote notification @option opts [Boolean] sticky make the notification sticky
# File lib/guard/notifiers/gntp.rb, line 71 def notify(message, opts = {}) self.class.require_gem_safely normalize_standard_options!(opts) opts = DEFAULTS.merge( name: opts.delete(:type).to_s, text: message, icon: opts.delete(:image) ).merge(opts) _client(opts).notify(opts) end
Generated with the Darkfish Rdoc Generator 2.