iban-lookup 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iban-lookup.rb +5 -4
- data/lib/iban-lookup/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c1291e5d88bffe338e19ecd44dcc2e2feb27c69
|
4
|
+
data.tar.gz: 02f518c5e39d9baf451daa78efda7dc9121fc1e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ee94c8e87ff2a5b1e763f4b850cde9f6116025d62e8a466abdba670a53119c142e2481451f11c6009b2082af3bb8cd8f0ec082bd1241e40b19e3a7722aaf477
|
7
|
+
data.tar.gz: af8f9faf5eac925327dff9bed6a797b04e54c86b755ad6e2f373288e72f5143edd7386069e1f8e086012534945f7f0f2b96ff29fb00fcb57bbd81081227f1910
|
data/lib/iban-lookup.rb
CHANGED
@@ -55,13 +55,14 @@ module IbanLookup
|
|
55
55
|
@json ||= begin
|
56
56
|
body = if cache
|
57
57
|
cache.get(params[:iban]).presence ||
|
58
|
-
response.body.presence.tap
|
58
|
+
response.body.presence.tap do |j|
|
59
|
+
logger.debug "IBAN response body: #{j}"
|
60
|
+
cache.set(params[:iban], j)
|
61
|
+
end
|
59
62
|
else
|
60
63
|
response.body.presence
|
61
64
|
end
|
62
|
-
JSON.parse(body || '{}')
|
63
|
-
logger.debug "IBAN response: #{j}"
|
64
|
-
end
|
65
|
+
JSON.parse(body || '{}')
|
65
66
|
end
|
66
67
|
rescue => e
|
67
68
|
logger.error "Unable to extract JSON from IBAN response (#{e.class}): #{e.message}"
|
data/lib/iban-lookup/version.rb
CHANGED