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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc2a0ad9e87dfbea8dd627048773654c8ca7195e
4
- data.tar.gz: 3b46c945d1f56819f7a4de73943a9c6fcdd9cbc7
3
+ metadata.gz: 3c1291e5d88bffe338e19ecd44dcc2e2feb27c69
4
+ data.tar.gz: 02f518c5e39d9baf451daa78efda7dc9121fc1e1
5
5
  SHA512:
6
- metadata.gz: 4f1e2821274d471b05e900c8a836a21fef71fd359ee286e8e962791d744f270a0fbb88b31b6098a2bf15021f06be2bad558db2d02be7c98e7ca56799212f2d5c
7
- data.tar.gz: e9b7bdfcb3ae5d4b04dc822639786709849761168d9f228c8fadbc7637ecb65710c3127da3dfc15404014d76818813f91f828841f3c910513b13c65694aca394
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 { |j| cache.set(params[:iban], j) }
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 || '{}').tap do |j|
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}"
@@ -1,5 +1,5 @@
1
1
  module Iban
2
2
  module Lookup
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iban-lookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Kampp