curb 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
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.8.1"
24
- #define CURB_VER_NUM 801
23
+ #define CURB_VERSION "0.8.2"
24
+ #define CURB_VER_NUM 802
25
25
  #define CURB_VER_MAJ 0
26
26
  #define CURB_VER_MIN 8
27
- #define CURB_VER_MIC 1
27
+ #define CURB_VER_MIC 2
28
28
  #define CURB_VER_PATCH 0
29
29
 
30
30
 
@@ -459,7 +459,8 @@ VALUE rb_curl_easy_error(CURLcode code) {
459
459
  /* rb_raise an approriate exception for the supplied CURLcode */
460
460
  void raise_curl_easy_error_exception(CURLcode code) {
461
461
  VALUE obj = rb_curl_easy_error(code);
462
- rb_raise(rb_ary_entry(obj,0), RSTRING_PTR(rb_ary_entry(obj,1)));
462
+ VALUE exmsg = rb_ary_entry(obj,1);
463
+ rb_raise(rb_ary_entry(obj,0), "CURLError: %s", StringValueCStr(exmsg));
463
464
  }
464
465
  VALUE rb_curl_multi_error(CURLMcode code) {
465
466
  VALUE exclz;
@@ -509,7 +510,8 @@ VALUE rb_curl_multi_error(CURLMcode code) {
509
510
  }
510
511
  void raise_curl_multi_error_exception(CURLMcode code) {
511
512
  VALUE obj = rb_curl_multi_error(code);
512
- rb_raise(rb_ary_entry(obj,0), RSTRING_PTR(rb_ary_entry(obj,1)));
513
+ VALUE exmsg = rb_ary_entry(obj,1);
514
+ rb_raise(rb_ary_entry(obj,0), "CURLError: %s", StringValueCStr(exmsg));
513
515
  }
514
516
 
515
517
  void init_curb_errors() {
@@ -51,7 +51,7 @@ module Curl
51
51
  end
52
52
 
53
53
  def self.postalize(params={})
54
- params.map {|k,v| "#{URI.escape(k.to_s)}=#{URI.escape(v.to_s)}" }.join('&')
54
+ params.is_a?(String) ? params : params.map {|k,v| "#{URI.escape(k.to_s)}=#{URI.escape(v.to_s)}" }.join('&')
55
55
  end
56
56
 
57
57
  end
@@ -429,7 +429,7 @@ class TestCurbCurlMulti < Test::Unit::TestCase
429
429
  c = Curl::Easy.new("http://127.9.9.9:999110")
430
430
  m.remove(c)
431
431
  rescue => e
432
- assert_equal 'Invalid easy handle', e.message
432
+ assert_equal 'CURLError: Invalid easy handle', e.message
433
433
  assert_equal 0, m.requests.size
434
434
  end
435
435
 
metadata CHANGED
@@ -1,34 +1,28 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: curb
3
- version: !ruby/object:Gem::Version
4
- hash: 61
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 8
9
- - 1
10
- version: 0.8.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ross Bamford
14
9
  - Todd A. Fisher
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2012-06-29 00:00:00 Z
13
+ date: 2012-11-05 00:00:00.000000000 Z
20
14
  dependencies: []
21
-
22
- description: Curb (probably CUrl-RuBy or something) provides Ruby-language bindings for the libcurl(3), a fully-featured client-side URL transfer library. cURL and libcurl live at http://curl.haxx.se/
15
+ description: Curb (probably CUrl-RuBy or something) provides Ruby-language bindings
16
+ for the libcurl(3), a fully-featured client-side URL transfer library. cURL and
17
+ libcurl live at http://curl.haxx.se/
23
18
  email: todd.fisher@gmail.com
24
19
  executables: []
25
-
26
- extensions:
20
+ extensions:
27
21
  - ext/extconf.rb
28
- extra_rdoc_files:
22
+ extra_rdoc_files:
29
23
  - LICENSE
30
24
  - README
31
- files:
25
+ files:
32
26
  - LICENSE
33
27
  - README
34
28
  - Rakefile
@@ -78,40 +72,32 @@ files:
78
72
  - tests/unittests.rb
79
73
  homepage: http://curb.rubyforge.org/
80
74
  licenses: []
81
-
82
75
  post_install_message:
83
- rdoc_options:
76
+ rdoc_options:
84
77
  - --main
85
78
  - README
86
- require_paths:
79
+ require_paths:
87
80
  - lib
88
81
  - ext
89
- required_ruby_version: !ruby/object:Gem::Requirement
82
+ required_ruby_version: !ruby/object:Gem::Requirement
90
83
  none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- hash: 3
95
- segments:
96
- - 0
97
- version: "0"
98
- required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
89
  none: false
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- hash: 3
104
- segments:
105
- - 0
106
- version: "0"
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
107
94
  requirements: []
108
-
109
95
  rubyforge_project: curb
110
- rubygems_version: 1.8.23
96
+ rubygems_version: 1.8.24
111
97
  signing_key:
112
98
  specification_version: 3
113
99
  summary: Ruby libcurl bindings
114
- test_files:
100
+ test_files:
115
101
  - tests/alltests.rb
116
102
  - tests/bug_crash_on_debug.rb
117
103
  - tests/bug_crash_on_progress.rb