excon 0.57.1 → 0.58.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of excon might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b250d4deeff7f680c70536eec915c1aba452b6a
4
- data.tar.gz: c165934b0eae34eac0def6e78c699b67ba6e4b17
3
+ metadata.gz: a5a871497c1ba80f94aff5ccd6f3f3955f1ba33e
4
+ data.tar.gz: 83bba479683ecfc6c5bc1917ea974ea2bf418af7
5
5
  SHA512:
6
- metadata.gz: 737323b247b35f151f21d4668ed1a9384dd1d949b1efe66be70a09dca41efd6acc788becbaba0b8d5615484d0e6d8b9969643e27eee2fde1ea959541e70c1fbc
7
- data.tar.gz: 627684deafe32665c089147f14b3b11f234beaaa4e2a9c4028823987bb840b37ab3deef725141bd2432c5d4a11290f6c6d283bbcdc7dc13d9a929bc7cfe135ba
6
+ metadata.gz: da3e5359120096074eee8d261b8f8e74bdc6ccb0726410cad9e136166028153d540c89676cdfeefa72fb9595245d4f1de8f1a0b40891f2269780ae612caf6344
7
+ data.tar.gz: f38359c5408dc80744d7ccad319521fb81d96a4618b86411ed2db72be1d1a351c7ee3b8a8d3c4de92c38c769042a2e9de4300497b15f652c17ff9f521d85ca05
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- excon (0.57.1)
4
+ excon (0.58.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -298,4 +298,4 @@ DEPENDENCIES
298
298
  unicorn
299
299
 
300
300
  BUNDLED WITH
301
- 1.15.1
301
+ 1.15.3
data/README.md CHANGED
@@ -136,6 +136,10 @@ connection.request(:idempotent => true)
136
136
  # this request can be repeated safely, retry up to 6 times
137
137
  connection.request(:idempotent => true, :retry_limit => 6)
138
138
 
139
+ # this request can be repeated safely, retry up to 6 times and sleep 5 seconds
140
+ # in between each retry
141
+ connection.request(:idempotent => true, :retry_limit => 6, :retry_interval => 5)
142
+
139
143
  # set longer read_timeout (default is 60 seconds)
140
144
  connection.request(:read_timeout => 360)
141
145
 
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'excon'
16
- s.version = '0.57.1'
17
- s.date = '2017-06-30'
16
+ s.version = '0.58.0'
17
+ s.date = '2017-08-01'
18
18
  s.rubyforge_project = 'excon'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -46,6 +46,7 @@ module Excon
46
46
  # @option params [String] :ciphers Only use the specified SSL/TLS cipher suites; use OpenSSL cipher spec format e.g. 'HIGH:!aNULL:!3DES' or 'AES256-SHA:DES-CBC3-SHA'
47
47
  # @option params [String] :proxy Proxy server; e.g. 'http://myproxy.com:8888'
48
48
  # @option params [Fixnum] :retry_limit Set how many times we'll retry a failed request. (Default 4)
49
+ # @option params [Fixnum] :retry_interval Set how long to wait between retries. (Default 0)
49
50
  # @option params [Class] :instrumentor Responds to #instrument as in ActiveSupport::Notifications
50
51
  # @option params [String] :instrumentor_name Name prefix for #instrument events. Defaults to 'excon'
51
52
  def initialize(params = {})
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  module Excon
3
3
 
4
- VERSION = '0.57.1'
4
+ VERSION = '0.58.0'
5
5
 
6
6
  CR_NL = "\r\n"
7
7
 
@@ -57,6 +57,7 @@ module Excon
57
57
  :response_block,
58
58
  :retries_remaining, # used internally
59
59
  :retry_limit,
60
+ :retry_interval,
60
61
  :versions,
61
62
  :write_timeout
62
63
  ]
@@ -48,7 +48,6 @@ or:
48
48
  class Timeout < Error; end
49
49
  class ResponseParse < Error; end
50
50
  class ProxyParse < Error; end
51
- class ProxyConnection < Error; end
52
51
 
53
52
  # Base class for HTTP Error classes
54
53
  class HTTPStatus < Error
@@ -20,6 +20,9 @@ module Excon
20
20
 
21
21
  if datum[:idempotent] && [Excon::Errors::Timeout, Excon::Errors::SocketError,
22
22
  Excon::Errors::HTTPStatusError].any? {|ex| datum[:error].kind_of?(ex) } && datum[:retries_remaining] > 1
23
+
24
+ sleep(datum[:retry_interval]) if datum[:retry_interval]
25
+
23
26
  # reduces remaining retries, reset connection, and restart request_call
24
27
  datum[:retries_remaining] -= 1
25
28
  connection = datum.delete(:connection)
@@ -1,20 +1,20 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDUjCCAjqgAwIBAgIJALg/4+L3DXWpMA0GCSqGSIb3DQEBCwUAMCQxEjAQBgNV
3
- BAMTCTEyNy4wLjAuMTEOMAwGA1UEChMFZXhjb24wHhcNMTcwNjMwMjA1MDM5WhcN
4
- MTgwNjMwMjA1MDM5WjAkMRIwEAYDVQQDEwkxMjcuMC4wLjExDjAMBgNVBAoTBWV4
5
- Y29uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0AiH7Y/9hEd8fmEv
6
- 4jsl0L9fzdNywRGLorB3apvxcpHReAG0Dy6M9CeJTtt2Uk5oMN7BJQYrnHdTeXx2
7
- UqCLZMMq9a66BCIbYBfc/rGhs3tXIOQFl+ct9yioRCLUNiOnkBkOra/po3j3AF5T
8
- QvVVB6+oTvPEqWMZBSonaV1FFZIm/a4hs20bwUaAnSg5MEFOco/0mwwBqXnBeG+u
9
- vK9L61IPDbY2Er4E+mlKOWR+JQFv2g0Vg1ppgNH/w9tuktjDMRG5YIn/K6kFigyL
10
- 6hyhz3Tjz7KLP6d1uq8oBf71ZmoXPQV0GoTeP0IXE3qY/pCNXzMuyqVfQZ/IGBfQ
11
- ysu5cwIDAQABo4GGMIGDMB0GA1UdDgQWBBQGOWyzvi/dqwuZVod5mqDnRo7amzBU
12
- BgNVHSMETTBLgBQGOWyzvi/dqwuZVod5mqDnRo7am6EopCYwJDESMBAGA1UEAxMJ
13
- MTI3LjAuMC4xMQ4wDAYDVQQKEwVleGNvboIJALg/4+L3DXWpMAwGA1UdEwQFMAMB
14
- Af8wDQYJKoZIhv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LAKTHGoJ9kHTw0l5uDrXvmZUljYD3Frcz6
22
+ pHEbFe/2eReuRRnwdp5BQ5cX3fOVWjln203hHwQSmFFHwrknEMRI5bbY6b8M4s6R
23
+ nBo6mIxpjCnkY2Xqk4AyQsfngjDJDz7YD0phW16yNV9GvRJuvQ2zQF1DXfa6b3gb
24
+ ktjV4QABAoGBAIiBo573ndoHuYnU0qXT9l0UpgtKsdejHdHoYWPEVo7BN5jafZGo
25
+ m2nNWaHUG0VN1oa+oZAl3ECl0fgIKOZo/o2DFcQbGTjP6oPEUPJOzNezSnRoTgju
26
+ wSR2L0BlSvOUkvZDl4pmKFlB7WbMEgXC7GbzYibeu0U/hZzmIvkl/Ua8
27
27
  -----END RSA PRIVATE KEY-----
@@ -128,4 +128,37 @@ Shindo.tests('Excon request idempotencey') do
128
128
  response.status
129
129
  end
130
130
 
131
+ tests("Retry limit and sleep in constructor with socket erroring first 2 times").returns(200) do
132
+ run_count = 0
133
+ Excon.stub({:method => :get}) { |params|
134
+ run_count += 1
135
+ if run_count <= 2 # First 5 calls fail.
136
+ raise Excon::Errors::SocketError.new(Exception.new "Mock Error")
137
+ else
138
+ {:body => params[:body], :headers => params[:headers], :status => 200}
139
+ end
140
+ }
141
+
142
+
143
+ # NOTE: A short :retry_interval will avoid slowing down the tests.
144
+ response = @connection.request(:method => :get, :idempotent => true, :path => '/some-path', :retry_limit => 3, :retry_interval => 0.1)
145
+ response.status
146
+ end
147
+
148
+ tests("Retry limit and sleep in constructor with socket erroring first 2 times").raises(Excon::Errors::SocketError) do
149
+ run_count = 0
150
+ Excon.stub({:method => :get}) { |params|
151
+ run_count += 1
152
+ if run_count <= 2 # First 5 calls fail.
153
+ raise Excon::Errors::SocketError.new(Exception.new "Mock Error")
154
+ else
155
+ {:body => params[:body], :headers => params[:headers], :status => 200}
156
+ end
157
+ }
158
+
159
+ # NOTE: A short :retry_interval will avoid slowing down the tests.
160
+ response = @connection.request(:method => :get, :idempotent => true, :path => '/some-path', :retry_limit => 2, :retry_interval => 0.1)
161
+ response.status
162
+ end
163
+
131
164
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.57.1
4
+ version: 0.58.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dpiddy (Dan Peterson)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-06-30 00:00:00.000000000 Z
13
+ date: 2017-08-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec