mailerlite 1.10.0 → 1.11.0

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: 9ccc9f1ff0482360a7e4a1036ff3f67d646c3623402a1c05a777e3457a392e2e
4
- data.tar.gz: 1c70b2e1e35e22c93d70d6edc623a5975ef735be37b23cfd295450a09f9a97ce
3
+ metadata.gz: 2566cc48dc509e5ae5b9984347813da13573ab846edb846e498d54188fb92b3e
4
+ data.tar.gz: 7a7006913f5787884709151a9f32fcd9b9ffc5463951e132a8aa074e6d32da40
5
5
  SHA512:
6
- metadata.gz: 69a04fe0dc9a5487e146102ddc7fe7debe86a1624f8d651856f0f2b33a0b2a8ed0bc9b8dfc3b90bb16c58eb0a7f454bc395ef62ab4387a4b167270e8147b420a
7
- data.tar.gz: 04c904fc8dcb9a1cb200c098c0fc2e9cedc7e778fb6430299a1b2a3cfd8465ac8a66628d4f0e53c89ab1f0c0b1ca6171089c41d80e88ab4c68111dc9fb8c1af4
6
+ metadata.gz: 32ed1cef86c7256be4d286199ef4e0bd76e48664866189bdab9e08338ebf86bc4fc0726453b866ae913719072560582d1993f27699f2920ef30adc37acc1a229
7
+ data.tar.gz: aad3f7cd3244010bd9bd2826e7ff8743fee62d97252572b605ccc9e58384f43f994317a7c68f013c03c5ccd96727ce04d4cbc9b34794790139736ccde057dbfa
data/README.md CHANGED
@@ -40,6 +40,7 @@ Or create file under `config/initializers/mailerlite.rb`
40
40
  ```ruby
41
41
  MailerLite.configure do |config|
42
42
  config.api_key = 'my-secret-api-key'
43
+ # config.timeout = 10
43
44
  end
44
45
  ```
45
46
 
@@ -26,8 +26,11 @@ module MailerLite
26
26
  #
27
27
  # @param options [Hash] A customizable set of options.
28
28
  # @option options [String] :api_key API Key provider from MailerLite.
29
+ # @option options [String] :timeout optional open/read timeout Integer in
30
+ # seconds
29
31
  def initialize(options = {})
30
32
  config.api_key = options[:api_key] if options[:api_key]
33
+ config.timeout = options[:timeout] if options[:timeout]
31
34
  end
32
35
 
33
36
  # @return [Configuration]
@@ -9,7 +9,7 @@ module MailerLite
9
9
  # Default User Agent header string.
10
10
  USER_AGENT = "MailerLite Ruby v#{MailerLite::VERSION}"
11
11
 
12
- attr_accessor :api_key
12
+ attr_accessor :api_key, :timeout
13
13
  attr_writer :url, :user_agent
14
14
 
15
15
  # Takes url provided from configuration or uses default one.
@@ -57,6 +57,8 @@ module MailerLite
57
57
  url: client.config.url,
58
58
  builder: middleware
59
59
  }
60
+ timeout = client.config.timeout
61
+ conn_opts[:request] = { timeout: timeout } unless timeout.nil?
60
62
 
61
63
  Faraday.new(conn_opts)
62
64
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module MailerLite
4
4
  # @return [String] Version number.
5
- VERSION = '1.10.0'
5
+ VERSION = '1.11.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailerlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justas Palumickas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-21 00:00:00.000000000 Z
11
+ date: 2020-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday