curb 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.markdown +11 -1
- data/Rakefile +2 -7
- data/ext/curb.h +3 -3
- data/ext/curb_easy.c +13 -0
- data/ext/curb_multi.c +2 -0
- data/lib/curl.rb +4 -0
- data/tests/tc_curl_easy.rb +6 -0
- metadata +18 -21
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 727f8b8d733787a36d4e67e7b43aa03abd638426
|
4
|
+
data.tar.gz: 7d601d20ffc26f68d4ba0db85eca1216e1bf48f8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 45860ecb1398dcebe4df6787aef55cd81b364eb930d4bde85769e7132abeac81fdea83278c038b092f38b17f672f7f4dd1ab8f40cc76beac8c8ee857090f7827
|
7
|
+
data.tar.gz: 487fa8b068663ca3e8e2cdf5f6ccbf9efea4b91fb90dc6f52c9768d37b45333f6bfddb08e6ebbb24ff07804a5104dc7e7704793f57dc3ff87f043efa84cb34ed
|
data/README.markdown
CHANGED
@@ -26,7 +26,13 @@ Ruby license. See the LICENSE file for the gory details.
|
|
26
26
|
... will usually be as simple as:
|
27
27
|
|
28
28
|
$ gem install curb
|
29
|
-
|
29
|
+
|
30
|
+
On Windows, make sure you're using the [DevKit](http://rubyinstaller.org/downloads/) and
|
31
|
+
the [development version of libcurl](http://curl.haxx.se/gknw.net/7.39.0/dist-w32/curl-7.39.0-devel-mingw32.zip). Unzip, then run this in your command
|
32
|
+
line (alter paths to your curl location, but remember to use forward slashes):
|
33
|
+
|
34
|
+
gem install curb --platform=ruby -- --with-curl-lib=C:/curl-7.39.0-devel-mingw32/bin --with-curl-include=C:/curl-7.39.0-devel-mingw32/include
|
35
|
+
|
30
36
|
Or, if you downloaded the archive:
|
31
37
|
|
32
38
|
$ rake install
|
@@ -44,6 +50,10 @@ On Ubuntu, the dependencies can be satisfied by installing the following package
|
|
44
50
|
|
45
51
|
$ sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev
|
46
52
|
|
53
|
+
On RedHat:
|
54
|
+
|
55
|
+
$ sudo yum install ruby-devel libcurl-devel openssl-devel
|
56
|
+
|
47
57
|
Curb has fairly extensive RDoc comments in the source. You can build the
|
48
58
|
documentation with:
|
49
59
|
|
data/Rakefile
CHANGED
@@ -68,11 +68,6 @@ end
|
|
68
68
|
desc "Compile the shared object"
|
69
69
|
task :compile => [CURB_SO]
|
70
70
|
|
71
|
-
desc "Create the markdown file"
|
72
|
-
task :markdown do
|
73
|
-
cp "README", "README.markdown"
|
74
|
-
end
|
75
|
-
|
76
71
|
desc "Install to your site_ruby directory"
|
77
72
|
task :install => :alltests do
|
78
73
|
m = make 'install'
|
@@ -171,13 +166,13 @@ else
|
|
171
166
|
|
172
167
|
desc 'Build gem'
|
173
168
|
task :package => :gemspec do
|
174
|
-
require 'rubygems/
|
169
|
+
require 'rubygems/package'
|
175
170
|
spec_source = File.read File.join(File.dirname(__FILE__),'curb.gemspec')
|
176
171
|
spec = nil
|
177
172
|
# see: http://gist.github.com/16215
|
178
173
|
Thread.new { spec = eval("$SAFE = 3\n#{spec_source}") }.join
|
179
174
|
spec.validate
|
180
|
-
Gem::
|
175
|
+
Gem::Package.build(spec)
|
181
176
|
end
|
182
177
|
|
183
178
|
task :static do
|
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.
|
24
|
-
#define CURB_VER_NUM
|
23
|
+
#define CURB_VERSION "0.8.7"
|
24
|
+
#define CURB_VER_NUM 807
|
25
25
|
#define CURB_VER_MAJ 0
|
26
26
|
#define CURB_VER_MIN 8
|
27
|
-
#define CURB_VER_MIC
|
27
|
+
#define CURB_VER_MIC 7
|
28
28
|
#define CURB_VER_PATCH 0
|
29
29
|
|
30
30
|
|
data/ext/curb_easy.c
CHANGED
@@ -791,9 +791,13 @@ static VALUE ruby_curl_easy_put_data_set(VALUE self, VALUE data) {
|
|
791
791
|
curl_easy_setopt(curl, CURLOPT_NOBODY, 0);
|
792
792
|
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
|
793
793
|
curl_easy_setopt(curl, CURLOPT_READFUNCTION, (curl_read_callback)read_data_handler);
|
794
|
+
#if HAVE_CURLOPT_SEEKFUNCTION
|
794
795
|
curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, (curl_seek_callback)seek_data_handler);
|
796
|
+
#endif
|
795
797
|
curl_easy_setopt(curl, CURLOPT_READDATA, rbce);
|
798
|
+
#if HAVE_CURLOPT_SEEKDATA
|
796
799
|
curl_easy_setopt(curl, CURLOPT_SEEKDATA, rbce);
|
800
|
+
#endif
|
797
801
|
|
798
802
|
/*
|
799
803
|
* we need to set specific headers for the PUT to work... so
|
@@ -3121,6 +3125,12 @@ static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {
|
|
3121
3125
|
case CURLOPT_NOPROGRESS:
|
3122
3126
|
case CURLOPT_NOSIGNAL:
|
3123
3127
|
case CURLOPT_HTTPGET:
|
3128
|
+
case CURLOPT_POST: {
|
3129
|
+
curl_easy_setopt(rbce->curl, CURLOPT_POST, rb_type(val) == T_TRUE);
|
3130
|
+
} break;
|
3131
|
+
case CURLOPT_POSTFIELDS: {
|
3132
|
+
curl_easy_setopt(rbce->curl, CURLOPT_POSTFIELDS, NIL_P(val) ? NULL : StringValueCStr(val));
|
3133
|
+
} break;
|
3124
3134
|
case CURLOPT_NOBODY: {
|
3125
3135
|
int type = rb_type(val);
|
3126
3136
|
VALUE value;
|
@@ -3162,6 +3172,9 @@ static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {
|
|
3162
3172
|
case CURLOPT_FAILONERROR: {
|
3163
3173
|
curl_easy_setopt(rbce->curl, CURLOPT_FAILONERROR, FIX2LONG(val));
|
3164
3174
|
} break;
|
3175
|
+
case CURLOPT_SSL_CIPHER_LIST: {
|
3176
|
+
curl_easy_setopt(rbce->curl, CURLOPT_SSL_CIPHER_LIST, StringValueCStr(val));
|
3177
|
+
} break;
|
3165
3178
|
#if HAVE_CURLOPT_GSSAPI_DELEGATION
|
3166
3179
|
case CURLOPT_GSSAPI_DELEGATION: {
|
3167
3180
|
curl_easy_setopt(rbce->curl, CURLOPT_GSSAPI_DELEGATION, FIX2LONG(val));
|
data/ext/curb_multi.c
CHANGED
@@ -581,6 +581,8 @@ VALUE ruby_curl_multi_perform(int argc, VALUE *argv, VALUE self) {
|
|
581
581
|
rc = (int)(VALUE) rb_thread_call_without_gvl((void *(*)(void *))curb_select, &fdset_args, RUBY_UBF_IO, 0);
|
582
582
|
#elif HAVE_RB_THREAD_BLOCKING_REGION
|
583
583
|
rc = rb_thread_blocking_region(curb_select, &fdset_args, RUBY_UBF_IO, 0);
|
584
|
+
#elif HAVE_RB_THREAD_FD_SELECT
|
585
|
+
rc = rb_thread_fd_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &tv);
|
584
586
|
#else
|
585
587
|
rc = rb_thread_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &tv);
|
586
588
|
#endif
|
data/lib/curl.rb
CHANGED
data/tests/tc_curl_easy.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
5
|
-
prerelease:
|
4
|
+
version: 0.8.7
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ross Bamford
|
@@ -10,7 +9,7 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2015-03-22 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
14
|
description: Curb (probably CUrl-RuBy or something) provides Ruby-language bindings
|
16
15
|
for the libcurl(3), a fully-featured client-side URL transfer library. cURL and
|
@@ -27,24 +26,24 @@ files:
|
|
27
26
|
- README.markdown
|
28
27
|
- Rakefile
|
29
28
|
- doc.rb
|
30
|
-
- ext/extconf.rb
|
31
|
-
- lib/curb.rb
|
32
|
-
- lib/curl/easy.rb
|
33
|
-
- lib/curl/multi.rb
|
34
|
-
- lib/curl.rb
|
35
29
|
- ext/curb.c
|
36
|
-
- ext/curb_easy.c
|
37
|
-
- ext/curb_errors.c
|
38
|
-
- ext/curb_multi.c
|
39
|
-
- ext/curb_postfield.c
|
40
|
-
- ext/curb_upload.c
|
41
30
|
- ext/curb.h
|
31
|
+
- ext/curb_easy.c
|
42
32
|
- ext/curb_easy.h
|
33
|
+
- ext/curb_errors.c
|
43
34
|
- ext/curb_errors.h
|
44
35
|
- ext/curb_macros.h
|
36
|
+
- ext/curb_multi.c
|
45
37
|
- ext/curb_multi.h
|
38
|
+
- ext/curb_postfield.c
|
46
39
|
- ext/curb_postfield.h
|
40
|
+
- ext/curb_upload.c
|
47
41
|
- ext/curb_upload.h
|
42
|
+
- ext/extconf.rb
|
43
|
+
- lib/curb.rb
|
44
|
+
- lib/curl.rb
|
45
|
+
- lib/curl/easy.rb
|
46
|
+
- lib/curl/multi.rb
|
48
47
|
- tests/alltests.rb
|
49
48
|
- tests/bug_crash_on_debug.rb
|
50
49
|
- tests/bug_crash_on_progress.rb
|
@@ -72,30 +71,29 @@ files:
|
|
72
71
|
- tests/unittests.rb
|
73
72
|
homepage: http://curb.rubyforge.org/
|
74
73
|
licenses: []
|
74
|
+
metadata: {}
|
75
75
|
post_install_message:
|
76
76
|
rdoc_options:
|
77
|
-
- --main
|
77
|
+
- "--main"
|
78
78
|
- README.markdown
|
79
79
|
require_paths:
|
80
80
|
- lib
|
81
81
|
- ext
|
82
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
83
|
requirements:
|
85
|
-
- -
|
84
|
+
- - ">="
|
86
85
|
- !ruby/object:Gem::Version
|
87
86
|
version: '0'
|
88
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
88
|
requirements:
|
91
|
-
- -
|
89
|
+
- - ">="
|
92
90
|
- !ruby/object:Gem::Version
|
93
91
|
version: '0'
|
94
92
|
requirements: []
|
95
93
|
rubyforge_project: curb
|
96
|
-
rubygems_version:
|
94
|
+
rubygems_version: 2.4.5
|
97
95
|
signing_key:
|
98
|
-
specification_version:
|
96
|
+
specification_version: 4
|
99
97
|
summary: Ruby libcurl bindings
|
100
98
|
test_files:
|
101
99
|
- tests/alltests.rb
|
@@ -123,4 +121,3 @@ test_files:
|
|
123
121
|
- tests/timeout.rb
|
124
122
|
- tests/timeout_server.rb
|
125
123
|
- tests/unittests.rb
|
126
|
-
has_rdoc: true
|