mollie-api-ruby 4.6.1 → 4.6.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: 9a969ace9f91021bb0b0de1a13a49ac9f9c01ea75130d52b47b3bc67db7c5949
4
- data.tar.gz: 5634145c99c49325bae7c20537227859df74c4aa4ffcdbd04d117e596909d484
3
+ metadata.gz: 239cb83379085baf41a992d159a0d9d04d14ad98b4420f369fbb4a661c3d98a7
4
+ data.tar.gz: e7eb83f458608cefa2d2637372ddaf1382a667ce26dcdc6b17fc9cc9ccb53257
5
5
  SHA512:
6
- metadata.gz: 1c0dfd1da1471349c834fe15580ea55091dd0d1d23b2cac9366601158e24ef7f291269ffd99c6de310f6402760135f962d124360380f450441a45201d96825bc
7
- data.tar.gz: 185de436fdee7ef422e5dc8a8605e2dfdd2f893ca667ac654e794b8a5ae435542d963b3cc19bd44ca0e37a8a7aa3e8aa22e3189ca472170e65467c5ae325921e
6
+ metadata.gz: 4fb66ad436eddf5711ff2a3a5be4d1d77a27e3e41138e51af8deee84993418f1d7355abca6c79f1b1e31886ac4bf07b5faf60743288d7abf98f4cc1a520e76f2
7
+ data.tar.gz: 5f0ecba60b5e49674bb1bf8b06663f62c7c1e515ff0d8e652176bd41dd36c70b133f09852d10e3ab730ba0fe34bc4755da69f9ff0b8eb1335f278d03fd377392
data/README.md CHANGED
@@ -58,6 +58,9 @@ Create an initializer and add the following line:
58
58
  ```ruby
59
59
  Mollie::Client.configure do |config|
60
60
  config.api_key = '<your-api-key>'
61
+ # Timeouts (default - 60)
62
+ # config.open_timeout = 60
63
+ # config.read_timeout = 60
61
64
  end
62
65
  ```
63
66
 
data/lib/mollie/client.rb CHANGED
@@ -11,10 +11,12 @@ module Mollie
11
11
  end
12
12
 
13
13
  class Configuration
14
- attr_accessor :api_key
14
+ attr_accessor :api_key, :open_timeout, :read_timeout
15
15
 
16
16
  def initialize
17
17
  @api_key = ''
18
+ @open_timeout = 60
19
+ @read_timeout = 60
18
20
  end
19
21
  end
20
22
 
@@ -76,11 +78,13 @@ module Mollie
76
78
  path += "?#{build_nested_query(camelized_query)}"
77
79
  end
78
80
 
79
- uri = URI.parse(api_endpoint)
80
- client = Net::HTTP.new(uri.host, uri.port)
81
- client.use_ssl = true
82
- client.verify_mode = OpenSSL::SSL::VERIFY_PEER
83
- client.ca_file = (File.expand_path '../cacert.pem', File.dirname(__FILE__))
81
+ uri = URI.parse(api_endpoint)
82
+ client = Net::HTTP.new(uri.host, uri.port)
83
+ client.use_ssl = true
84
+ client.verify_mode = OpenSSL::SSL::VERIFY_PEER
85
+ client.ca_file = (File.expand_path '../cacert.pem', File.dirname(__FILE__))
86
+ client.read_timeout = self.class.configuration.read_timeout
87
+ client.open_timeout = self.class.configuration.open_timeout
84
88
 
85
89
  case http_method
86
90
  when 'GET'
@@ -1,3 +1,3 @@
1
1
  module Mollie
2
- VERSION = '4.6.1'.freeze
2
+ VERSION = '4.6.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mollie-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.1
4
+ version: 4.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mollie B.V.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-20 00:00:00.000000000 Z
11
+ date: 2019-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake