taf2-curb 0.5.0.0 → 0.5.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -97,8 +97,8 @@ documentation with:
97
97
  ### HTTP POST form:
98
98
 
99
99
  c = Curl::Easy.http_post("http://my.rails.box/thing/create",
100
- Curl::PostField.content('thing[name]', 'box',
101
- Curl::PostField.content('thing[type]', 'storage')
100
+ Curl::PostField.content('thing[name]', 'box'),
101
+ Curl::PostField.content('thing[type]', 'storage'))
102
102
 
103
103
  ### HTTP POST file upload:
104
104
 
data/ext/curb.h CHANGED
@@ -20,11 +20,11 @@
20
20
  #include "curb_macros.h"
21
21
 
22
22
  // These should be managed from the Rake 'release' task.
23
- #define CURB_VERSION "0.5.0.0"
24
- #define CURB_VER_NUM 500
23
+ #define CURB_VERSION "0.5.1.0"
24
+ #define CURB_VER_NUM 510
25
25
  #define CURB_VER_MAJ 0
26
26
  #define CURB_VER_MIN 5
27
- #define CURB_VER_MIC 0
27
+ #define CURB_VER_MIC 1
28
28
  #define CURB_VER_PATCH 0
29
29
 
30
30
 
data/ext/curb_easy.c CHANGED
@@ -263,16 +263,16 @@ static VALUE ruby_curl_easy_new(int argc, VALUE *argv, VALUE klass) {
263
263
 
264
264
  new_curl = Data_Wrap_Struct(klass, curl_easy_mark, curl_easy_free, rbce);
265
265
 
266
- if (blk != Qnil) {
267
- rb_funcall(blk, idCall, 1, new_curl);
268
- }
269
-
270
266
  /* set the rbce pointer to the curl handle */
271
267
  ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)rbce);
272
268
  if (ecode != CURLE_OK) {
273
269
  raise_curl_easy_error_exception(ecode);
274
270
  }
275
271
 
272
+ if (blk != Qnil) {
273
+ rb_funcall(blk, idCall, 1, new_curl);
274
+ }
275
+
276
276
  return new_curl;
277
277
  }
278
278
 
@@ -68,6 +68,14 @@ class TestCurbCurlEasy < Test::Unit::TestCase
68
68
  assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)
69
69
  end
70
70
 
71
+ # test invalid use of new
72
+ def test_new_06
73
+ Curl::Easy.new(TestServlet.url) do|curl|
74
+ curl.http_post
75
+ assert_equal "POST\n", curl.body_str
76
+ end
77
+ end
78
+
71
79
  def test_escape
72
80
  c = Curl::Easy.new
73
81
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taf2-curb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.0
4
+ version: 0.5.1.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-07-27 00:00:00 -07:00
13
+ date: 2009-08-11 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -32,18 +32,18 @@ files:
32
32
  - lib/curb.rb
33
33
  - lib/curl.rb
34
34
  - ext/curb.c
35
- - ext/curb_postfield.c
36
- - ext/curb_multi.c
37
- - ext/curb_errors.c
38
35
  - ext/curb_easy.c
36
+ - ext/curb_errors.c
37
+ - ext/curb_multi.c
38
+ - ext/curb_postfield.c
39
39
  - ext/curb_upload.c
40
+ - ext/curb.h
40
41
  - ext/curb_easy.h
41
42
  - ext/curb_errors.h
42
- - ext/curb_upload.h
43
43
  - ext/curb_macros.h
44
- - ext/curb.h
45
- - ext/curb_postfield.h
46
44
  - ext/curb_multi.h
45
+ - ext/curb_postfield.h
46
+ - ext/curb_upload.h
47
47
  has_rdoc: true
48
48
  homepage: http://curb.rubyforge.org/
49
49
  licenses:
@@ -74,15 +74,15 @@ signing_key:
74
74
  specification_version: 2
75
75
  summary: Ruby libcurl bindings
76
76
  test_files:
77
- - tests/tc_curl_multi.rb
78
- - tests/tc_curl_postfield.rb
77
+ - tests/alltests.rb
79
78
  - tests/bug_curb_easy_blocks_ruby_threads.rb
80
- - tests/unittests.rb
81
- - tests/bug_require_last_or_segfault.rb
82
79
  - tests/bug_instance_post_differs_from_class_post.rb
83
- - tests/tc_curl_download.rb
84
- - tests/alltests.rb
85
- - tests/helper.rb
86
- - tests/tc_curl_easy.rb
87
80
  - tests/bug_multi_segfault.rb
81
+ - tests/bug_require_last_or_segfault.rb
82
+ - tests/helper.rb
88
83
  - tests/require_last_or_segfault_script.rb
84
+ - tests/tc_curl_download.rb
85
+ - tests/tc_curl_easy.rb
86
+ - tests/tc_curl_multi.rb
87
+ - tests/tc_curl_postfield.rb
88
+ - tests/unittests.rb