circuitbox 0.10.2 → 0.10.3

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: c55691f6ad22c899ad8425c2d412290ac47e0ede
4
- data.tar.gz: c37774032e6e84cb0dd2c23ab9e87ef48ce22fe5
3
+ metadata.gz: 33b29e5d48278413b699741f144fdde38057ad46
4
+ data.tar.gz: f4d2897cf0f020aab8ace760976099104e308afc
5
5
  SHA512:
6
- metadata.gz: 00e370cf4194cafc3e9842c3077f1783e377466c2a2b186589ede61bc1f85faf9a47ee944ff8e29fa78db7c02760bb429a6f511301d24075fdcfcf195524f03e
7
- data.tar.gz: 40a10dc8632d27a7da4b79a78288ff10494a90fd2a4b8db7aac8d41400e2b0d00e4042dab4564d49aeec48f8314b39f094ce0b783e00d4c4f2342bb761d9d35a
6
+ metadata.gz: 69b31ae9c7fa29fb6400c40da41baeb5d63d6cc625d82c64c00aa0a2cf7eaaf5a1d02a184672a5135481310d9be7ee4ef949b38b0763d99814c2c5aa3f89ea70
7
+ data.tar.gz: aad5e9f545af39c9fbd792d8b76c8c06202461b32c7113522115cda8da6095bb66cdaaac6591e5edbc8e69ead22ba96c611ee9523efd589f3f16b66a22577992
data/README.md CHANGED
@@ -213,6 +213,13 @@ c.use Circuitbox::FaradayMiddleware, open_circuit: lambda { |response| response.
213
213
 
214
214
  ### version next
215
215
 
216
+ ### v0.10.3
217
+ - Circuitbox::ServiceFailureError wraps the original exception that was raised.
218
+ The behaviour for to_s wasn't exposing this information and was returning the
219
+ name of class "Circuitbox::ServiceFailureError". Change the behaviour for to_s
220
+ to indicate this exception is a wrapper around the original exception.
221
+ [sherrry](https://github.com/sherrry)
222
+
216
223
  ### v0.10.2
217
224
  - Faraday middleware passes two arguments to the `default_value` callback, not
218
225
  just one. First argument is still the error response from Faraday if there is
@@ -7,5 +7,9 @@ class Circuitbox
7
7
  @original = exception
8
8
  end
9
9
 
10
+ def to_s
11
+ "#{self.class.name} wrapped: #{original}"
12
+ end
13
+
10
14
  end
11
15
  end
@@ -1,3 +1,3 @@
1
1
  class Circuitbox
2
- VERSION='0.10.2'
2
+ VERSION='0.10.3'
3
3
  end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class ServiceFailureErrorTest < Minitest::Test
4
+ class SomeOtherError < StandardError; end;
5
+
6
+ describe 'to_s' do
7
+ it 'includes message for wrapped exception' do
8
+ some_error = SomeOtherError.new("some other error")
9
+ ex = Circuitbox::ServiceFailureError.new('test', some_error)
10
+ assert_equal "Circuitbox::ServiceFailureError wrapped: #{some_error}", ex.to_s
11
+ end
12
+ end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: circuitbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fahim Ferdous
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-08 00:00:00.000000000 Z
11
+ date: 2015-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -238,6 +238,7 @@ files:
238
238
  - test/integration/faraday_middleware_test.rb
239
239
  - test/integration_helper.rb
240
240
  - test/notifier_test.rb
241
+ - test/service_failure_error_test.rb
241
242
  - test/test_helper.rb
242
243
  homepage: ''
243
244
  licenses:
@@ -270,4 +271,5 @@ test_files:
270
271
  - test/integration/faraday_middleware_test.rb
271
272
  - test/integration_helper.rb
272
273
  - test/notifier_test.rb
274
+ - test/service_failure_error_test.rb
273
275
  - test/test_helper.rb