Skip to content
Browse files

Update readme.

Replace on_error with errback.
Mention pipelining.
Remove line about rspec.
  • Loading branch information...
1 parent 6845002 commit 0fea8898e695b6bbcb8fe02d93c5b99079e7cbb0 @libc libc committed Feb 5, 2010
Showing with 10 additions and 4 deletions.
  1. +10 −4 README.rdoc
14 README.rdoc
@@ -23,22 +23,28 @@ Like any Deferrable eventmachine-based protocol implementation, using EM-Redis i
require 'em-redis' do
- redis = EM::Protocols::Redis.connect("localhost", 6379)
- error_callback = lambda {|code| puts "Error code: #{code}" }
- redis.on_error &error_callback
+ redis = EM::Protocols::Redis.connect
+ redis.errback do |code|
+ puts "Error code: #{code}"
+ end
redis.set "a", "foo" do |response|
redis.get "a" do |response|
puts response
+ # We get pipelining for free
+ redis.set("b", "bar")
+ redis.get("a") do |response|
+ puts response # will be foo
+ end
To run tests on a Redis server (currently compatible with 1.3)
Because the EM::Protocol::Memcached code used Bacon for testing, test code is
-currently in the form of bacon specs. I'll port them to RSpec at some point.
+currently in the form of bacon specs.

0 comments on commit 0fea889

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