ethon 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +20 -1
- data/lib/ethon/curls/classes.rb +2 -1
- data/lib/ethon/curls/options.rb +14 -5
- data/lib/ethon/easy/informations.rb +6 -0
- data/lib/ethon/version.rb +1 -1
- data/spec/ethon/easy/informations_spec.rb +6 -0
- data/spec/ethon/easy/mirror_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzIwZTI3ZDU0NzcyNGIwYTcyNDQwMzBhMTE3YWVjOTk4M2NmODg3Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODA0NWYyYWJmMWJiZTExN2JlNmY4YmI4ZDM4YTEzOTkwNzNhODM5MA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTk5ZjIxNjQ4NDVmYTkzMGE2NDBjNTA2MTI5MzA3ODE4NjA2Mzg2MjkzNzk5
|
10
|
+
NGNhMmEzNjBiODc3OGQ2OTZmNzUwNmI2ZTVmZjVjYjk2YjA5OThjYzM0MzA2
|
11
|
+
YWE2OTBiODZiZGJjOTA3YjdjMWY5YTVmNGRjOTgwYTBjMDQwYjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTgzMzlkN2Q3YTY5YWIyMWRmNzdlMDFjZGFkZTdkOTYyNjZkMWI3ZTEyMGRi
|
14
|
+
NTA2ODhhMjdjYmYwOTg2MDNlMjVlZmUzZWIzNGExODg1YzNmN2MwNGQ5ZGJi
|
15
|
+
ZTIzNjllMmQzYzczMGI3MTIxYzA2NWViNmU4ZWI0MDJkMTU3ODg=
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,26 @@
|
|
2
2
|
|
3
3
|
## Master
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.
|
5
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.3...master)
|
6
|
+
|
7
|
+
## 0.7.3
|
8
|
+
|
9
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.2...v0.7.3)
|
10
|
+
|
11
|
+
* `Ethon::Curl::FDSet`
|
12
|
+
* Set `:fd_array` size to the current MS Windows `FD_SETSIZE` (2048).
|
13
|
+
([Tasos Laskos](https://github.com/zapotek)
|
14
|
+
|
15
|
+
* Added `redirect_time` value to available informations and `Easy::Mirror`.
|
16
|
+
([Adrien Jarthon](https://github.com/jarthod)
|
17
|
+
|
18
|
+
## 0.7.2
|
19
|
+
|
20
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.7.1...v0.7.2)
|
21
|
+
|
22
|
+
* FFI data-types updated to be more correct.
|
23
|
+
|
24
|
+
## 0.7.1
|
6
25
|
|
7
26
|
* MS Windows determination delegated to `Gem.windows?` for better accuracy.
|
8
27
|
* FFI data-types updated to work on MS Windows.
|
data/lib/ethon/curls/classes.rb
CHANGED
@@ -14,7 +14,8 @@ module Ethon
|
|
14
14
|
class FDSet < ::FFI::Struct
|
15
15
|
if Curl.windows?
|
16
16
|
layout :fd_count, :uint,
|
17
|
-
|
17
|
+
# TODO: Make it future proof by dynamically grabbing FD_SETSIZE.
|
18
|
+
:fd_array, [:uint, 2048]
|
18
19
|
|
19
20
|
def clear; self[:fd_count] = 0; end
|
20
21
|
else
|
data/lib/ethon/curls/options.rb
CHANGED
@@ -31,14 +31,23 @@ module Ethon
|
|
31
31
|
when :enum
|
32
32
|
return if value.nil?
|
33
33
|
func=:long
|
34
|
-
value=
|
35
|
-
|
34
|
+
value = case value
|
35
|
+
when Symbol
|
36
|
+
opthash[option][:opts][value]
|
37
|
+
when String
|
38
|
+
opthash[option][:opts][value.to_sym]
|
39
|
+
end
|
40
|
+
value = value.to_i
|
36
41
|
when :bitmask
|
37
42
|
return if value.nil?
|
38
43
|
func=:long
|
39
|
-
value=
|
40
|
-
|
41
|
-
|
44
|
+
value = case value
|
45
|
+
when Symbol
|
46
|
+
opthash[option][:opts][value]
|
47
|
+
when Array
|
48
|
+
value.inject(0) { |res,v| res|opthash[option][:opts][v] }
|
49
|
+
end
|
50
|
+
value = value.to_i
|
42
51
|
when :string
|
43
52
|
func=:string
|
44
53
|
value=value.to_s unless value.nil?
|
@@ -46,6 +46,12 @@ module Ethon
|
|
46
46
|
# start until the name resolution was completed.
|
47
47
|
:namelookup_time => :double,
|
48
48
|
|
49
|
+
# Return the time, in seconds, it took for all redirection steps
|
50
|
+
# include name lookup, connect, pretransfer and transfer before the
|
51
|
+
# final transaction was started. time_redirect shows the complete
|
52
|
+
# execution time for multiple redirections. (Added in 7.12.3)
|
53
|
+
:redirect_time => :double,
|
54
|
+
|
49
55
|
# Return the last used effective url.
|
50
56
|
:effective_url => :string,
|
51
57
|
|
data/lib/ethon/version.rb
CHANGED
@@ -50,6 +50,12 @@ describe Ethon::Easy::Informations do
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
describe "#redirect_time" do
|
54
|
+
it "returns float" do
|
55
|
+
expect(easy.redirect_time).to be_a(Float)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
53
59
|
describe "#effective_url" do
|
54
60
|
it "returns url" do
|
55
61
|
expect(easy.effective_url).to match(/^http:\/\/localhost:3001\/?/)
|
@@ -8,7 +8,7 @@ describe Ethon::Easy::Mirror do
|
|
8
8
|
[
|
9
9
|
:return_code, :response_code, :response_body, :response_headers,
|
10
10
|
:total_time, :starttransfer_time, :appconnect_time,
|
11
|
-
:pretransfer_time, :connect_time, :namelookup_time,
|
11
|
+
:pretransfer_time, :connect_time, :namelookup_time, :redirect_time,
|
12
12
|
:effective_url, :primary_ip, :redirect_count, :debug_info
|
13
13
|
].each do |name|
|
14
14
|
it "contains #{name}" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ethon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hans Hasselberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|