ethon 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -4
- data/lib/ethon/curl.rb +1 -1
- data/lib/ethon/easies/header.rb +1 -1
- data/lib/ethon/easies/http.rb +1 -1
- data/lib/ethon/easies/informations.rb +2 -0
- data/lib/ethon/easies/options.rb +2 -0
- data/lib/ethon/easies/util.rb +7 -2
- data/lib/ethon/version.rb +1 -1
- metadata +35 -3
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/lib/ethon/curl.rb
CHANGED
@@ -420,7 +420,7 @@ module Ethon
|
|
420
420
|
callback :callback, [:pointer, :size_t, :size_t, :pointer], :size_t
|
421
421
|
|
422
422
|
ffi_lib_flags :now, :global
|
423
|
-
ffi_lib 'libcurl'
|
423
|
+
ffi_lib ['libcurl', 'libcurl.so.4']
|
424
424
|
|
425
425
|
attach_function :global_init, :curl_global_init, [:long], :int
|
426
426
|
|
data/lib/ethon/easies/header.rb
CHANGED
data/lib/ethon/easies/http.rb
CHANGED
@@ -6,6 +6,8 @@ module Ethon
|
|
6
6
|
# for more information.
|
7
7
|
module Informations
|
8
8
|
|
9
|
+
# Holds available informations and their type, which is needed to
|
10
|
+
# request the informations from libcurl.
|
9
11
|
AVAILABLE_INFORMATIONS = {
|
10
12
|
# Return the available http auth methods.
|
11
13
|
:httpauth_avail => :long,
|
data/lib/ethon/easies/options.rb
CHANGED
data/lib/ethon/easies/util.rb
CHANGED
@@ -16,9 +16,9 @@ module Ethon
|
|
16
16
|
when Array
|
17
17
|
v.each { |x| pairs << [key, x] }
|
18
18
|
when File, Tempfile
|
19
|
-
pairs << [key, file_info(v)]
|
19
|
+
pairs << [Util.escape_zero_byte(key), file_info(v)]
|
20
20
|
else
|
21
|
-
pairs << [key, v]
|
21
|
+
pairs << [Util.escape_zero_byte(key), Util.escape_zero_byte(v)]
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -36,6 +36,11 @@ module Ethon
|
|
36
36
|
File.expand_path(file.path)
|
37
37
|
]
|
38
38
|
end
|
39
|
+
|
40
|
+
def self.escape_zero_byte(value)
|
41
|
+
return value unless value.to_s.include?(0.chr)
|
42
|
+
value.to_s.gsub(0.chr, '\\\0')
|
43
|
+
end
|
39
44
|
end
|
40
45
|
end
|
41
46
|
end
|
data/lib/ethon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ethon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -139,6 +139,38 @@ dependencies:
|
|
139
139
|
- - ~>
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0.6'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: patron
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ~>
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0.4'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ~>
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0.4'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: curb
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ~>
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 0.8.0
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.8.0
|
142
174
|
description: Very lightweight libcurl wrapper.
|
143
175
|
email:
|
144
176
|
- me@hans.io
|
@@ -201,7 +233,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
233
|
version: '0'
|
202
234
|
segments:
|
203
235
|
- 0
|
204
|
-
hash:
|
236
|
+
hash: 4039343008781597148
|
205
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
238
|
none: false
|
207
239
|
requirements:
|