curb 0.6.6.0 → 0.6.7

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 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.6.6.0"
24
- #define CURB_VER_NUM 660
23
+ #define CURB_VERSION "0.6.7"
24
+ #define CURB_VER_NUM 670
25
25
  #define CURB_VER_MAJ 0
26
26
  #define CURB_VER_MIN 6
27
- #define CURB_VER_MIC 6
27
+ #define CURB_VER_MIC 7
28
28
  #define CURB_VER_PATCH 0
29
29
 
30
30
 
data/ext/curb_postfield.c CHANGED
@@ -430,7 +430,7 @@ static VALUE ruby_curl_postfield_to_str(VALUE self) {
430
430
  if ((rbcpf->local_file == Qnil) && (rbcpf->remote_file == Qnil)) {
431
431
  if (rbcpf->name != Qnil) {
432
432
 
433
- char *tmpchrs = curl_escape(RSTRING_PTR(rbcpf->name), RSTRING_LEN(rbcpf->name));
433
+ char *tmpchrs = curl_escape(StringValuePtr(rbcpf->name), RSTRING_LEN(StringValue(rbcpf->name)));
434
434
 
435
435
  if (!tmpchrs) {
436
436
  rb_raise(eCurlErrInvalidPostField, "Failed to url-encode name `%s'", tmpchrs);
@@ -0,0 +1,10 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
2
+ require 'webrick'
3
+ class ::WEBrick::HTTPServer ; def access_log(config, req, res) ; end ; end
4
+ class ::WEBrick::BasicLog ; def log(level, data) ; end ; end
5
+
6
+ class BugIssue20 < Test::Unit::TestCase
7
+ def test_bug
8
+ Curl::Easy.new
9
+ end
10
+ end
@@ -0,0 +1,57 @@
1
+ # Not sure if this is an IRB bug, but thought you guys should know.
2
+ #
3
+ # ** My Ruby version: ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
4
+ # ** Version of Rubygems: 1.3.5
5
+ # ** Version of the Curb gem: 0.6.6.0
6
+ #
7
+ #
8
+ # Transcript of IRB session:
9
+ # ------------------------------------------------------------------------------------------------------------------
10
+ # irb(main):001:0> a = {
11
+ # irb(main):002:1* :type => :pie,
12
+ # irb(main):003:1* :series => {
13
+ # irb(main):004:2* :names => [:a,:b],
14
+ # irb(main):005:2* :values => [70,30],
15
+ # irb(main):006:2* :colors => [:red,:green]
16
+ # irb(main):007:2> },
17
+ # irb(main):008:1* :output_format => :png
18
+ # irb(main):009:1> }
19
+ # => {:type=>:pie, :output_format=>:png, :series=>{:names=>[:a, :b], :values=>[70, 30], :colors=>[:red, :green]}}
20
+ # irb(main):010:0> post = []
21
+ # => []
22
+ # irb(main):011:0> require 'rubygems'
23
+ # => true
24
+ # irb(main):012:0> require 'curb'
25
+ # => true
26
+ # irb(main):013:0> include Curl
27
+ # => Object
28
+ # irb(main):014:0> a.each_pair do |k,v|
29
+ # irb(main):015:1* post << PostField.content(k,v)
30
+ # irb(main):016:1> end
31
+ # => {:type=>:pie, :output_format=>:png, :series=>{:names=>[:a, :b], :values=>[70, 30], :colors=>[:red, :green]}}
32
+ # irb(main):017:0> post
33
+ # /usr/lib/ruby/1.8/irb.rb:302: [BUG] Segmentation fault
34
+ # ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
35
+ #
36
+ # Aborted
37
+ # ------------------------------------------------------------------------------------------------------------------
38
+ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
39
+
40
+ class BugPostFieldsCrash2 < Test::Unit::TestCase
41
+ def test_crash
42
+ a = {
43
+ :type => :pie,
44
+ :series => {
45
+ :names => [:a,:b],
46
+ :values => [70,30],
47
+ :colors => [:red,:green]
48
+ },
49
+ :output_format => :png
50
+ }
51
+ post = []
52
+ a.each_pair do |k,v|
53
+ post << Curl::PostField.content(k,v)
54
+ end
55
+ post.inspect
56
+ end
57
+ end
data/tests/s.rb ADDED
@@ -0,0 +1,4 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
2
+
3
+ c = Curl::Easy.new("http://www.google.com/")
4
+ c.perform
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.6.6.0
4
+ version: 0.6.7
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: 2010-01-31 00:00:00 -05:00
13
+ date: 2010-03-09 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -32,22 +32,20 @@ files:
32
32
  - lib/curb.rb
33
33
  - lib/curl.rb
34
34
  - ext/curb.c
35
- - ext/curb_easy.c
36
- - ext/curb_errors.c
37
- - ext/curb_multi.c
38
35
  - ext/curb_postfield.c
36
+ - ext/curb_multi.c
37
+ - ext/curb_errors.c
38
+ - ext/curb_easy.c
39
39
  - ext/curb_upload.c
40
- - ext/curb.h
41
40
  - ext/curb_easy.h
42
41
  - ext/curb_errors.h
42
+ - ext/curb_upload.h
43
43
  - ext/curb_macros.h
44
- - ext/curb_multi.h
44
+ - ext/curb.h
45
45
  - ext/curb_postfield.h
46
- - ext/curb_upload.h
46
+ - ext/curb_multi.h
47
47
  has_rdoc: true
48
48
  homepage: http://curb.rubyforge.org/
49
- licenses: []
50
-
51
49
  post_install_message:
52
50
  rdoc_options:
53
51
  - --main
@@ -70,24 +68,27 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
68
  requirements: []
71
69
 
72
70
  rubyforge_project: curb
73
- rubygems_version: 1.3.5
71
+ rubygems_version: 1.3.1
74
72
  signing_key:
75
- specification_version: 3
73
+ specification_version: 2
76
74
  summary: Ruby libcurl bindings
77
75
  test_files:
78
- - tests/alltests.rb
76
+ - tests/tc_curl_multi.rb
77
+ - tests/tc_curl_postfield.rb
79
78
  - tests/bug_curb_easy_blocks_ruby_threads.rb
80
- - tests/bug_curb_easy_post_with_string_no_content_length_header.rb
81
- - tests/bug_instance_post_differs_from_class_post.rb
82
- - tests/bug_multi_segfault.rb
83
- - tests/bug_postfields_crash.rb
84
- - tests/bug_require_last_or_segfault.rb
85
79
  - tests/bugtests.rb
86
- - tests/helper.rb
80
+ - tests/unittests.rb
87
81
  - tests/mem_check.rb
88
- - tests/require_last_or_segfault_script.rb
82
+ - tests/bug_require_last_or_segfault.rb
83
+ - tests/bug_instance_post_differs_from_class_post.rb
89
84
  - tests/tc_curl_download.rb
85
+ - tests/alltests.rb
86
+ - tests/bug_curb_easy_post_with_string_no_content_length_header.rb
87
+ - tests/helper.rb
90
88
  - tests/tc_curl_easy.rb
91
- - tests/tc_curl_multi.rb
92
- - tests/tc_curl_postfield.rb
93
- - tests/unittests.rb
89
+ - tests/bug_postfields_crash2.rb
90
+ - tests/bug_multi_segfault.rb
91
+ - tests/require_last_or_segfault_script.rb
92
+ - tests/bug_postfields_crash.rb
93
+ - tests/bug_issue20.rb
94
+ - tests/s.rb