net-http-persistent 2.9 → 2.9.1

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: ea7002c40a540ea921855f2b04c1862c0e501bb9
4
- data.tar.gz: 2e542b3cbdc4752799409f8dd1ecbbbb1ee84f0a
3
+ metadata.gz: 55d2e4859498dd8d729452db6118d77d13535bd1
4
+ data.tar.gz: 7d1a5487a20e2d8d44be10241010e7022af2262f
5
5
  SHA512:
6
- metadata.gz: 591fb46b7ac365d1268935f44a449cdd4cfc56c64398d3e258baf7cd5e215fd213e42f5f9fcc5fdc032daae2dc93a34404833dd3a9afc6dc0ed4828547709f11
7
- data.tar.gz: 3865436c02a8efecc81c335bb603d1ca2b540a3dde995df17f7dc844e38d0715279a02d4cf77128bff9f837380530e3d3487e3a396e05a6e1fa4936b904ea7cf
6
+ metadata.gz: 736f79380094d6b6a84b923c6e8251ee75e95b66185bb072ba7f19450263c0e96b95e0ce92622050cddb3a5dc8e9e2fc3c04ab82f1787e3524b22902f340d9b9
7
+ data.tar.gz: 0b0c2b885b275bb98e64e22d4c96869496ff3602e17c9be2b846015293354646d4685204d7b32ed56d79a55dd9633fd84bb8b09fc49fb83448cae72a849dd9e4
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,8 +1,18 @@
1
+ === 2.9.1 / 2014-01-22
2
+
3
+ * Bug fixes
4
+ * Added license to gemspec. Issue #47 by Benjamin Fleischer
5
+ * Set Net::HTTP#keep_alive_timeout when supported by ruby. Pull request #53
6
+ by Dylan Thacker-Smith.
7
+ * The backtrace is preserved for errors in #reset to help with debugging.
8
+ Issue #41 by Andrew Cholakian.
9
+
1
10
  === 2.9 / 2013-07-24
2
11
 
3
12
  * Minor enhancement
4
- * Added max_requests to avoid ECONNRESET for a server that allows a limited
5
- number of requests on a connection. Pull request #42 by James Tucker.
13
+ * Added Net::HTTP::Persistent#max_requests to avoid ECONNRESET for a server
14
+ that allows a limited number of requests on a connection. Pull request
15
+ #42 by James Tucker.
6
16
  * Request failures are now raised with the backtrace of the original
7
17
  exception. This gives better insight into the reason for the failure.
8
18
  See #41 by Andrew Cholakian.
@@ -17,8 +27,8 @@
17
27
  * Requests retried by ruby 2.x are no longer retried by net-http-persistent.
18
28
  * Finish the connection if an otherwise unhandled exception happens during a
19
29
  request. Bug #46 by Mark Oude Veldhuis.
20
- * detect_idle_timeout now assumes a StandardError indicates the idle timeout
21
- has been found. Bug #43 by James Tucker.
30
+ * Net::HTTP::Persistent::detect_idle_timeout now assumes a StandardError
31
+ indicates the idle timeout has been found. Bug #43 by James Tucker.
22
32
 
23
33
  === 2.8 / 2012-10-17
24
34
 
data/Rakefile CHANGED
@@ -7,14 +7,18 @@ Hoe.plugin :git
7
7
  Hoe.plugin :minitest
8
8
  Hoe.plugin :travis
9
9
 
10
- Hoe.spec 'net-http-persistent' do |p|
10
+ Hoe.spec 'net-http-persistent' do
11
11
  developer 'Eric Hodel', 'drbrain@segment7.net'
12
12
 
13
13
  self.readme_file = 'README.rdoc'
14
14
  self.extra_rdoc_files += Dir['*.rdoc']
15
15
 
16
+ license 'MIT'
17
+
16
18
  rdoc_locations <<
17
19
  'docs.seattlerb.org:/data/www/docs.seattlerb.org/net-http-persistent/'
20
+
21
+ dependency 'minitest', '~> 5.2', :development
18
22
  end
19
23
 
20
24
  # vim: syntax=Ruby
@@ -203,7 +203,7 @@ class Net::HTTP::Persistent
203
203
  ##
204
204
  # The version of Net::HTTP::Persistent you are using
205
205
 
206
- VERSION = '2.9'
206
+ VERSION = '2.9.1'
207
207
 
208
208
  ##
209
209
  # Exceptions rescued for automatic retry on ruby 2.0.0. This overlaps with
@@ -631,6 +631,7 @@ class Net::HTTP::Persistent
631
631
  start connection unless connection.started?
632
632
 
633
633
  connection.read_timeout = @read_timeout if @read_timeout
634
+ connection.keep_alive_timeout = @idle_timeout if @idle_timeout && connection.respond_to?(:keep_alive_timeout=)
634
635
 
635
636
  connection
636
637
  rescue Errno::ECONNREFUSED
@@ -955,9 +956,13 @@ class Net::HTTP::Persistent
955
956
 
956
957
  start connection
957
958
  rescue Errno::ECONNREFUSED
958
- raise Error, "connection refused: #{connection.address}:#{connection.port}"
959
+ e = Error.new "connection refused: #{connection.address}:#{connection.port}"
960
+ e.set_backtrace $@
961
+ raise e
959
962
  rescue Errno::EHOSTDOWN
960
- raise Error, "host down: #{connection.address}:#{connection.port}"
963
+ e = Error.new "host down: #{connection.address}:#{connection.port}"
964
+ e.set_backtrace $@
965
+ raise e
961
966
  end
962
967
 
963
968
  ##
@@ -274,6 +274,7 @@ class TestNetHttpPersistent < Minitest::Test
274
274
  def test_connection_for
275
275
  @http.open_timeout = 123
276
276
  @http.read_timeout = 321
277
+ @http.idle_timeout = 42
277
278
  c = @http.connection_for @uri
278
279
 
279
280
  assert_kind_of @http_class, c
@@ -283,6 +284,7 @@ class TestNetHttpPersistent < Minitest::Test
283
284
 
284
285
  assert_equal 123, c.open_timeout
285
286
  assert_equal 321, c.read_timeout
287
+ assert_equal 42, c.keep_alive_timeout unless RUBY_1
286
288
 
287
289
  assert_includes conns[0].keys, 'example.com:80'
288
290
  assert_same c, conns[0]['example.com:80']
@@ -1337,6 +1339,7 @@ class TestNetHttpPersistent < Minitest::Test
1337
1339
  end
1338
1340
 
1339
1341
  assert_match %r%host down%, e.message
1342
+ assert_match __FILE__, e.backtrace.first
1340
1343
  end
1341
1344
 
1342
1345
  def test_reset_io_error
@@ -1361,6 +1364,7 @@ class TestNetHttpPersistent < Minitest::Test
1361
1364
  end
1362
1365
 
1363
1366
  assert_match %r%connection refused%, e.message
1367
+ assert_match __FILE__, e.backtrace.first
1364
1368
  end
1365
1369
 
1366
1370
  def test_retry_change_requests_equals
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-http-persistent
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.9'
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -30,50 +30,50 @@ cert_chain:
30
30
  KDyY1VIazVgoC8XvR4h/95/iScPiuglzA+DBG1hip1xScAtw05BrXyUNrc9CEMYU
31
31
  wgF94UVoHRp6ywo8I7NP3HcwFQDFNEZPNGXsng==
32
32
  -----END CERTIFICATE-----
33
- date: 2013-07-24 00:00:00.000000000 Z
33
+ date: 2014-01-22 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: minitest
37
37
  requirement: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '5.0'
41
+ version: '5.2'
42
42
  type: :development
43
43
  prerelease: false
44
44
  version_requirements: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '5.0'
48
+ version: '5.2'
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: rdoc
51
51
  requirement: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '4.0'
56
56
  type: :development
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '4.0'
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: hoe
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '3.6'
69
+ version: '3.7'
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '3.6'
76
+ version: '3.7'
77
77
  description: |-
78
78
  Manages persistent connections using Net::HTTP plus a speed fix for Ruby 1.8.
79
79
  It's thread-safe too!
@@ -94,8 +94,8 @@ extra_rdoc_files:
94
94
  - Manifest.txt
95
95
  - README.rdoc
96
96
  files:
97
- - .autotest
98
- - .gemtest
97
+ - ".autotest"
98
+ - ".gemtest"
99
99
  - History.txt
100
100
  - Manifest.txt
101
101
  - README.rdoc
@@ -106,27 +106,28 @@ files:
106
106
  - test/test_net_http_persistent.rb
107
107
  - test/test_net_http_persistent_ssl_reuse.rb
108
108
  homepage: http://docs.seattlerb.org/net-http-persistent
109
- licenses: []
109
+ licenses:
110
+ - MIT
110
111
  metadata: {}
111
112
  post_install_message:
112
113
  rdoc_options:
113
- - --main
114
+ - "--main"
114
115
  - README.rdoc
115
116
  require_paths:
116
117
  - lib
117
118
  required_ruby_version: !ruby/object:Gem::Requirement
118
119
  requirements:
119
- - - '>='
120
+ - - ">="
120
121
  - !ruby/object:Gem::Version
121
122
  version: '0'
122
123
  required_rubygems_version: !ruby/object:Gem::Requirement
123
124
  requirements:
124
- - - '>='
125
+ - - ">="
125
126
  - !ruby/object:Gem::Version
126
127
  version: '0'
127
128
  requirements: []
128
129
  rubyforge_project: net-http-persistent
129
- rubygems_version: 2.0.4
130
+ rubygems_version: 2.2.1
130
131
  signing_key:
131
132
  specification_version: 4
132
133
  summary: Manages persistent connections using Net::HTTP plus a speed fix for Ruby
metadata.gz.sig CHANGED
Binary file