fac/tom_queue — pull request #7 by caius (2014-08-12 11:04:26+00:00)
Title: Separate publish from consume

Currently publishing messages back to RMQ is handled by the `QueueManager` class. Add a hook point in `QueueManager.publisher` to allow an external publishing adapter to be specified instead. Doesn't change anything within tom_queue aside from that. If the publisher hook isn't assigned to anything, then we continue publishing by the original tom queue publishing channel. If the hook is set to something, we publish via that.

The publisher has two expectations, which are codified in the active_rabbit_publisher_spec. It should respond to `topic(name, options)` and return an object that responds to `publish(message_body, message_options)`. ActiveRabbitPublisher is a working implementation of this.

There's a bit of whitespace tidying up in here too, so perhaps [viewing the diff ignoring whitespace changes](?w=1) is a good idea.

(Also adds a way to run tests from rake & specifies some configuration for later versions of rspec in the helper.)