pebblebed 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,107 @@
1
+ require 'digest'
2
+ require 'pebblebed/uid'
3
+ require 'pebblebed/river'
4
+
5
+ # Note to readers. This is verbose and ugly
6
+ # because I'm trying to understand what I'm doing.
7
+ # When I do understand it, I'll clean up the tests.
8
+ # Until then, please just bear with me.
9
+ # Or explain it to me :)
10
+ describe Pebblebed::River do
11
+
12
+ subject { Pebblebed::River.new('whatever') }
13
+
14
+ after(:each) do
15
+ subject.send(:bunny).queues.each do |name, queue|
16
+ queue.purge
17
+ queue.delete
18
+ end
19
+ subject.disconnect
20
+ end
21
+
22
+ it { subject.should_not be_connected }
23
+
24
+ it "gets the name right" do
25
+ subject.exchange_name.should eq('pebblebed.river.whatever')
26
+ end
27
+
28
+ context "in production" do
29
+ subject { Pebblebed::River.new('production') }
30
+
31
+ it "doesn't append the thing" do
32
+ subject.exchange_name.should eq('pebblebed.river')
33
+ end
34
+ end
35
+
36
+ it "connects" do
37
+ subject.connect
38
+ subject.should be_connected
39
+ end
40
+
41
+ it "disconnects" do
42
+ subject.connect
43
+ subject.should be_connected
44
+ subject.disconnect
45
+ subject.should_not be_connected
46
+ end
47
+
48
+ it "connects if you try to publish something" do
49
+ subject.should_not be_connected
50
+ subject.publish(:event => :test, :uid => 'klass:path$123', :attributes => {:a => 'b'})
51
+ subject.should be_connected
52
+ end
53
+
54
+ it "connects if you try to talk to the exchange" do
55
+ subject.should_not be_connected
56
+ subject.send(:exchange)
57
+ subject.should be_connected
58
+ end
59
+
60
+ describe "publishing" do
61
+
62
+ it "gets selected messages" do
63
+ queue = subject.queue(:name => 'thingivore', :path => 'rspec', :klass => 'thing')
64
+
65
+ queue.message_count.should eq(0)
66
+ subject.publish(:event => 'smile', :uid => 'thing:rspec$1', :attributes => {:a => 'b'})
67
+ subject.publish(:event => 'frown', :uid => 'thing:rspec$2', :attributes => {:a => 'b'})
68
+ subject.publish(:event => 'laugh', :uid => 'thing:testunit$3', :attributes => {:a => 'b'})
69
+ sleep(0.1)
70
+ queue.message_count.should eq(2)
71
+ end
72
+
73
+ it "gets everything if it connects without a key" do
74
+ queue = subject.queue(:name => 'omnivore')
75
+
76
+ queue.message_count.should eq(0)
77
+ subject.publish(:event => 'smile', :uid => 'thing:rspec$1', :attributes => {:a => 'b'})
78
+ subject.publish(:event => 'frown', :uid => 'thing:rspec$2', :attributes => {:a => 'b'})
79
+ subject.publish(:event => 'laugh', :uid => 'testunit:rspec$3', :attributes => {:a => 'b'})
80
+ sleep(0.1)
81
+ queue.message_count.should eq(3)
82
+ end
83
+
84
+ it "sends messages as json" do
85
+ queue = subject.queue(:name => 'eatseverything')
86
+ subject.publish(:event => 'smile', :source => 'rspec', :uid => 'klass:path$1', :attributes => {:a => 'b'})
87
+ sleep(0.1)
88
+ JSON.parse(queue.pop[:payload])['uid'].should eq('klass:path$1')
89
+ end
90
+ end
91
+
92
+ it "subscribes" do
93
+ queue = subject.queue(:name => 'alltestivore', :path => 'rspec|testunit', :klass => 'thing')
94
+
95
+ queue.message_count.should eq(0)
96
+ subject.publish(:event => 'smile', :uid => 'thing:rspec$1', :attributes => {:a => 'b'})
97
+ subject.publish(:event => 'frown', :uid => 'thing:rspec$2', :attributes => {:a => 'b'})
98
+ subject.publish(:event => 'laugh', :uid => 'thing:testunit$3', :attributes => {:a => 'b'})
99
+ sleep(0.1)
100
+ queue.message_count.should eq(3)
101
+ end
102
+
103
+ it "is a durable queue" do
104
+ queue = subject.queue(:name => 'adurablequeue', :path => 'katrina')
105
+ subject.publish(:event => 'test', :uid => 'person:katrina$1', :attributes => {:a => rand(1000)}, :persistent => false)
106
+ end
107
+ end
@@ -0,0 +1,40 @@
1
+ module Pebblebed
2
+ class River
3
+ class Subscription
4
+
5
+ attr_reader :events, :klasses, :paths
6
+ def initialize(options = {})
7
+ @events = querify(options[:event]).split('|')
8
+ @paths = querify(options[:path]).split('|')
9
+ @klasses = querify(options[:klass]).split('|')
10
+ end
11
+
12
+ def queries
13
+ qx = []
14
+ # If we add more than one more level,
15
+ # it's probably time to go recursive.
16
+ events.each do |event|
17
+ klasses.each do |klass|
18
+ paths.each do |pathspec|
19
+ pathify(pathspec).each do |path|
20
+ qx << [event, klass, path].join('._.')
21
+ end
22
+ end
23
+ end
24
+ end
25
+ qx
26
+ end
27
+
28
+ def querify(query)
29
+ (query || '#').gsub('**', '#')
30
+ end
31
+
32
+ def pathify(s)
33
+ required, optional = s.split('^').map {|s| s.split('.')}
34
+ required = Array(required.join('.'))
35
+ optional ||= []
36
+ (0..optional.length).map {|i| required + optional[0,i]}.map {|p| p.join('.')}
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,89 @@
1
+ require 'json'
2
+ require 'bunny'
3
+ require 'pebblebed/river/subscription'
4
+
5
+ module Pebblebed
6
+ class River
7
+
8
+ class << self
9
+ def route(options)
10
+ raise ArgumentError.new(':event is required') unless options[:event]
11
+ raise ArgumentError.new(':uid is required') unless options[:uid]
12
+
13
+ uid = Pebblebed::Uid.new(options[:uid])
14
+ key = [options[:event], uid.klass, uid.path].compact
15
+ key.join('._.')
16
+ end
17
+ end
18
+
19
+ def initialize(env = ENV['RACK_ENV'])
20
+ @environment = env || 'development'
21
+ end
22
+
23
+ def connected?
24
+ bunny.connected?
25
+ end
26
+
27
+ def connect
28
+ unless connected?
29
+ bunny.start
30
+ bunny.qos
31
+ end
32
+ end
33
+
34
+ def disconnect
35
+ bunny.stop if connected?
36
+ end
37
+
38
+ def publish(options = {})
39
+ connect
40
+
41
+ persistent = options.fetch(:persistent) { true }
42
+ key = self.class.route(options)
43
+ exchange.publish(options.to_json, :persistent => persistent, :key => key)
44
+ end
45
+
46
+ def queue(options = {})
47
+ connect
48
+
49
+ raise ArgumentError.new 'Queue must be named' unless options[:name]
50
+
51
+ queue = bunny.queue(options[:name], :durable => true)
52
+ Subscription.new(options).queries.each do |key|
53
+ queue.bind(exchange.name, :key => key)
54
+ end
55
+ queue
56
+ end
57
+
58
+ def exchange_name
59
+ unless @exchange_name
60
+ name = 'pebblebed.river'
61
+ name << ".#{environment}" unless production?
62
+ @exchange_name = name
63
+ end
64
+ @exchange_name
65
+ end
66
+
67
+ private
68
+
69
+ def environment
70
+ @environment
71
+ end
72
+
73
+ def bunny
74
+ @bunny ||= Bunny.new
75
+ end
76
+
77
+ def production?
78
+ environment == 'production'
79
+ end
80
+
81
+ def exchange
82
+ connect
83
+
84
+ @exchange ||= bunny.exchange(exchange_name, :type => :topic, :durable => :true)
85
+ end
86
+
87
+ end
88
+
89
+ end
@@ -1,3 +1,3 @@
1
1
  module Pebblebed
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
data/lib/pebblebed.rb CHANGED
@@ -9,3 +9,4 @@ require 'pebblebed/clients/generic_client'
9
9
  require 'pebblebed/clients/checkpoint_client'
10
10
  require 'pebblebed/clients/quorum_client'
11
11
  require 'pebblebed/parts'
12
+ require 'pebblebed/river'
data/pebblebed.gemspec CHANGED
@@ -32,5 +32,6 @@ Gem::Specification.new do |s|
32
32
  s.add_runtime_dependency "nokogiri"
33
33
  s.add_runtime_dependency "i18n"
34
34
  s.add_runtime_dependency "activesupport"
35
+ s.add_runtime_dependency "bunny"
35
36
 
36
37
  end
@@ -1,4 +1,10 @@
1
1
  require 'spec_helper'
2
+ require 'pebblebed/config'
3
+ require 'pebblebed/connector'
4
+ require 'pebblebed/http'
5
+ require 'pebblebed/clients/abstract_client'
6
+ require 'pebblebed/clients/generic_client'
7
+ require 'pebblebed/clients/checkpoint_client'
2
8
 
3
9
  describe Pebblebed::CheckpointClient do
4
10
 
data/spec/config_spec.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  require 'spec_helper'
2
+ require 'pebblebed/config'
3
+ require 'pebblebed/connector'
2
4
 
3
5
  describe Pebblebed do
4
6
  it "has a nice dsl that configures stuff" do
@@ -24,4 +26,4 @@ describe Pebblebed do
24
26
  Pebblebed.root_url_for(:foobar).to_s.should eq "http://example.org/api/foobar/v2/"
