README.markdown

Chatterbox

Chatterbox is a library to send notifications and messages over whatever service you like, whether it be email, Twitter, Campfire, IRC, or some combination therein. The goal of Chatterbox is to be able to send a message from your application via whatever service the user prefers simple by tweaking the configuration hash that gets sent to Chatterbox.

Publishing and subscribing to notifications can be decoupled easily, so bring your own message queue, web service, database, or whatever to act as an intermediary. Or keep it simple and wire Chatterbox directly - its your choice.

Installing and Running

For plain old gem install:

gem install chatterbox

To install within a Rails app, add the following to your environment.rb file:

config.gem "chatterbox"

Then run:

rake gems:install

Services

Services are used to send notifications in Chatterbox. Chatterbox comes with an email service for use out of the box, which uses ActionMailer and works pretty much how you would expect.

Email Service Configuration

Register the email service to handle messages that get sent to Chatterbox:

Chatterbox::Publishers.register do |notice|
Chatterbox::Services::Email.deliver(notice)
end

Exception Notification

One of the most handy use cases Chatterbox was developed for is exception notification. Chatterbox can be configured for Rails exception catching from controllers, and can be used in a plain Ruby app as well.

To setup Chatterbox for Rails exception notification, install it as a gem with the instructions above, then configure it inside an initializer: