net-http-persistent 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +6 -0
- data/lib/net/http/persistent.rb +5 -3
- data/test/test_net_http_persistent.rb +8 -1
- metadata +4 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/lib/net/http/persistent.rb
CHANGED
@@ -36,7 +36,7 @@ class Net::HTTP::Persistent
|
|
36
36
|
##
|
37
37
|
# The version of Net::HTTP::Persistent use are using
|
38
38
|
|
39
|
-
VERSION = '1.2.
|
39
|
+
VERSION = '1.2.5'
|
40
40
|
|
41
41
|
##
|
42
42
|
# Error class for errors raised by Net::HTTP::Persistent. Various
|
@@ -375,9 +375,11 @@ class Net::HTTP::Persistent
|
|
375
375
|
# this in each thread.
|
376
376
|
|
377
377
|
def shutdown
|
378
|
-
Thread.current[@connection_key]
|
378
|
+
connections = Thread.current[@connection_key]
|
379
|
+
|
380
|
+
connections.each do |_, connection|
|
379
381
|
connection.finish
|
380
|
-
end
|
382
|
+
end if connections
|
381
383
|
|
382
384
|
Thread.current[@connection_key] = nil
|
383
385
|
Thread.current[@request_key] = nil
|
@@ -369,7 +369,7 @@ class TestNetHttpPersistent < MiniTest::Unit::TestCase
|
|
369
369
|
assert_match %r%too many bad responses%, e.message
|
370
370
|
end
|
371
371
|
|
372
|
-
def
|
372
|
+
def test_request_bad_response_retry
|
373
373
|
c = connection
|
374
374
|
def c.request(*a)
|
375
375
|
def self.request(*a)
|
@@ -505,6 +505,13 @@ class TestNetHttpPersistent < MiniTest::Unit::TestCase
|
|
505
505
|
refute_same rs, reqs
|
506
506
|
end
|
507
507
|
|
508
|
+
def test_shutdown_no_connections
|
509
|
+
@http.shutdown
|
510
|
+
|
511
|
+
assert_nil Thread.current[@http.connection_key]
|
512
|
+
assert_nil Thread.current[@http.request_key]
|
513
|
+
end
|
514
|
+
|
508
515
|
def test_ssl
|
509
516
|
@http.verify_callback = :callback
|
510
517
|
c = Net::HTTP.new 'localhost', 80
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-http-persistent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 5
|
10
|
+
version: 1.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Eric Hodel
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
x52qPcexcYZR7w==
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2010-07-
|
39
|
+
date: 2010-07-27 00:00:00 -07:00
|
40
40
|
default_executable:
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
metadata.gz.sig
CHANGED
Binary file
|