routemaster-client 3.2.0 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: '0384440865d526f1b3dbe9efd6546ce97f434955973584a33282bc03d507f0a8'
4
- data.tar.gz: d48c76712c3091bc8740960a67d29d82413355423dad308b4b7b7d9fae47ab75
2
+ SHA1:
3
+ metadata.gz: 627c0568340810467b70f553df4292a01cedf3cf
4
+ data.tar.gz: 2e91bec4303b96bbd1819e5ede9646d67111b0fe
5
5
  SHA512:
6
- metadata.gz: 34fc6f879ce1b79f629ad744948657e5173e38939dcc7c48012a79b81dfcf47719e8906a65ea0dd3bc23adc4825afeb84f18b5d5b932650a05d1130d57f87b9e
7
- data.tar.gz: d095b52a84f3f6f4e55ca53e3a95513eda7e204309a3b087bf619b40b6c0c1b353c636067e27ca61f308e6aa94694c0f4cfe98d9e80add440bdaa1449d1e1ef9
6
+ metadata.gz: d998d48e8c50c92ff2151587820e129226d5e72ada2e849ed272dc5e4e4ac12b88c5fc2742d0ad13f4878ef9e6211bb58ee73b1ac31522899af21909527f5c6d
7
+ data.tar.gz: f3981ac1cd2c3f075225fbc3979ecb44d0c61243e057c61f17d47f2eeff03dca9ff6afcf16489146cb555f5b20638340c3d035afc662c37366fdf5b3f9da973b
@@ -1 +1 @@
1
- 2.4.1
1
+ 2.4.3
@@ -2,8 +2,9 @@ language: ruby
2
2
  cache: bundler
3
3
  rvm:
4
4
  - 2.2.7
5
- - 2.3.4
6
- - 2.4.1
5
+ - 2.3.6
6
+ - 2.4.3
7
+ - 2.5.0
7
8
  - ruby-head
8
9
  script:
9
10
  - bundle exec rspec
@@ -1,3 +1,25 @@
1
+ # HEAD
2
+
3
+ ## 3.2.3 (2018-10-08)
4
+
5
+ Bug fixes:
6
+
7
+ - Fix Gemfile.lock
8
+
9
+ ## 3.2.2 (2018-10-08)
10
+
11
+ Changes:
12
+
13
+ - Show UUID of subscribers in output of `rtm sub list` (#36)
14
+
15
+ ## 3.2.1 (2018-07-05)
16
+
17
+ Bug fixes:
18
+
19
+ - Subscription now includes max_events and timeout details so they
20
+ get printed
21
+ - `$LOAD_PATH` is fixed so `./exe/rtm` can now be run directly
22
+
1
23
  ## 3.2.0 (2018-01-08)
2
24
 
3
25
  Changes:
data/Gemfile CHANGED
@@ -14,6 +14,6 @@ gem 'webmock'
14
14
  gem 'pry-byebug'
15
15
  gem 'rack-test'
16
16
  gem 'simplecov'
17
- gem 'codeclimate-test-reporter', require: nil
17
+ gem 'codeclimate-test-reporter', '~> 1.0.8', require: nil
18
18
  gem 'sidekiq'
19
19
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- routemaster-client (3.2.0)
4
+ routemaster-client (3.2.3)
5
5
  faraday (>= 0.9.0)
6
6
  hashie
7
7
  oj (>= 2.17)
@@ -11,12 +11,12 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- addressable (2.5.1)
15
- public_suffix (~> 2.0, >= 2.0.2)
16
- byebug (9.0.6)
14
+ addressable (2.5.2)
15
+ public_suffix (>= 2.0.2, < 4.0)
16
+ byebug (10.0.0)
17
17
  codeclimate-test-reporter (1.0.8)
18
18
  simplecov (<= 0.13)
19
- coderay (1.1.1)
19
+ coderay (1.1.2)
20
20
  concurrent-ruby (1.0.5)
21
21
  connection_pool (2.2.1)
22
22
  crack (0.4.3)
@@ -25,14 +25,14 @@ GEM
25
25
  docile (1.1.5)
26
26
  ethon (0.11.0)
27
27
  ffi (>= 1.3.0)
28
- faraday (0.13.1)
28
+ faraday (0.15.3)
29
29
  multipart-post (>= 1.2, < 3)
30
- ffi (1.9.18)
30
+ ffi (1.9.23)
31
31
  formatador (0.2.5)
32
- guard (2.14.1)
32
+ guard (2.14.2)
33
33
  formatador (>= 0.2.4)
34
34
  listen (>= 2.7, < 4.0)
35
- lumberjack (~> 1.0)
35
+ lumberjack (>= 1.0.12, < 2.0)
36
36
  nenv (~> 0.1)
37
37
  notiffany (~> 0.0)
38
38
  pry (>= 0.9.12)
@@ -43,71 +43,69 @@ GEM
43
43
  guard (~> 2.1)
44
44
  guard-compat (~> 1.1)
45
45
  rspec (>= 2.99.0, < 4.0)
46
- hashdiff (0.3.4)
47
- hashie (3.5.7)
46
+ hashdiff (0.3.7)
47
+ hashie (3.6.0)
48
48
  json (2.1.0)
49
49
  listen (3.1.5)
50
50
  rb-fsevent (~> 0.9, >= 0.9.4)
51
51
  rb-inotify (~> 0.9, >= 0.9.7)
52
52
  ruby_dep (~> 1.2)
53
53
  lumberjack (1.0.12)
54
- method_source (0.8.2)
54
+ method_source (0.9.0)
55
55
  multipart-post (2.0.0)
56
56
  nenv (0.3.0)
57
57
  notiffany (0.1.1)
58
58
  nenv (~> 0.1)
59
59
  shellany (~> 0.0)
60
- oj (3.3.10)
61
- pry (0.10.4)
60
+ oj (3.6.11)
61
+ pry (0.11.3)
62
62
  coderay (~> 1.1.0)
63
- method_source (~> 0.8.1)
64
- slop (~> 3.4)
65
- pry-byebug (3.4.2)
66
- byebug (~> 9.0)
63
+ method_source (~> 0.9.0)
64
+ pry-byebug (3.6.0)
65
+ byebug (~> 10.0)
67
66
  pry (~> 0.10)
68
- psych (2.2.4)
69
- public_suffix (2.0.5)
70
- rack (2.0.3)
71
- rack-protection (2.0.0)
67
+ psych (3.0.2)
68
+ public_suffix (3.0.2)
69
+ rack (2.0.4)
70
+ rack-protection (2.0.1)
72
71
  rack
73
- rack-test (0.7.0)
72
+ rack-test (0.8.3)
74
73
  rack (>= 1.0, < 3)
75
- rake (12.0.0)
76
- rb-fsevent (0.10.2)
74
+ rake (12.3.0)
75
+ rb-fsevent (0.10.3)
77
76
  rb-inotify (0.9.10)
78
77
  ffi (>= 0.5.0, < 2)
79
- redis (3.3.3)
80
- rspec (3.6.0)
81
- rspec-core (~> 3.6.0)
82
- rspec-expectations (~> 3.6.0)
83
- rspec-mocks (~> 3.6.0)
84
- rspec-core (3.6.0)
85
- rspec-support (~> 3.6.0)
86
- rspec-expectations (3.6.0)
78
+ redis (4.0.1)
79
+ rspec (3.7.0)
80
+ rspec-core (~> 3.7.0)
81
+ rspec-expectations (~> 3.7.0)
82
+ rspec-mocks (~> 3.7.0)
83
+ rspec-core (3.7.1)
84
+ rspec-support (~> 3.7.0)
85
+ rspec-expectations (3.7.0)
87
86
  diff-lcs (>= 1.2.0, < 2.0)
88
- rspec-support (~> 3.6.0)
89
- rspec-mocks (3.6.0)
87
+ rspec-support (~> 3.7.0)
88
+ rspec-mocks (3.7.0)
90
89
  diff-lcs (>= 1.2.0, < 2.0)
91
- rspec-support (~> 3.6.0)
92
- rspec-support (3.6.0)
90
+ rspec-support (~> 3.7.0)
91
+ rspec-support (3.7.1)
93
92
  ruby_dep (1.5.0)
94
93
  safe_yaml (1.0.4)
95
94
  shellany (0.0.1)
96
- sidekiq (5.0.4)
95
+ sidekiq (5.1.1)
97
96
  concurrent-ruby (~> 1.0)
98
97
  connection_pool (~> 2.2, >= 2.2.0)
99
98
  rack-protection (>= 1.5.0)
100
- redis (~> 3.3, >= 3.3.3)
99
+ redis (>= 3.3.5, < 5)
101
100
  simplecov (0.13.0)
102
101
  docile (~> 1.1.0)
103
102
  json (>= 1.8, < 3)
104
103
  simplecov-html (~> 0.10.0)
105
- simplecov-html (0.10.1)
106
- slop (3.6.0)
107
- thor (0.19.4)
104
+ simplecov-html (0.10.2)
105
+ thor (0.20.0)
108
106
  typhoeus (1.3.0)
109
107
  ethon (>= 0.9.0)
110
- webmock (3.0.1)
108
+ webmock (3.3.0)
111
109
  addressable (>= 2.3.6)
112
110
  crack (>= 0.3.2)
113
111
  hashdiff
@@ -118,7 +116,7 @@ PLATFORMS
118
116
 
119
117
  DEPENDENCIES
120
118
  bundler
121
- codeclimate-test-reporter
119
+ codeclimate-test-reporter (~> 1.0.8)
122
120
  guard-rspec
123
121
  pry-byebug
124
122
  psych
@@ -130,4 +128,4 @@ DEPENDENCIES
130
128
  webmock
131
129
 
132
130
  BUNDLED WITH
133
- 1.16.0
131
+ 1.16.4
data/exe/rtm CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ dir = File.expand_path('..', __dir__)
4
+ $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir)
5
+
3
6
  require 'rubygems'
4
7
  require 'routemaster/cli/top_level'
5
8
 
@@ -6,7 +6,10 @@ module Routemaster
6
6
 
7
7
  def initialize(options)
8
8
  @subscriber = options.fetch('subscriber')
9
+ @uuid = options.fetch('uuid')
9
10
  @callback = options.fetch('callback')
11
+ @max_events = options['max_events']
12
+ @timeout = options['timeout']
10
13
  @topics = options.fetch('topics')
11
14
  @events = _symbolize_keys options.fetch('events')
12
15
  end
@@ -14,9 +17,12 @@ module Routemaster
14
17
  def attributes
15
18
  {
16
19
  subscriber: @subscriber,
20
+ uuid: @uuid,
17
21
  callback: @callback,
22
+ max_events: @max_events,
23
+ timeout: @timeout,
18
24
  topics: @topics,
19
- events: @events
25
+ events: @events,
20
26
  }
21
27
  end
22
28
 
@@ -1,5 +1,5 @@
1
1
  module Routemaster
2
2
  module Client
3
- VERSION = '3.2.0'
3
+ VERSION = '3.2.3'
4
4
  end
5
5
  end
@@ -49,6 +49,7 @@ describe Routemaster::CLI::Sub, type: :cli do
49
49
  allow(client).to receive(:monitor_subscriptions).and_return([
50
50
  Routemaster::Client::Subscription.new(
51
51
  'subscriber' => 'service--f000-b44r-b44r',
52
+ 'uuid' => 'service--af000-b44r-b44r',
52
53
  'callback' => 'https://serviced.dev',
53
54
  'topics' => %w[cats dogs],
54
55
  'events' => {
@@ -3,15 +3,18 @@ require 'routemaster/client/subscription'
3
3
 
4
4
  describe Routemaster::Client::Subscription do
5
5
  describe '#initialize' do
6
- let(:options) {{
7
- 'subscriber' => 'alice',
6
+ let(:options) {{
7
+ 'subscriber' => 'alice',
8
+ 'uuid' => 'sub-one--12345',
8
9
  'callback' => 'https://example.com/events',
10
+ 'max_events' => 100,
11
+ 'timeout' => 500,
9
12
  'topics' => %w[widgets],
10
13
  'events' => {},
11
14
  }}
12
15
 
13
16
  subject { described_class.new(options) }
14
-
17
+
15
18
  it 'passes' do
16
19
  expect { subject }.not_to raise_error
17
20
  end
@@ -487,9 +487,12 @@ describe Routemaster::Client do
487
487
  let(:expected_result) do
488
488
  [{
489
489
  subscriber: 'bob',
490
+ uuid: 'service--af000-b44r-b44r',
490
491
  callback: 'https://app.example.com/events',
491
492
  topics: ['widgets', 'kitten'],
492
- events: { sent: 1, queued: 100, oldest: 10_000 }
493
+ events: { sent: 1, queued: 100, oldest: 10_000 },
494
+ max_events: nil,
495
+ timeout: nil,
493
496
  }]
494
497
  end
495
498
 
@@ -498,7 +501,7 @@ describe Routemaster::Client do
498
501
 
499
502
  it 'expects a collection of subscriptions' do
500
503
  expect(perform.map(&:attributes)).to eql(expected_result)
501
- end
504
+ end
502
505
  end
503
506
 
504
507
  context 'the connection to the bus errors' do
@@ -510,7 +513,7 @@ describe Routemaster::Client do
510
513
  end
511
514
  end
512
515
  end
513
-
516
+
514
517
  describe '#reset_connection' do
515
518
  context 'can reset class vars to change params' do
516
519
  let(:instance_uuid) { SecureRandom.uuid }
@@ -520,15 +523,15 @@ describe Routemaster::Client do
520
523
  verify_ssl: false,
521
524
  lazy: true
522
525
  }}
523
-
526
+
524
527
  before do
525
528
  Routemaster::Client::Connection.reset_connection
526
529
  @stub = stub_request(:get, 'https://@bus.example.com/topics').with({basic_auth: [instance_uuid, 'x']})
527
530
  .to_return(status: 200, body: [{ name: "topic.name", publisher: "topic.publisher", events: "topic.get_count" }].to_json)
528
531
  end
529
-
532
+
530
533
  after { Routemaster::Client::Connection.reset_connection }
531
-
534
+
532
535
  it 'connects with new params' do
533
536
  subject.monitor_topics
534
537
  expect(@stub).to have_been_requested
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: 3.2.0
4
+ version: 3.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Letessier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-08 00:00:00.000000000 Z
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.7.0
156
+ rubygems_version: 2.6.14
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Client API for the Routemaster event bus