Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 43 lines (26 sloc) 0.921 kB
89bf7fc @Sutto Guide to usage
authored
1 # tavern-redis
c45e4ba @Sutto Add tavern-redis
authored
2
89bf7fc @Sutto Guide to usage
authored
3 Tavern Redis lets you publish and receive tavern messages over redis. Useful for situations where
4 you want to implement simple pubsub with ruby-like semantics over a network. Magic!
c45e4ba @Sutto Add tavern-redis
authored
5
6 ## Installation
7
8 Add this line to your application's Gemfile:
9
10 gem 'tavern-redis'
11
12 And then execute:
13
14 $ bundle
15
16 Or install it yourself as:
17
18 $ gem install tavern-redis
19
20 ## Usage
21
89bf7fc @Sutto Guide to usage
authored
22 Inside your application, simple set your hub to a `Tavern::Redis::Hub` instance:
23
57f4ec4 @Sutto Proper code blocks
authored
24 ```ruby
89bf7fc @Sutto Guide to usage
authored
25 Tavern.hub = Tavern::Redis::Hub.new Redis.new
57f4ec4 @Sutto Proper code blocks
authored
26 ```
89bf7fc @Sutto Guide to usage
authored
27
28 Next, in a script where you want the subscribers to work, run:
29
57f4ec4 @Sutto Proper code blocks
authored
30 ```ruby
89bf7fc @Sutto Guide to usage
authored
31 Tavern.hub.start
57f4ec4 @Sutto Proper code blocks
authored
32 ```
89bf7fc @Sutto Guide to usage
authored
33
34 Whilst using the hub as normal in your main application
c45e4ba @Sutto Add tavern-redis
authored
35
36 ## Contributing
37
38 1. Fork it
39 2. Create your feature branch (`git checkout -b my-new-feature`)
40 3. Commit your changes (`git commit -am 'Added some feature'`)
41 4. Push to the branch (`git push origin my-new-feature`)
42 5. Create new Pull Request
Something went wrong with that request. Please try again.