tavern-redis 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
- # Tavern::Redis
1
+ # tavern-redis
2
2
 
3
- TODO: Write a gem description
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!
4
5
 
5
6
  ## Installation
6
7
 
@@ -18,7 +19,19 @@ Or install it yourself as:
18
19
 
19
20
  ## Usage
20
21
 
21
- TODO: Write usage instructions here
22
+ Inside your application, simple set your hub to a `Tavern::Redis::Hub` instance:
23
+
24
+ ```ruby
25
+ Tavern.hub = Tavern::Redis::Hub.new Redis.new
26
+ ```
27
+
28
+ Next, in a script where you want the subscribers to work, run:
29
+
30
+ ```ruby
31
+ Tavern.hub.start
32
+ ```
33
+
34
+ Whilst using the hub as normal in your main application
22
35
 
23
36
  ## Contributing
24
37
 
@@ -6,7 +6,7 @@ module Tavern
6
6
 
7
7
  attr_reader :redis
8
8
 
9
- def initialize(redis)
9
+ def initialize(redis = Redis.current)
10
10
  @redis = redis
11
11
  super()
12
12
  end
@@ -1,5 +1,5 @@
1
1
  module Tavern
2
2
  module Redis
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tavern-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-21 00:00:00.000000000 Z
12
+ date: 2012-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 1.8.21
115
+ rubygems_version: 1.8.24
116
116
  signing_key:
117
117
  specification_version: 3
118
118
  summary: Tavern + Redis == Distributed Pub Sub