iban_client 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iban_client/errors.rb +4 -4
- data/lib/iban_client/iban.rb +3 -1
- data/lib/iban_client/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7df8de7aae7c779d5551a620419a77a91d1cfa4
|
4
|
+
data.tar.gz: f062a2997b2f76ec7076b2e7cd5b757a42f711af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b2a5fc57289573cc95a3b3c0397eedc2b2dcbff07e528829152e18e61263bb92d15beda2a763f6b3af21b6949dbeb2684e75f055f74258bb88228d8c1e4352a
|
7
|
+
data.tar.gz: 10a5349ba36cfd9ef64a3c4be55bf14fd321d08a154a4b009d9dc5b5e14df468805dc8dfe71cb2cb55e96aa47f6c31dc3f359a3a6f757c032d58414bc07ccc3f
|
data/lib/iban_client/errors.rb
CHANGED
@@ -8,17 +8,17 @@ module IbanClient
|
|
8
8
|
end
|
9
9
|
|
10
10
|
class RequestError < Error
|
11
|
-
attr_reader :
|
11
|
+
attr_reader :response
|
12
12
|
|
13
|
-
def initialize(iban:,
|
14
|
-
@
|
13
|
+
def initialize(iban:, response:)
|
14
|
+
@response = response
|
15
15
|
super(iban: iban)
|
16
16
|
end
|
17
17
|
|
18
18
|
def message
|
19
19
|
"#{initial_error.message}\n"\
|
20
20
|
"Request iban: #{iban}\n"\
|
21
|
-
"Response: #{
|
21
|
+
"Response: #{response}"
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
data/lib/iban_client/iban.rb
CHANGED
@@ -52,7 +52,7 @@ module IbanClient
|
|
52
52
|
timeout: IbanClient.timeout
|
53
53
|
)
|
54
54
|
rescue RestClient::ExceptionWithResponse => err
|
55
|
-
raise IbanClient::RequestError.new(iban: iban,
|
55
|
+
raise IbanClient::RequestError.new(iban: iban, response: err.response)
|
56
56
|
end
|
57
57
|
|
58
58
|
def params
|
@@ -74,6 +74,8 @@ module IbanClient
|
|
74
74
|
def handle_result(&block)
|
75
75
|
raise IbanClient::AccountError.new(iban: iban, errors: api_errors) if api_errors.count > 0
|
76
76
|
yield
|
77
|
+
rescue JSON::ParserError => err
|
78
|
+
raise IbanClient::RequestError.new(iban: iban, response: request)
|
77
79
|
end
|
78
80
|
end
|
79
81
|
end
|
data/lib/iban_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iban_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Pochet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: 1.8.11
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.6.14.1
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Iban.com client
|