Skip to content
Newer
Older
100644 71 lines (43 sloc) 1.88 KB
65364b0 @guilleiguaran Updating README
guilleiguaran authored
1 # FakeRedis [![Build Status](http://travis-ci.org/guilleiguaran/fakeredis.png)](http://travis-ci.org/guilleiguaran/fakeredis)
920ff65 @guilleiguaran set must returns OK; updating README
guilleiguaran authored
2 This a fake implementation of redis-rb for machines without Redis or test environments
a504449 @guilleiguaran Initial commit
guilleiguaran authored
3
920ff65 @guilleiguaran set must returns OK; updating README
guilleiguaran authored
4
65364b0 @guilleiguaran Updating README
guilleiguaran authored
5 ## Installation
6
7 Install the gem:
8
9 gem install fakeredis
10
11 Add it to your Gemfile:
12
13 gem "fakeredis"
920ff65 @guilleiguaran set must returns OK; updating README
guilleiguaran authored
14
15
65364b0 @guilleiguaran Updating README
guilleiguaran authored
16 ## Usage
17
fe6371c @obrie Experimental branch that implements fakeredis as a Redis connection i…
obrie authored
18 You can use FakeRedis without any changes:
65364b0 @guilleiguaran Updating README
guilleiguaran authored
19
20 require "fakeredis"
21
fe6371c @obrie Experimental branch that implements fakeredis as a Redis connection i…
obrie authored
22 redis = Redis.new
65364b0 @guilleiguaran Updating README
guilleiguaran authored
23
24 >> redis.set "foo", "bar"
25 => "OK"
26
27 >> redis.get "foo"
28 => "bar"
920ff65 @guilleiguaran set must returns OK; updating README
guilleiguaran authored
29
30 Read [redis-rb](https://github.com/ezmobius/redis-rb) documentation and
31 [Redis](http://redis.io) homepage for more info about commands
a504449 @guilleiguaran Initial commit
guilleiguaran authored
32
42296ac @dim Added RSpec loader, updated README
dim authored
33 ## Usage with RSpec
34
35 Require this either in your Gemfile or in RSpec's support scripts. So either:
36
37 # Gemfile
38 group :test do
39 gem "rspec"
40 gem "fakeredis", :require => "fakeredis/rspec"
41 end
42
43 Or:
44
45 # spec/support/fakeredis.rb
46 require 'fakeredis/rspec'
a504449 @guilleiguaran Initial commit
guilleiguaran authored
47
4a5bfb7 @guilleiguaran Add some acknowledgements
guilleiguaran authored
48 ## Acknowledgements
49
fa2ee28 @guilleiguaran Updating Acknowledgements
guilleiguaran authored
50 * [dim](https://github.com/dim)
4a5bfb7 @guilleiguaran Add some acknowledgements
guilleiguaran authored
51 * [czarneckid](https://github.com/czarneckid)
52 * [obrie](https://github.com/obrie)
53 * [Travis-CI](http://travis-ci.org/) (Travis-CI also uses Fakeredis in its tests!!!)
54
55
65364b0 @guilleiguaran Updating README
guilleiguaran authored
56 ## Contributing to FakeRedis
a504449 @guilleiguaran Initial commit
guilleiguaran authored
57
58 * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
59 * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
60 * Fork the project
61 * Start a feature/bugfix branch
62 * Commit and push until you are happy with your contribution
63 * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
64 * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
65
65364b0 @guilleiguaran Updating README
guilleiguaran authored
66
67 ## Copyright
a504449 @guilleiguaran Initial commit
guilleiguaran authored
68
69 Copyright (c) 2011 Guillermo Iguaran. See LICENSE for
70 further details.
Something went wrong with that request. Please try again.