| In: |
lib/ruby-growl.rb
|
| Parent: | Object |
ruby-growl allows you to perform Growl notification via UDP from machines without growl installed (for example, non-OSX machines).
What’s Growl? Growl is a really cool "global notification system for Mac OS X". See growl.info/
You‘ll need a Mac to recieve Growl notifications, but you can send Growl notifications from any UDP-capable machine that runs Ruby.
See also the Ruby Growl bindings in Growl’s subversion repository: growl.info/documentation/growl-source-install.php
ruby-growl also contains a command-line notification tool named ‘growl’. It is almost completely option-compatible with growlnotify. (All except for -p is supported, use —priority instead.)
g = Growl.new "127.0.0.1", "ruby-growl",
["ruby-growl Notification"]
g.notify "ruby-growl Notification", "It Came From Ruby-Growl",
"Greetings!"
| VERSION | = | "1.0.0" |
| ruby-growl Version | ||
| GNR_FORMAT | = | "CCnCCa*" |
| Growl Network Registration Packet pack Format | ||
| GNN_FORMAT | = | "CCnnnnna*" |
| Growl Network Notification Packet pack Format | ||
| GROWL_UDP_PORT | = | 9887 |
| Growl UDP Port | ||
| GROWL_PROTOCOL_VERSION | = | 1 |
| Growl Protocol Version | ||
| GROWL_TYPE_REGISTRATION | = | 0 |
| Growl Registration Packet Id | ||
| GROWL_TYPE_NOTIFICATION | = | 1 |
| Growl Notification Packet Id | ||
Creates a new Growl notifier and automatically registers any notifications with the remote machine.
host is the host to contact.
app_name is the name of the application sending the notifications.
all_notifies is a list of notification types your application sends.
default_notifies is a list of notification types that are turned on by default.
I’m not sure about what default_notifies is supposed to be set to, since there is a comment that says "not a subset of all_notifies" in the code.
password is the password needed to send notifications to host.