routemaster-drain 3.5.0 → 3.5.1

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
- SHA1:
3
- metadata.gz: 2dbc8f089aacef77f20bf0658dd4710496e1b1dd
4
- data.tar.gz: ec8cb8becb16443e0269fbb23f77e03dcbf57687
2
+ SHA256:
3
+ metadata.gz: 6dd1c94d3030edaf763c7fcf700d2894e604ff7d44ee09f6df2fdc5770ce0e00
4
+ data.tar.gz: 56dd0fe8f7f30d1e66eab9e94e826bbfed5c9496e2b19da056aa5a52bf73513b
5
5
  SHA512:
6
- metadata.gz: 6d4f31610fb790d5be366c3fc04fe36879e5baa79b71053d54dbb8c29a80dd3aa27a4419aa371237c14762091bffa4d8a2e1a5e216340111977b59249df16576
7
- data.tar.gz: 8b775caa74d8d9d3224219e95928464c510ad017760f18da6d9223dac4cabbf1237dc2853a0873f34de650acd45197b6b1ee6f6bbd2c5508ccd03d6a73f01bbc
6
+ metadata.gz: d26b0547dda1867f0930c15d9c03bc29332e7ba76edd2f5c992008fad86b371515b32095a359b8d3654a104b0d677c80c188ed42845059f91411606492565ca7
7
+ data.tar.gz: f20cdcfb5d63a48eea8b18d0270195fcebdad381593cf44e26ab58881b14e3fe5c04105aae0f6114d71da7018a909daf38b055cf8260d3cc396a8d4304012413
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  _A description of your awesome changes here!_
4
4
 
5
+ ### 3.5.1 (2018-05-01)
6
+
7
+ Bug fixes:
8
+
9
+ - Fix the issue with parsing body in fatal error message. (#78)
10
+
5
11
  ### 3.5.0 (2018-03-07)
6
12
 
7
13
  Features:
@@ -1,5 +1,5 @@
1
1
  module Routemaster
2
2
  module Drain
3
- VERSION = '3.5.0'.freeze
3
+ VERSION = '3.5.1'.freeze
4
4
  end
5
5
  end
@@ -53,7 +53,7 @@ module Routemaster
53
53
 
54
54
  class FatalResource < BaseError
55
55
  def message
56
- "Fatal Resource Error. body: #{body}, url: #{env.url}, method: #{env.method}"
56
+ "Fatal Resource Error. body: #{env.body}, url: #{env.url}, method: #{env.method}"
57
57
  end
58
58
  end
59
59
 
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ require 'routemaster/errors'
3
+
4
+ describe Routemaster::Errors::FatalResource do
5
+ let(:body) { "{ \"foo\": \"bar\" }" }
6
+ let(:env) { double(body: body, url: '/foo/bar', method: 'GET') }
7
+ subject(:error) { described_class.new(env) }
8
+
9
+ describe "#message" do
10
+ subject { error.message }
11
+ it { is_expected.to eq "Fatal Resource Error. body: { \"foo\": \"bar\" }, url: /foo/bar, method: GET" }
12
+
13
+ context 'even if the body is string' do
14
+ let(:body) { "foobar" }
15
+ it { is_expected.to eq "Fatal Resource Error. body: foobar, url: /foo/bar, method: GET" }
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: routemaster-drain
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Letessier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-07 00:00:00.000000000 Z
11
+ date: 2018-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -236,6 +236,7 @@ files:
236
236
  - spec/routemaster/drain/caching_spec.rb
237
237
  - spec/routemaster/drain/mapping_spec.rb
238
238
  - spec/routemaster/drain/terminator_spec.rb
239
+ - spec/routemaster/errors_spec.rb
239
240
  - spec/routemaster/event_index_spec.rb
240
241
  - spec/routemaster/integration/api_client_spec.rb
241
242
  - spec/routemaster/integration/cache_spec.rb
@@ -286,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
287
  version: '0'
287
288
  requirements: []
288
289
  rubyforge_project:
289
- rubygems_version: 2.6.11
290
+ rubygems_version: 2.7.6
290
291
  signing_key:
291
292
  specification_version: 4
292
293
  summary: Event receiver for the Routemaster bus
@@ -304,6 +305,7 @@ test_files:
304
305
  - spec/routemaster/drain/caching_spec.rb
305
306
  - spec/routemaster/drain/mapping_spec.rb
306
307
  - spec/routemaster/drain/terminator_spec.rb
308
+ - spec/routemaster/errors_spec.rb
307
309
  - spec/routemaster/event_index_spec.rb
308
310
  - spec/routemaster/integration/api_client_spec.rb
309
311
  - spec/routemaster/integration/cache_spec.rb