Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Jabberish is a DRb-backed Jabber client designed for use in multi-server Rails apps. Just drop in the plugin, configure, start the daemon, and off you go. To install it: script/plugin install git://github.com/cheald/jabberish.git Jabberish calls in your code will fail silently if the Jabberish DRb process isn't running, so if the daemon goes missing, it won't bring your app crashing down around your shoulders - you just won't get IMs. 1) edit config/jabberish.yml with your desired settings 2) rake jabberish:start 3) Invoke Jabberish from your code. JabberishAgent.deliver("firstname.lastname@example.org", message_to_deliver) For example, to send yourself IMs when your app has an error, in application.rb: def rescue_action(e) # The third parameter is "throttle", which will cause Jabberish to refuse # to send the same message to a given recipient twice in a row msg = sprintf("[#%s] %s (%s)", Time.now.to_i, e, e.backtrace.first) JabberishAgent.deliver("email@example.com", msg, true) end Jabberish relies on the xmpp4r-simple gem, so if you are having problems, install it: gem install xmpp4r-simple Enjoy!