curb 0.5.9.1 → 0.6.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of curb might be problematic. Click here for more details.
- data/ext/curb.h +5 -5
- data/ext/curb_multi.c +2 -2
- data/tests/tc_curl_multi.rb +15 -4
- metadata +2 -2
data/ext/curb.h
CHANGED
@@ -20,12 +20,12 @@
|
|
20
20
|
#include "curb_macros.h"
|
21
21
|
|
22
22
|
// These should be managed from the Rake 'release' task.
|
23
|
-
#define CURB_VERSION "0.
|
24
|
-
#define CURB_VER_NUM
|
23
|
+
#define CURB_VERSION "0.6.0.0"
|
24
|
+
#define CURB_VER_NUM 600
|
25
25
|
#define CURB_VER_MAJ 0
|
26
|
-
#define CURB_VER_MIN
|
27
|
-
#define CURB_VER_MIC
|
28
|
-
#define CURB_VER_PATCH
|
26
|
+
#define CURB_VER_MIN 6
|
27
|
+
#define CURB_VER_MIC 0
|
28
|
+
#define CURB_VER_PATCH 0
|
29
29
|
|
30
30
|
|
31
31
|
// Maybe not yet defined in Ruby
|
data/ext/curb_multi.c
CHANGED
@@ -263,11 +263,11 @@ static void rb_curl_multi_remove(ruby_curl_multi *rbcm, VALUE easy) {
|
|
263
263
|
// active should equal INT2FIX(RHASH(rbcm->requests)->tbl->num_entries)
|
264
264
|
r = rb_hash_delete( rbcm->requests, easy );
|
265
265
|
if( r != easy || r == Qnil ) {
|
266
|
-
|
266
|
+
rb_warn("Critical:: Unable to remove easy from requests");
|
267
267
|
}
|
268
268
|
}
|
269
269
|
|
270
|
-
|
270
|
+
/* Hash#foreach callback for ruby_curl_multi_cancel */
|
271
271
|
static int ruby_curl_multi_cancel_callback(VALUE key, VALUE value, ruby_curl_multi *rbcm) {
|
272
272
|
rb_curl_multi_remove(rbcm, value);
|
273
273
|
|
data/tests/tc_curl_multi.rb
CHANGED
@@ -391,7 +391,7 @@ class TestCurbCurlMulti < Test::Unit::TestCase
|
|
391
391
|
def test_retry_easy_handle
|
392
392
|
m = Curl::Multi.new
|
393
393
|
|
394
|
-
tries =
|
394
|
+
tries = 10
|
395
395
|
|
396
396
|
c1 = Curl::Easy.new('http://127.1.1.1:99911') do |curl|
|
397
397
|
curl.on_failure {|c,e|
|
@@ -406,13 +406,24 @@ class TestCurbCurlMulti < Test::Unit::TestCase
|
|
406
406
|
tries -= 1
|
407
407
|
m.add(c1)
|
408
408
|
|
409
|
-
|
410
|
-
m.perform
|
411
|
-
end
|
409
|
+
m.perform
|
412
410
|
assert_equal 0, tries
|
413
411
|
assert_equal 0, m.requests.size
|
414
412
|
end
|
415
413
|
|
414
|
+
def test_reusing_handle
|
415
|
+
m = Curl::Multi.new
|
416
|
+
|
417
|
+
c = Curl::Easy.new('http://127.0.0.1') do|easy|
|
418
|
+
easy.on_complete{|e,r| puts e.inspect }
|
419
|
+
end
|
420
|
+
|
421
|
+
m.add(c)
|
422
|
+
m.add(c)
|
423
|
+
rescue => e
|
424
|
+
assert_equal Curl::Err::MultiBadEasyHandle, e.class
|
425
|
+
end
|
426
|
+
|
416
427
|
include TestServerMethods
|
417
428
|
|
418
429
|
def setup
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Bamford
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-11-
|
13
|
+
date: 2009-11-27 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|