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 +4 -4
- data/README.md +7 -0
- data/lib/circuitbox/errors/service_failure_error.rb +4 -0
- data/lib/circuitbox/version.rb +1 -1
- data/test/service_failure_error_test.rb +13 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33b29e5d48278413b699741f144fdde38057ad46
|
4
|
+
data.tar.gz: f4d2897cf0f020aab8ace760976099104e308afc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/circuitbox/version.rb
CHANGED
@@ -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.
|
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-
|
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
|