Skip to content
Browse files

added Dummy Adapter for use in development

  • Loading branch information...
1 parent 495f797 commit 0234bf5eac74b0d46329af4e7525c9b93be2dc4f @rahoulb rahoulb committed Jun 24, 2009
Showing with 16 additions and 1 deletion.
  1. +1 −0 CHANGELOG
  2. +12 −0 lib/warren/adapters/dummy_adapter.rb
  3. +3 −1 readme.rdoc
View
1 CHANGELOG
@@ -1,3 +1,4 @@
+v0.8.5. Added dummy adapter for testing purposes
v0.8.4. Fix typo in 0.8.3
v0.8.3. Can now override WARREN_ENV from the command line.
v0.8.2. Added nice error message when no details for current env
View
12 lib/warren/adapters/dummy_adapter.rb
@@ -0,0 +1,12 @@
+require "rubygems"
+
+class DummyAdapter < Warren::Queue
+ def self.publish queue_name, payload, &blk
+ puts "publishing #{payload.inspect} to #{queue_name}"
+ end
+
+ def self.subscribe queue_name, &block
+ puts "subscribing to #{queue_name}"
+ end
+end
+
View
4 readme.rdoc
@@ -16,8 +16,10 @@ Start by looking at examples/ to see how to use it, and then lib/warren/adapters
require "rubygems"
require "warren"
- # Pull in the bunny adapter
+ # Use the bunny adapter to connect to RabbitMQ (Bunny is an AMQP client that works with Rails/Passenger apps)
require "warren/adapters/bunny_adapter"
+ # If you're running in development and don't want to actually push messages onto the queue then instead of loading the bunny adapter use the dummy adapter
+ require "warren/adapters/dummy_adapter"
# See examples/ for more

0 comments on commit 0234bf5

Please sign in to comment.
Something went wrong with that request. Please try again.