This library provides the ability to send growl notifications to local or remote computers using ssh.
This release provides the following features:
-
Simple API.
-
Smartly selects ssh method to minimize time.
-
Allows the use of custom icons or images.
The latest version of GrowlSSHNotifier can be found at
-
net-ssh (version >= 2.0), if sending notifications to remote hosts that do not have rsa/dsa authentication
Download the sources directly and copy the growl-ssh-notifier directory into the lib directory (or directory of your choice) of your project. Add the following to your code:
require 'lib/growl_ssh_notifier'
You can also clone the repository into your lib directory
git clone git://github.com/threadhead/growl-ssh-notifier.git lib/growl-ssh-notifier
Then add the following to your code:
require 'lib/growl_ssh_notifier'
You can execute the basic library test with a simple rake test
from the growl-ssh-notifier directory.
There are optional tests that will send growl notifications to either the localhost computer or remote computers.
Send test notifications to the localhost machine.
rake test:local_notification
You must duplicate the test/remote_notifications/remote_hosts_example.yml
file to remote_hosts.yml
and edit the YAML file to enter valid hosts. Then you can test sending notifications to remote hosts.
rake test:remote_notification
require 'growl_ssh_notifier' rec = GrowlSSHNotifier::Receiver.new("localhost") rec.send_notification('Test Message', 'This is a test message sent to the LOCALHOST machine with GrowlSSHNotifier.')
require 'growl_ssh_notifier' rec = GrowlSSHNotifier::Receiver.new("localhost", { :application_icon => 'Mail' }) rec.send_notification('Test Message', 'This is a test message sent to the LOCALHOST machine with GrowlSSHNotifier.')
This package is licensed under the MIT license and/or the Creative Commons Attribution-ShareAlike.