Permalink
Browse files

set must returns OK; updating README

  • Loading branch information...
1 parent 240c364 commit 920ff6540b154bf35ac29c3a362aacfa3c2220ed @guilleiguaran guilleiguaran committed Apr 16, 2011
Showing with 19 additions and 4 deletions.
  1. +17 −3 README.md
  2. +1 −0 lib/fakeredis/strings.rb
  3. +1 −1 lib/fakeredis/version.rb
View
20 README.md
@@ -1,10 +1,24 @@
-FakeRedis
+FakeRedis [![Build Status](http://travis-ci.org/guilleiguaran/fakeredis.png)](http://travis-ci.org/guilleiguaran/fakeredis)
--------
-This a tiny clone of redis-rb usable in your tests.
+This a fake implementation of redis-rb for machines without Redis or test environments
Usage
=====
-Nothing to see here yet...
+You can use FakeRedis::Redis similary as you use redis gem:
+
+ require "fakeredis"
+
+ redis = FakeRedis::Redis.new
+
+
+ >> redis.set "foo", "bar"
+ => "OK"
+
+ >> redis.get "foo"
+ => "bar"
+
+Read [redis-rb](https://github.com/ezmobius/redis-rb) documentation and
+[Redis](http://redis.io) homepage for more info about commands
Contributing to FakeRedis
View
1 lib/fakeredis/strings.rb
@@ -71,6 +71,7 @@ def msetnx(*pairs)
def set(key, value)
@data[key] = value.to_s
+ "OK"
end
def setbit(key, offset, bit)
View
2 lib/fakeredis/version.rb
@@ -1,3 +1,3 @@
module FakeRedis
- VERSION = "0.0.1"
+ VERSION = "0.1.0"
end

0 comments on commit 920ff65

Please sign in to comment.