iban-lookup 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@ require 'faraday'
10
10
  #
11
11
  module IbanLookup
12
12
  class Configuration
13
- attr_accessor :api_key, :service, :cache, :logger
13
+ attr_accessor :api_key, :service, :cache, :logger, :ssl
14
14
 
15
15
  def initialize
16
16
  @logger ||= Logger.new(STDOUT)
@@ -69,9 +69,11 @@ module IbanLookup
69
69
  end
70
70
 
71
71
  def response
72
- url = "#{URL.chomp('/')}/clients/api/calc-api.php?#{params.to_query}"
73
- logger.debug "IBAN url: #{url}"
74
- Faraday.get(url).tap do |res|
72
+ path = "/clients/api/calc-api.php?#{params.to_query}"
73
+ options = {}
74
+ options[:ssl] = IbanLookup.configuration.ssl if IbanLookup.configuration.ssl != nil
75
+ logger.debug "IBAN url: #{path}"
76
+ Faraday.new(URL, options).get(path).tap do |res|
75
77
  logger.debug "IBAN response status: #{res.status}"
76
78
  logger.debug "IBAN response body: #{res.body}"
77
79
  end
@@ -1,5 +1,5 @@
1
1
  module Iban
2
2
  module Lookup
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iban-lookup
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Emil Kampp