lhc 10.1.7 → 10.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lhc/request.rb +1 -1
- data/lib/lhc/version.rb +1 -1
- data/spec/request/ignore_errors_spec.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7262e45e8d7528a67008b60d00fb2a7dfe499fb6e149875447feadfcbf66013c
|
4
|
+
data.tar.gz: e5e3abfbe7fc0ad1bb734d0795cc2853a402e0beb6e077269ab2daf4b876a584
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6d48dfb5f7490814bb81e6ac030dd7205c65cb12e44f86ab63e045375e321dcb79c1ce3735576fec8ec916943d17e7bac66a3e65b38a098981ec0c4c8cb9b90
|
7
|
+
data.tar.gz: 7d8f8fe5c33d88a4c01da5e2174f504444e3a0c5be89be70491e685bd6012f5cf65f6e2fb38ccb21e11195f84360d1b1f68538668df21299f3498168cae4473b
|
data/lib/lhc/request.rb
CHANGED
@@ -15,7 +15,7 @@ class LHC::Request
|
|
15
15
|
attr_accessor :response, :options, :raw, :format, :error_handler, :errors_ignored
|
16
16
|
|
17
17
|
def initialize(options, self_executing = true)
|
18
|
-
self.errors_ignored = options.fetch(:ignored_errors, [])
|
18
|
+
self.errors_ignored = (options.fetch(:ignored_errors, []) || []).compact
|
19
19
|
self.options = format!(options.deep_dup || {})
|
20
20
|
self.error_handler = options.delete :error_handler
|
21
21
|
use_configured_endpoint!
|
data/lib/lhc/version.rb
CHANGED
@@ -46,4 +46,20 @@ describe LHC::Request do
|
|
46
46
|
}.to raise_error(LHC::NotFound)
|
47
47
|
end
|
48
48
|
end
|
49
|
+
|
50
|
+
context 'does not raise exception if ignored errors is set to nil' do
|
51
|
+
before { stub_request(:get, 'http://local.ch').to_return(status: 404) }
|
52
|
+
|
53
|
+
it "does not raise an error when ignored errors is set to array with nil" do
|
54
|
+
expect {
|
55
|
+
LHC.get('http://local.ch', ignored_errors: [nil])
|
56
|
+
}.to raise_error(LHC::NotFound)
|
57
|
+
end
|
58
|
+
|
59
|
+
it "does not raise an error when ignored errors is set to nil" do
|
60
|
+
expect {
|
61
|
+
LHC.get('http://local.ch', ignored_errors: nil)
|
62
|
+
}.to raise_error(LHC::NotFound)
|
63
|
+
end
|
64
|
+
end
|
49
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.1.
|
4
|
+
version: 10.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhc/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|