onfido 2.0.1 → 2.0.2

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: dac270e812885659e0a16e9a2a65c934de0b82c5df4f3422755665094e261d93
4
- data.tar.gz: f2f66564aa340e239fde067fcff022d0b8db316fbb472e55d429d83dc051b4af
3
+ metadata.gz: 7983a2913b8ae4c7a1e53d92b8b62028b57e6e05705f6e5cef13028e77d7a30d
4
+ data.tar.gz: e923fe60b61214229d3546868a82128607147fb462a7966552ebc67e5d1263e8
5
5
  SHA512:
6
- metadata.gz: 3d14985d14c7fab0ddd535154cdb9c67d5bc7c4b70405d70faec190e7fa87fd5efff3248264261137f5db97371aebc41dd2e6fc03118b2cca402f50285986420
7
- data.tar.gz: 5f8af0136caaba37b6a5c37c5f912e01f89d5b79f03e53fa5eccb442cde2ca67dd5999228d815c13e8161bdc8ecdf4a134e8d24749eff4c17f2503e22fe332b3
6
+ metadata.gz: 2ab79a44f5d86fbb3fd17c56e3d876ce256f95f88508300d571ebd6a068973323082f7c1a32cf1edd44bbcec5351a073363c08d4950cae6e0510e54263cff448
7
+ data.tar.gz: a02418a2e5db122bf0fcf3bce2d5547033e4c8e71b18f7a39006674e0a55cd46fb658986224c6f025c3b028e8bac48d19370c903abaa41e874456420ab2c0bf2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v2.0.2, 10 June 2021
2
+
3
+ - Add error coverage for errors RestClient:BadGateway
4
+
1
5
  ## v2.0.1, 27 May 2021
2
6
 
3
7
  - Remove onfido/null_logger
@@ -113,6 +113,9 @@ module Onfido
113
113
  "Could not verify Onfido's SSL certificate. Please make sure " \
114
114
  'that your network is not intercepting certificates. '
115
115
 
116
+ when RestClient::BadGateway
117
+ "Could not connect to Onfido. Server may be overloaded." \
118
+
116
119
  when SocketError
117
120
  'Unexpected error when trying to connect to Onfido. ' \
118
121
  'You may be seeing this message because your DNS is not working. ' \
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onfido
4
- VERSION = '2.0.1'
4
+ VERSION = '2.0.2'
5
5
  end
@@ -51,6 +51,19 @@ describe Onfido::Resource do
51
51
  end
52
52
  end
53
53
 
54
+ context 'RestClient : BadGateway' do
55
+ before do
56
+ allow(RestClient::Request)
57
+ .to receive(:execute)
58
+ .and_raise(RestClient::BadGateway)
59
+ end
60
+
61
+ it 'raises a ConnectionError' do
62
+ expect { resource.get(path: '') }
63
+ .to raise_error(Onfido::ConnectionError, /Could not connect/)
64
+ end
65
+ end
66
+
54
67
  context 'broken connection' do
55
68
  before do
56
69
  allow(RestClient::Request)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onfido
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Onfido
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-27 00:00:00.000000000 Z
11
+ date: 2021-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec