routemaster-client 1.2.1 → 1.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f3500e98d2c514c365040133d4a504eecb96d1c
4
- data.tar.gz: bb4f72149ce1b14d0b38c365bae9cceeb650af63
3
+ metadata.gz: d9f9dd8c84df18d79d2a320e0790dafc18439b04
4
+ data.tar.gz: afbff019ebff4328bc489a04669d939ffd646847
5
5
  SHA512:
6
- metadata.gz: ffa56fad76f3bcf7d3ebfeb2ab10c2f14fff50ef0e8fe1685231f078f5a3768892621c6646da8f3f6df6a35a1bb781e9266a96b4d17de78038f236c0a6a662b5
7
- data.tar.gz: 6622c2e6a5159fb619dc3bfcea46837a5903a841ac085e9973aca0a8318747740cfd1e45af72fa402bb5339b175b52fa0ff9d52c17fd5c5a346da8529061f819
6
+ metadata.gz: 722006ea6038bada4f48b65f97e8a7f48e6ba58ddd82b2534b99ed5648eee8c117dbffde4c34ea57a6126d2408e1a3fee7b10fab3d46dbdfecadcb263a9f7047
7
+ data.tar.gz: d5d48a0e5e50f62a63bf091656ee8bee4702c9ea84420ab14cabb6ab68ebfc5f15c9f8a4fe1b99d0a81aad656420d3e7e4c562de58b578ea975726d4bd6d5258
data/.gitmodules CHANGED
@@ -1,3 +0,0 @@
1
- [submodule "rebund"]
2
- path = rebund
3
- url = https://github.com/mezis/rebund.git
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.3.1
data/.travis.yml CHANGED
@@ -1,18 +1,9 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
- - 1.9.3
4
4
  - 2.0.0
5
- - 2.1.0
6
- - 2.1.1
7
- - 2.2.0
8
- - 2.2.2
5
+ - 2.1.9
6
+ - 2.2.5
7
+ - 2.3.1
9
8
  script:
10
9
  - bundle exec rspec
11
- install:
12
- - "./rebund/run download"
13
- - bundle install --path vendor/bundle
14
- after_script:
15
- - "./rebund/run upload"
16
- env:
17
- global:
18
- secure: "kMxJcT8xyQ+QyCeKW5lDP44IU99Y8iN1AWZo9Z1BKN6HigGa8Ua8O/aD8AJjrTfRRSjnM402utmW6mk78RYVxJha3+69jJYr25I9EeyYhV2cuRu+5Ictxfcb9R9VhS0b6LDncz9h55xDS1UA35rvj+EOO4/M9moccw7T2qzPa2U="
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source ENV.fetch('GEM_SOURCE', 'https://rubygems.org')
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in routemaster_client.gemspec
4
4
  gemspec
@@ -6,6 +6,7 @@ gemspec
6
6
  # just here to avoid a safety warning
7
7
  gem 'psych'
8
8
 
9
+ # development/testing gems
9
10
  gem 'bundler'
10
11
  gem 'rake'
11
12
  gem 'guard-rspec'
data/Gemfile.lock CHANGED
@@ -1,76 +1,87 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- routemaster-client (1.2.1)
4
+ routemaster-client (1.2.2)
5
5
  faraday (>= 0.9.0)
6
- net-http-persistent
7
- wisper (>= 1.4.0)
6
+ net-http-persistent (>= 2.9.4)
7
+ wisper (>= 1.6.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.3.6)
13
- celluloid (0.15.2)
14
- timers (~> 1.1.0)
15
- coderay (1.1.0)
16
- crack (0.4.2)
12
+ addressable (2.4.0)
13
+ coderay (1.1.1)
14
+ crack (0.4.3)
17
15
  safe_yaml (~> 1.0.0)
18
16
  diff-lcs (1.2.5)
19
- faraday (0.9.1)
17
+ faraday (0.9.2)
20
18
  multipart-post (>= 1.2, < 3)
21
- ffi (1.9.3)
19
+ ffi (1.9.12)
22
20
  formatador (0.2.5)
23
- guard (2.6.1)
21
+ guard (2.14.0)
24
22
  formatador (>= 0.2.4)
25
- listen (~> 2.7)
23
+ listen (>= 2.7, < 4.0)
26
24
  lumberjack (~> 1.0)
25
+ nenv (~> 0.1)
26
+ notiffany (~> 0.0)
27
27
  pry (>= 0.9.12)
28
+ shellany (~> 0.0)
28
29
  thor (>= 0.18.1)
29
- guard-rspec (4.3.1)
30
+ guard-compat (1.2.1)
31
+ guard-rspec (4.7.2)
30
32
  guard (~> 2.1)
31
- rspec (>= 2.14, < 4.0)
32
- listen (2.7.9)
33
- celluloid (>= 0.15.2)
34
- rb-fsevent (>= 0.9.3)
35
- rb-inotify (>= 0.9)
36
- lumberjack (1.0.9)
33
+ guard-compat (~> 1.1)
34
+ rspec (>= 2.99.0, < 4.0)
35
+ hashdiff (0.3.0)
36
+ listen (3.0.8)
37
+ rb-fsevent (~> 0.9, >= 0.9.4)
38
+ rb-inotify (~> 0.9, >= 0.9.7)
39
+ ruby_dep (~> 1.2)
40
+ lumberjack (1.0.10)
37
41
  method_source (0.8.2)
38
42
  multipart-post (2.0.0)
43
+ nenv (0.3.0)
39
44
  net-http-persistent (2.9.4)
40
- pry (0.9.12.6)
41
- coderay (~> 1.0)
42
- method_source (~> 0.8)
45
+ notiffany (0.1.0)
46
+ nenv (~> 0.1)
47
+ shellany (~> 0.0)
48
+ pry (0.10.3)
49
+ coderay (~> 1.1.0)
50
+ method_source (~> 0.8.1)
43
51
  slop (~> 3.4)
44
- pry-nav (0.2.3)
45
- pry (~> 0.9.10)
46
- psych (2.0.5)
47
- rack (1.6.2)
48
- rack-test (0.6.2)
52
+ pry-nav (0.2.4)
53
+ pry (>= 0.9.10, < 0.11.0)
54
+ psych (2.1.0)
55
+ rack (1.6.4)
56
+ rack-test (0.6.3)
49
57
  rack (>= 1.0)
50
- rake (10.3.2)
51
- rb-fsevent (0.9.4)
52
- rb-inotify (0.9.5)
58
+ rake (11.2.2)
59
+ rb-fsevent (0.9.7)
60
+ rb-inotify (0.9.7)
53
61
  ffi (>= 0.5.0)
54
- rspec (3.0.0)
55
- rspec-core (~> 3.0.0)
56
- rspec-expectations (~> 3.0.0)
57
- rspec-mocks (~> 3.0.0)
58
- rspec-core (3.0.3)
59
- rspec-support (~> 3.0.0)
60
- rspec-expectations (3.0.3)
62
+ rspec (3.5.0)
63
+ rspec-core (~> 3.5.0)
64
+ rspec-expectations (~> 3.5.0)
65
+ rspec-mocks (~> 3.5.0)
66
+ rspec-core (3.5.0)
67
+ rspec-support (~> 3.5.0)
68
+ rspec-expectations (3.5.0)
61
69
  diff-lcs (>= 1.2.0, < 2.0)
62
- rspec-support (~> 3.0.0)
63
- rspec-mocks (3.0.3)
64
- rspec-support (~> 3.0.0)
65
- rspec-support (3.0.3)
70
+ rspec-support (~> 3.5.0)
71
+ rspec-mocks (3.5.0)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.5.0)
74
+ rspec-support (3.5.0)
75
+ ruby_dep (1.3.1)
66
76
  safe_yaml (1.0.4)
77
+ shellany (0.0.1)
67
78
  slop (3.6.0)
68
79
  thor (0.19.1)
69
- timers (1.1.0)
70
- webmock (1.18.0)
80
+ webmock (2.1.0)
71
81
  addressable (>= 2.3.6)
72
82
  crack (>= 0.3.2)
73
- wisper (1.6.0)
83
+ hashdiff
84
+ wisper (1.6.1)
74
85
 
75
86
  PLATFORMS
76
87
  ruby
@@ -84,3 +95,6 @@ DEPENDENCIES
84
95
  rake
85
96
  routemaster-client!
86
97
  webmock
98
+
99
+ BUNDLED WITH
100
+ 1.12.5
@@ -0,0 +1,100 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ routemaster-client (1.2.1)
5
+ faraday (>= 0.9.0)
6
+ net-http-persistent
7
+ wisper (>= 1.4.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ addressable (2.4.0)
13
+ coderay (1.1.1)
14
+ crack (0.4.3)
15
+ safe_yaml (~> 1.0.0)
16
+ diff-lcs (1.2.5)
17
+ faraday (0.9.2)
18
+ multipart-post (>= 1.2, < 3)
19
+ ffi (1.9.12)
20
+ formatador (0.2.5)
21
+ guard (2.14.0)
22
+ formatador (>= 0.2.4)
23
+ listen (>= 2.7, < 4.0)
24
+ lumberjack (~> 1.0)
25
+ nenv (~> 0.1)
26
+ notiffany (~> 0.0)
27
+ pry (>= 0.9.12)
28
+ shellany (~> 0.0)
29
+ thor (>= 0.18.1)
30
+ guard-compat (1.2.1)
31
+ guard-rspec (4.7.2)
32
+ guard (~> 2.1)
33
+ guard-compat (~> 1.1)
34
+ rspec (>= 2.99.0, < 4.0)
35
+ hashdiff (0.3.0)
36
+ listen (3.1.5)
37
+ rb-fsevent (~> 0.9, >= 0.9.4)
38
+ rb-inotify (~> 0.9, >= 0.9.7)
39
+ ruby_dep (~> 1.2)
40
+ lumberjack (1.0.10)
41
+ method_source (0.8.2)
42
+ multipart-post (2.0.0)
43
+ nenv (0.3.0)
44
+ net-http-persistent (2.9.4)
45
+ notiffany (0.1.0)
46
+ nenv (~> 0.1)
47
+ shellany (~> 0.0)
48
+ pry (0.10.3)
49
+ coderay (~> 1.1.0)
50
+ method_source (~> 0.8.1)
51
+ slop (~> 3.4)
52
+ pry-nav (0.2.4)
53
+ pry (>= 0.9.10, < 0.11.0)
54
+ psych (2.1.0)
55
+ rack (2.0.1)
56
+ rack-test (0.6.3)
57
+ rack (>= 1.0)
58
+ rake (11.2.2)
59
+ rb-fsevent (0.9.7)
60
+ rb-inotify (0.9.7)
61
+ ffi (>= 0.5.0)
62
+ rspec (3.5.0)
63
+ rspec-core (~> 3.5.0)
64
+ rspec-expectations (~> 3.5.0)
65
+ rspec-mocks (~> 3.5.0)
66
+ rspec-core (3.5.0)
67
+ rspec-support (~> 3.5.0)
68
+ rspec-expectations (3.5.0)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.5.0)
71
+ rspec-mocks (3.5.0)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.5.0)
74
+ rspec-support (3.5.0)
75
+ ruby_dep (1.3.1)
76
+ safe_yaml (1.0.4)
77
+ shellany (0.0.1)
78
+ slop (3.6.0)
79
+ thor (0.19.1)
80
+ webmock (2.1.0)
81
+ addressable (>= 2.3.6)
82
+ crack (>= 0.3.2)
83
+ hashdiff
84
+ wisper (1.6.1)
85
+
86
+ PLATFORMS
87
+ ruby
88
+
89
+ DEPENDENCIES
90
+ bundler
91
+ guard-rspec
92
+ pry-nav
93
+ psych
94
+ rack-test
95
+ rake
96
+ routemaster-client!
97
+ webmock
98
+
99
+ BUNDLED WITH
100
+ 1.12.5
data/LICENSE.txt CHANGED
@@ -1,4 +1,5 @@
1
- Copyright (c) 2014 HouseTrip Ltd.
1
+ Copyright (c) 2014-2016 HouseTrip Ltd.
2
+ Copyright (c) 2016 Deliveroo.
2
3
 
3
4
  MIT License
4
5
 
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # routemaster-client
2
2
 
3
- A Ruby API for the [Routemaster](https://github.com/HouseTrip/routemaster) event
3
+ A Ruby API for the [Routemaster](https://github.com/mezis/routemaster) event
4
4
  bus.
5
5
 
6
6
  [![Version](https://badge.fury.io/rb/routemaster-client.svg)](https://rubygems.org/gems/routemaster-client)
7
7
  &nbsp;
8
- [![Build](https://travis-ci.org/HouseTrip/routemaster-client.svg?branch=master)](https://travis-ci.org/HouseTrip/routemaster-client)
8
+ [![Build](https://travis-ci.org/mezis/routemaster-client.svg?branch=master)](https://travis-ci.org/mezis/routemaster-client)
9
9
  &nbsp;
10
- [![Docs](http://img.shields.io/badge/API%20docs-rubydoc.info-blue.svg)](http://rubydoc.info/github/HouseTrip/routemaster-client/frames/file/README.md)
10
+ [![Docs](http://img.shields.io/badge/API%20docs-rubydoc.info-blue.svg)](http://rubydoc.info/github/mezis/routemaster-client/frames/file/README.md)
11
11
 
12
12
 
13
13
  ## Installation
@@ -111,7 +111,7 @@ client.monitor_subscriptions
111
111
 
112
112
  ## Contributing
113
113
 
114
- 1. Fork it ( http://github.com/HouseTrip/routemaster-client/fork )
114
+ 1. Fork it ( http://github.com/mezis/routemaster-client/fork )
115
115
  2. Create your feature branch (`git checkout -b my-new-feature`)
116
116
  3. Commit your changes (`git commit -am 'Add some feature'`)
117
117
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,5 +1,5 @@
1
1
  module Routemaster
2
2
  class Client
3
- VERSION = '1.2.1'
3
+ VERSION = '1.2.2'
4
4
  end
5
5
  end
@@ -92,7 +92,7 @@ module Routemaster
92
92
  end
93
93
 
94
94
  def _assert_valid_topic(topic)
95
- _assert (topic =~ /^[a-z_]{1,32}$/), 'bad topic name'
95
+ _assert (topic =~ /^[a-z_]{1,64}$/), 'bad topic name: must only include letters and underscores'
96
96
  end
97
97
 
98
98
  def _assert_valid_timestamp(timestamp)
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ['Julien Letessier']
10
10
  spec.email = ['julien.letessier@gmail.com']
11
11
  spec.summary = %q{Client API for the Routemaster event bus}
12
- spec.homepage = 'http://github.com/HouseTrip/routemaster_client'
12
+ spec.homepage = 'http://github.com/mezis/routemaster-client'
13
13
  spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
@@ -17,6 +17,6 @@ Gem::Specification.new do |spec|
17
17
  spec.require_paths = %w(.)
18
18
 
19
19
  spec.add_runtime_dependency 'faraday', '>= 0.9.0'
20
- spec.add_runtime_dependency 'net-http-persistent'
21
- spec.add_runtime_dependency 'wisper', '>= 1.4.0'
20
+ spec.add_runtime_dependency 'net-http-persistent', '>= 2.9.4'
21
+ spec.add_runtime_dependency 'wisper', '>= 1.6.1'
22
22
  end
data/spec/client_spec.rb CHANGED
@@ -7,11 +7,14 @@ describe Routemaster::Client do
7
7
  let(:options) do
8
8
  { url: 'https://bus.example.com', uuid: 'john_doe' }
9
9
  end
10
+ let(:pulse_response) { 204 }
10
11
 
11
12
  subject { described_class.new(options) }
12
13
 
13
14
  before do
14
- @stub_pulse = stub_request(:get, %r{^https://#{options[:uuid]}:x@bus.example.com/pulse$}).with(status: 200)
15
+ @stub_pulse = stub_request(:get, %r{^https://bus.example.com/pulse$}).
16
+ with(basic_auth: [options[:uuid], 'x']).
17
+ to_return(status: pulse_response)
15
18
  end
16
19
 
17
20
  describe '#initialize' do
@@ -36,12 +39,13 @@ describe Routemaster::Client do
36
39
 
37
40
  context 'when connection fails' do
38
41
  before do
39
- stub_request(:any, %r{^https://#{options[:uuid]}:x@bus.example.com}).
42
+ stub_request(:any, %r{^https://bus.example.com}).
43
+ with(basic_auth: [options[:uuid], 'x']).
40
44
  to_raise(Faraday::ConnectionFailed)
41
45
  end
42
46
 
43
47
  it 'fails' do
44
- expect { subject }.to raise_error
48
+ expect { subject }.to raise_error(Faraday::ConnectionFailed)
45
49
  end
46
50
 
47
51
  it 'passes if :lazy' do
@@ -50,14 +54,17 @@ describe Routemaster::Client do
50
54
  end
51
55
  end
52
56
 
53
- it 'fails if it does not get a successful heartbeat from the app' do
54
- @stub_pulse.to_return(status: 500)
55
- expect { subject }.to raise_error
57
+ context 'when the heartbeat fails' do
58
+ let(:pulse_response) { 500 }
59
+
60
+ it 'fails if it does not get a successful heartbeat from the app' do
61
+ expect { subject }.to raise_error(RuntimeError)
62
+ end
56
63
  end
57
64
 
58
65
  it 'fails if the timeout value is not an integer' do
59
66
  options[:timeout] = 'timeout'
60
- expect { subject }.to raise_error
67
+ expect { subject }.to raise_error(ArgumentError)
61
68
  end
62
69
  end
63
70
 
@@ -65,48 +72,61 @@ describe Routemaster::Client do
65
72
  let(:callback) { 'https://app.example.com/widgets/123' }
66
73
  let(:topic) { 'widgets' }
67
74
  let(:perform) { subject.send(event, topic, callback) }
75
+ let(:http_status) { nil }
68
76
 
69
77
  before do
70
- @stub = stub_request(
71
- :post, "https://#{options[:uuid]}:x@bus.example.com/topics/widgets"
72
- ).with(status: 200)
73
- end
78
+ @stub = stub_request(:post, 'https://bus.example.com/topics/widgets').
79
+ with(basic_auth: [options[:uuid], 'x'])
74
80
 
75
- it 'sends the event' do
76
- perform
77
- expect(@stub).to have_been_requested
81
+ @stub.to_return(status: http_status) if http_status
78
82
  end
79
83
 
80
- it 'sends a JSON payload' do
81
- @stub.with do |req|
82
- expect(req.headers['Content-Type']).to eq('application/json')
84
+ context 'when the bus responds 200' do
85
+ let(:http_status) { 200 }
86
+
87
+ it 'sends the event' do
88
+ perform
89
+ expect(@stub).to have_been_requested
83
90
  end
84
- perform
85
- end
86
91
 
87
- it 'fails with a bad callback URL' do
88
- callback.replace 'http.foo.bar'
89
- expect { perform }.to raise_error
90
- end
92
+ it 'sends a JSON payload' do
93
+ @stub.with do |req|
94
+ expect(req.headers['Content-Type']).to eq('application/json')
95
+ end
96
+ perform
97
+ end
91
98
 
92
- it 'fails with a non-SSL URL' do
93
- callback.replace 'http://example.com'
94
- expect { perform }.to raise_error
95
- end
99
+ it 'fails with a bad callback URL' do
100
+ callback.replace 'http.foo.bar'
101
+ expect { perform }.to raise_error(ArgumentError)
102
+ end
103
+
104
+ it 'fails with a non-SSL URL' do
105
+ callback.replace 'http://example.com'
106
+ expect { perform }.to raise_error(ArgumentError)
107
+ end
96
108
 
97
- it 'fails with a bad topic name' do
98
- topic.replace 'foo123$bar'
99
- expect { perform }.to raise_error
109
+ it 'fails with a bad topic name' do
110
+ topic.replace 'foo123$bar'
111
+ expect { perform }.to raise_error(ArgumentError, 'bad topic name: must only include letters and underscores')
112
+ end
100
113
  end
101
114
 
102
- it 'fails when an non-success HTTP status is returned' do
103
- @stub.to_return(status: 500)
104
- expect { perform }.to raise_error(RuntimeError)
115
+ context 'when the bus responds 500' do
116
+ let(:http_status) { 500 }
117
+
118
+ it 'raises an exception' do
119
+ expect { perform }.to raise_error(RuntimeError)
120
+ end
105
121
  end
106
122
 
107
- it 'fails when the timeout is reached' do
108
- @stub.to_timeout
109
- expect { perform }.to raise_error(Faraday::TimeoutError)
123
+ context 'when the bus times out' do
124
+ before { @stub.to_timeout }
125
+
126
+ it 'fails' do
127
+ @stub.to_timeout
128
+ expect { perform }.to raise_error(Faraday::TimeoutError)
129
+ end
110
130
  end
111
131
 
112
132
  context 'with explicit timestamp' do
@@ -114,9 +134,12 @@ describe Routemaster::Client do
114
134
  let(:perform) { subject.send(event, topic, callback, timestamp) }
115
135
 
116
136
  before do
117
- @stub = stub_request(
118
- :post, "https://#{options[:uuid]}:x@bus.example.com/topics/widgets"
119
- ).with(body: { type: anything, url: callback, timestamp: timestamp }, status: 200)
137
+ @stub = stub_request(:post, 'https://@bus.example.com/topics/widgets').
138
+ with(
139
+ body: { type: anything, url: callback, timestamp: timestamp },
140
+ basic_auth: [options[:uuid], 'x'],
141
+ ).
142
+ to_return(status: 200)
120
143
  end
121
144
 
122
145
  it 'sends the event' do
@@ -128,7 +151,7 @@ describe Routemaster::Client do
128
151
  let(:timestamp) { 'foo' }
129
152
 
130
153
  it 'fails with non-numeric timestamp' do
131
- expect { perform }.to raise_error
154
+ expect { perform }.to raise_error(ArgumentError)
132
155
  end
133
156
  end
134
157
  end
@@ -164,9 +187,9 @@ describe Routemaster::Client do
164
187
  }}
165
188
 
166
189
  before do
167
- @stub = stub_request(
168
- :post, %r{^https://#{options[:uuid]}:x@bus.example.com/subscription$}
169
- ).with { |r|
190
+ @stub = stub_request(:post, 'https://bus.example.com/subscription').
191
+ with(basic_auth: [options[:uuid], 'x']).
192
+ with { |r|
170
193
  r.headers['Content-Type'] == 'application/json' &&
171
194
  JSON.parse(r.body).all? { |k,v| subscribe_options[k.to_sym] == v }
172
195
  }
@@ -222,13 +245,13 @@ describe Routemaster::Client do
222
245
  end
223
246
 
224
247
  before do
225
- @stub = stub_request(
226
- :get, %r{^https://#{options[:uuid]}:x@bus.example.com/topics$}
227
- ).with { |r|
228
- r.headers['Content-Type'] == 'application/json'
229
- }.to_return {
230
- { status: 200, body: expected_result.to_json }
231
- }
248
+ @stub = stub_request(:get, 'https://bus.example.com/topics').
249
+ with(basic_auth: [options[:uuid], 'x']).
250
+ with { |r|
251
+ r.headers['Content-Type'] == 'application/json'
252
+ }.to_return {
253
+ { status: 200, body: expected_result.to_json }
254
+ }
232
255
  end
233
256
 
234
257
  it 'expects a collection of topics' do
@@ -1,12 +1,13 @@
1
1
  require 'spec_helper'
2
- require 'spec/support/rack_test'
2
+ require 'rack/test'
3
3
  require 'routemaster/receiver'
4
4
 
5
5
  describe Routemaster::Receiver do
6
+ include Rack::Test::Methods
7
+
6
8
  let(:handler) { double 'handler', on_events: nil, on_events_received: true }
7
9
  let(:app) { described_class.new(fake_app, options) }
8
10
 
9
-
10
11
  def perform
11
12
  post '/events', payload, 'CONTENT_TYPE' => 'application/json'
12
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: routemaster-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Letessier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 2.9.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 2.9.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: wisper
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 1.4.0
47
+ version: 1.6.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 1.4.0
54
+ version: 1.6.1
55
55
  description:
56
56
  email:
57
57
  - julien.letessier@gmail.com
@@ -66,6 +66,7 @@ files:
66
66
  - ".travis.yml"
67
67
  - Gemfile
68
68
  - Gemfile.lock
69
+ - Gemfile.lock.updated
69
70
  - Guardfile
70
71
  - LICENSE.txt
71
72
  - README.md
@@ -80,9 +81,8 @@ files:
80
81
  - spec/client_spec.rb
81
82
  - spec/receiver_spec.rb
82
83
  - spec/spec_helper.rb
83
- - spec/support/rack_test.rb
84
84
  - spec/topic_spec.rb
85
- homepage: http://github.com/HouseTrip/routemaster_client
85
+ homepage: http://github.com/mezis/routemaster-client
86
86
  licenses:
87
87
  - MIT
88
88
  metadata: {}
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.4.5
105
+ rubygems_version: 2.5.1
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Client API for the Routemaster event bus
@@ -110,5 +110,4 @@ test_files:
110
110
  - spec/client_spec.rb
111
111
  - spec/receiver_spec.rb
112
112
  - spec/spec_helper.rb
113
- - spec/support/rack_test.rb
114
113
  - spec/topic_spec.rb
@@ -1,9 +0,0 @@
1
- ENV['RACK_ENV'] = 'test'
2
-
3
- require 'rspec'
4
- require 'rack/test'
5
-
6
- RSpec.configure do |conf|
7
- conf.include Rack::Test::Methods
8
- end
9
-