25
27
  end
26
28
 
27
- end
29
+ end
@@ -1,4 +1,9 @@
1
1
  require 'spec_helper'
2
+ require 'pebblebed/config'
3
+ require 'pebblebed/connector'
4
+ require 'pebblebed/clients/abstract_client'
5
+ require 'pebblebed/clients/generic_client'
6
+ require 'pebblebed/clients/checkpoint_client'
2
7
 
3
8
  describe "Pebblebed::Connector" do
4
9
  it "can configure clients for any service" do
@@ -27,4 +32,4 @@ describe "Pebblebed::Connector" do
27
32
  connector.key.should == "another_key"
28
33
  end
29
34
 
30
- end
35
+ end
@@ -1,6 +1,13 @@
1
1
  require 'spec_helper'
2
+ require 'pebblebed/clients/abstract_client'
3
+ require 'pebblebed/clients/generic_client'
2
4
 
3
- describe Pebblebed::GenericClient do
5
+ module Pebblebed
6
+ module Http
7
+ end
8
+ end
9
+
10
+ describe Pebblebed::GenericClient do
4
11
  it "always forwards the session key" do
5
12
  client = Pebblebed::GenericClient.new("session_key", "http://example.org/")
6
13
  client.service_params({})['session'].should eq "session_key"
data/spec/http_spec.rb CHANGED
@@ -2,8 +2,10 @@
2
2
 
3
3
  require 'spec_helper'
4
4
  require 'yajl/json_gem'
5
+ require 'pebblebed/http'
6
+ require 'deepstruct'
5
7
 
6
- describe Pebblebed::Http do
8
+ describe Pebblebed::Http do
7
9
 
8
10
  let :mock_pebble do
9
11
  MockPebble.new
@@ -47,7 +49,7 @@ describe Pebblebed::Http do
47
49
  end
48
50
 
49
51
  it "encodes posts and puts as json if the params is a hash" do
50
- ['post', 'put'].each do |method|
52
+ ['post', 'put'].each do |method|
51
53
  response = Pebblebed::Http.send(method.to_sym, pebble_url, {hello:'world'})
52
54
  result = JSON.parse(response.body)
53
55
  result["CONTENT_TYPE"].should =~ %r{^application/json\b}i
@@ -56,7 +58,7 @@ describe Pebblebed::Http do
56
58
  end
57
59
 
58
60
  it "encodes posts and puts as text/plain if param is string" do
59
- ['post', 'put'].each do |method|
61
+ ['post', 'put'].each do |method|
60
62
  response = Pebblebed::Http.send(method.to_sym, pebble_url, "Hello world")
61
63
  result = JSON.parse(response.body)
62
64
  result["CONTENT_TYPE"].should =~ %r{^text/plain\b}i
data/spec/mock_pebble.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # A simple echo service that emulates a pebble for the purpose of
2
- # testing http interactions. The mock pebble is mounted at
2
+ # testing http interactions. The mock pebble is mounted at
3
3
  # http://localhost:8666/api/mock/v1
4
4
 
5
5
  require 'webrick'
@@ -10,7 +10,7 @@ class MockPebble
10
10
 
11
11
  def do_GET(request, response)
12
12
  status, content_type, body = do_stuff_with(request)
13
-
13
+
14
14
  response.status = status
15
15
  response['Content-Type'] = content_type
16
16
  response.body = body
@@ -18,7 +18,7 @@ class MockPebble
18
18
 
19
19
  def do_POST(request, response)
20
20
  status, content_type, body = do_stuff_with(request)
21
-
21
+
22
22
  response.status = status
23
23
  response['Content-Type'] = content_type
24
24
  response.body = body
@@ -26,7 +26,7 @@ class MockPebble
26
26
 
27
27
  def do_PUT(request, response)
28
28
  status, content_type, body = do_stuff_with(request)
29
-
29
+
30
30
  response.status = status
31
31
  response['Content-Type'] = content_type
32
32
  response.body = body
@@ -34,12 +34,12 @@ class MockPebble
34
34
 
35
35
  def do_DELETE(request, response)
36
36
  status, content_type, body = do_stuff_with(request)
37
-
37
+
38
38
  response.status = status
39
39
  response['Content-Type'] = content_type
40
40
  response.body = body
41
41
  end
42
-
42
+
43
43
  def do_stuff_with(request)
44
44
  return 200, "application/json", request.meta_vars.merge("BODY" => request.body).to_json
45
45
  end
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+ require 'pebblebed/river'
3
+ require 'pebblebed/uid'
4
+
5
+ describe Pebblebed::River do
6
+
7
+ describe "routing keys" do
8
+
9
+ specify do
10
+ options = {:event => 'created', :uid => 'post.awesome.event:feeds.bagera.whatevs$123'}
11
+ Pebblebed::River.route(options).should eq('created._.post.awesome.event._.feeds.bagera.whatevs')
12
+ end
13
+
14
+ specify "event is required" do
15
+ ->{ Pebblebed::River.route(:uid => 'whatevs') }.should raise_error ArgumentError
16
+ end
17
+
18
+ specify "uid is required" do
19
+ ->{ Pebblebed::River.route(:event => 'whatevs') }.should raise_error ArgumentError
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,62 @@
1
+ require 'spec_helper'
2
+ require 'pebblebed/river/subscription'
3
+
4
+ describe Pebblebed::River::Subscription do
5
+
6
+ Subscription = Pebblebed::River::Subscription
7
+
8
+ specify 'simple, direct match' do
9
+ options = {:event => 'create', :klass => 'post.event', :path => 'feed.bagera'}
10
+ subscription = Subscription.new(options)
11
+ subscription.queries.should eq(['create._.post.event._.feed.bagera'])
12
+ end
13
+
14
+ specify 'simple wildcard match' do
15
+ options = {:event => '*.create', :klass => 'post.*', :path => '*.bagera.*'}
16
+ Subscription.new(options).queries.should eq(['*.create._.post.*._.*.bagera.*'])
17
+ end
18
+
19
+ describe "anything matchers" do
20
+
21
+ specify 'match anything (duh)' do
22
+ options = {:event => '**', :klass => '**', :path => '**'}
23
+ Subscription.new(options).queries.should eq(['#._.#._.#'])
24
+ end
25
+
26
+ specify 'match anything if not specified' do
27
+ Subscription.new.queries.should eq(['#._.#._.#'])
28
+ end
29
+
30
+ end
31
+
32
+ it 'handles "or" queries' do
33
+ options = {:event => 'create|delete', :klass => 'post', :path => 'bagera|bandwagon'}
34
+ expected = ['create._.post._.bagera', 'delete._.post._.bagera', 'create._.post._.bandwagon', 'delete._.post._.bandwagon'].sort
35
+ Subscription.new(options).queries.sort.should eq(expected)
36
+ end
37
+
38
+ describe "optional paths" do
39
+ it { Subscription.new.pathify('a.b').should eq(['a.b']) }
40
+ it { Subscription.new.pathify('a.^b.c').should eq(%w(a a.b a.b.c)) }
41
+ end
42
+
43
+ it "handles optional queries" do
44
+ options = {:event => 'create', :klass => 'post', :path => 'feeds.bagera.^fb.concerts'}
45
+ expected = ['create._.post._.feeds.bagera', 'create._.post._.feeds.bagera.fb', 'create._.post._.feeds.bagera.fb.concerts'].sort
46
+ Subscription.new(options).queries.sort.should eq(expected)
47
+ end
48
+
49
+ it "combines all kinds of weird stuff" do
50
+ options = {:event => 'create', :klass => 'post', :path => 'a.^b.c|x.^y.z'}
51
+ expected = [
52
+ 'create._.post._.a',
53
+ 'create._.post._.a.b',
54
+ 'create._.post._.a.b.c',
55
+ 'create._.post._.x',
56
+ 'create._.post._.x.y',
57
+ 'create._.post._.x.y.z',
58
+ ].sort
59
+ Subscription.new(options).queries.sort.should eq(expected)
60
+ end
61
+
62
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,14 +1,12 @@
1
1
  require 'simplecov'
2
- require './spec/mockcached'
3
- require './spec/mock_pebble'
4
- require 'bundler'
5
2
  require 'rspec'
6
3
 
7
4
  SimpleCov.add_filter 'spec'
8
5
  SimpleCov.add_filter 'config'
9
6
  SimpleCov.start
10
7
 
11
- Bundler.require
8
+ require './spec/mockcached'
9
+ require './spec/mock_pebble'
12
10
 
13
11
  RSpec.configure do |c|
14
12
  c.mock_with :rspec
@@ -1,3 +1,4 @@
1
+ require 'spec_helper'
1
2
  require 'pebblebed/uid'
2
3
  require 'pebblebed/uid_query'
3
4
 
data/spec/uid_spec.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ require 'pebblebed/uid'
2
3
 
3
4
  describe Pebblebed::Uid do
4
5
  describe "parsing" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebblebed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-22 00:00:00.000000000 Z
13
+ date: 2012-08-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
- requirement: &70098584984600 !ruby/object:Gem::Requirement
17
+ requirement: &70357357304320 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70098584984600
25
+ version_requirements: *70357357304320
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rake
28
- requirement: &70098584984180 !ruby/object:Gem::Requirement
28
+ requirement: &70357357303880 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *70098584984180
36
+ version_requirements: *70357357303880
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: simplecov
39
- requirement: &70098584983740 !ruby/object:Gem::Requirement
39
+ requirement: &70357357303420 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70098584983740
47
+ version_requirements: *70357357303420
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: deepstruct
50
- requirement: &70098584983120 !ruby/object:Gem::Requirement
50
+ requirement: &70357357302880 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 0.0.2
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *70098584983120
58
+ version_requirements: *70357357302880
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: curb
61
- requirement: &70098584982480 !ruby/object:Gem::Requirement
61
+ requirement: &70357357302320 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 0.7.14
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *70098584982480
69
+ version_requirements: *70357357302320
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: yajl-ruby
72
- requirement: &70098584998200 !ruby/object:Gem::Requirement
72
+ requirement: &70357357318260 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *70098584998200
80
+ version_requirements: *70357357318260
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: queryparams
83
- requirement: &70098584997700 !ruby/object:Gem::Requirement
83
+ requirement: &70357357317720 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :runtime
90
90
  prerelease: false
91
- version_requirements: *70098584997700
91
+ version_requirements: *70357357317720
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: futurevalue
94
- requirement: &70098584997260 !ruby/object:Gem::Requirement
94
+ requirement: &70357357317160 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :runtime
101
101
  prerelease: false
102
- version_requirements: *70098584997260
102
+ version_requirements: *70357357317160
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: pathbuilder
105
- requirement: &70098584996820 !ruby/object:Gem::Requirement
105
+ requirement: &70357357316580 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: '0'
111
111
  type: :runtime
112
112
  prerelease: false
113
- version_requirements: *70098584996820
113
+ version_requirements: *70357357316580
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: nokogiri
116
- requirement: &70098584996160 !ruby/object:Gem::Requirement
116
+ requirement: &70357357315620 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: '0'
122
122
  type: :runtime
123
123
  prerelease: false
124
- version_requirements: *70098584996160
124
+ version_requirements: *70357357315620
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: i18n
127
- requirement: &70098584995420 !ruby/object:Gem::Requirement
127
+ requirement: &70357357315180 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ! '>='
@@ -132,10 +132,10 @@ dependencies:
132
132
  version: '0'
133
133
  type: :runtime
134
134
  prerelease: false
135
- version_requirements: *70098584995420
135
+ version_requirements: *70357357315180
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: activesupport
138
- requirement: &70098584992940 !ruby/object:Gem::Requirement
138
+ requirement: &70357357314700 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ! '>='
@@ -143,7 +143,18 @@ dependencies:
143
143
  version: '0'
144
144
  type: :runtime
145
145
  prerelease: false
146
- version_requirements: *70098584992940
146
+ version_requirements: *70357357314700
147
+ - !ruby/object:Gem::Dependency
148
+ name: bunny
149
+ requirement: &70357357314080 !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ! '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ type: :runtime
156
+ prerelease: false
157
+ version_requirements: *70357357314080
147
158
  description: Development tools for working with Pebblebed
148
159
  email:
149
160
  - katrina@bengler.no
@@ -157,6 +168,7 @@ files:
157
168
  - Gemfile
158
169
  - README.md
159
170
  - Rakefile
171
+ - integration/river_spec.rb
160
172
  - lib/pebblebed.rb
161
173
  - lib/pebblebed/clients/abstract_client.rb
162
174
  - lib/pebblebed/clients/checkpoint_client.rb
@@ -166,6 +178,8 @@ files:
166
178
  - lib/pebblebed/connector.rb
167
179
  - lib/pebblebed/http.rb
168
180
  - lib/pebblebed/parts.rb
181
+ - lib/pebblebed/river.rb
182
+ - lib/pebblebed/river/subscription.rb
169
183
  - lib/pebblebed/sinatra.rb
170
184
  - lib/pebblebed/uid.rb
171
185
  - lib/pebblebed/uid_query.rb
@@ -178,6 +192,8 @@ files:
178
192
  - spec/http_spec.rb
179
193
  - spec/mock_pebble.rb
180
194
  - spec/mockcached.rb
195
+ - spec/river_spec.rb
196
+ - spec/river_subscription_spec.rb
181
197
  - spec/spec_helper.rb
182
198
  - spec/uid_query_spec.rb
183
199
  - spec/uid_spec.rb
@@ -213,6 +229,8 @@ test_files:
213
229
  - spec/http_spec.rb
214
230
  - spec/mock_pebble.rb
215
231
  - spec/mockcached.rb
232
+ - spec/river_spec.rb
233
+ - spec/river_subscription_spec.rb
216
234
  - spec/spec_helper.rb
217
235
  - spec/uid_query_spec.rb
218
236
  - spec/uid_spec.rb