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 CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.2.5 / 2010-07-27
2
+
3
+ * Bug Fixes
4
+ * Fix duplicated test name. Noted by Peter Higgins.
5
+ * #shutdown now works even when no connections were made.
6
+
1
7
  === 1.2.4 / 2010-07-26
2
8
 
3
9
  * Bug Fixes
@@ -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.4'
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].each do |_, connection|
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 test_request_reset_retry
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 4
10
- version: 1.2.4
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-26 00:00:00 -07:00
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