localshred/ragnar — pull request #1 by teubanks (2012-04-07 20:34:56+00:00)
Title: Better configuration and Simple Queue publishing

Created better configuration management via Ragnar::Config.
We can now configure ragnar like so

Ragnar::Config.configure do |c|
c.host = 'some_host'
c.port = '5672'
end

This configuration is available to the ragnar/connector class as well as any other classes that may need this information.
The old configuration method still works but should be removed asap.

Also added a way to publish synchronously via bunny, meaning no eventmachine requirements for publishing easy one-off messages

Publish one-off messages to a topic exchange (default exchange name 'events') in the following way:
Ragnar::SimpleQueue.publish_topic('message', 'route.to.use')
or
Ragnar::SimpleQueue.publish_topic('message', 'route.to.use', 'other_exchange')