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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe73de18018f898266e7bd978cdf55a2e38a6f3bc8d623ba54aff8d0692e050d
4
- data.tar.gz: 3f224a4bf08673247ca7b0c844d5fac704bb6187f7ff4151a91533d9c422cca9
3
+ metadata.gz: 7262e45e8d7528a67008b60d00fb2a7dfe499fb6e149875447feadfcbf66013c
4
+ data.tar.gz: e5e3abfbe7fc0ad1bb734d0795cc2853a402e0beb6e077269ab2daf4b876a584
5
5
  SHA512:
6
- metadata.gz: eedbda34d438ce8581e711e2c9f6d4cad9f3c5e188ff42ece46e1cf4f8904b3eab0047d11c61ed731ad15606e2e9dca6487458037d6adceb9ef28f120df66b9e
7
- data.tar.gz: 705e45b749faa35fe6bb6b0a71512808cb8507b21c21bd19da36ba8df5d14ca4c550cebba6014fdfb22e92fca77a6fbab4b7be33e0905993b539f5ae7b15b94d
6
+ metadata.gz: e6d48dfb5f7490814bb81e6ac030dd7205c65cb12e44f86ab63e045375e321dcb79c1ce3735576fec8ec916943d17e7bac66a3e65b38a098981ec0c4c8cb9b90
7
+ data.tar.gz: 7d8f8fe5c33d88a4c01da5e2174f504444e3a0c5be89be70491e685bd6012f5cf65f6e2fb38ccb21e11195f84360d1b1f68538668df21299f3498168cae4473b
@@ -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!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LHC
4
- VERSION ||= '10.1.7'
4
+ VERSION ||= '10.1.8'
5
5
  end
@@ -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.7
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-03 00:00:00.000000000 Z
11
+ date: 2019-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport