ethon 0.17.0 → 0.18.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -1
- data/ethon.gemspec +9 -1
- data/lib/ethon/easy/callbacks.rb +11 -5
- data/lib/ethon/loggable.rb +0 -1
- data/lib/ethon/version.rb +1 -1
- metadata +21 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e74ebd7d77141ab9fd017ab9ed797e04ef6f92e55101908da06763df58227aae
|
|
4
|
+
data.tar.gz: f1c5369ccd4571c1973bd60ae841faa130c5f2c498c42c9e309dc2cfb2e0afa8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19b2774077a996085dc70146d1ee92737039ec42f23b8188640ae0ecb7cf0a566fb3ecc5aaca1d1e14471376be317065e26216c648b976f83c2f26ea1b00a46c
|
|
7
|
+
data.tar.gz: dae27d0dba5329237e96adf628b1492d34a9d202930d70e01778a27a82aef0dd876cf58864151d1151d479bad3489df1398ff2dc10348c6bdb2f65bcaf641d48
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## Master
|
|
4
4
|
|
|
5
|
-
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.
|
|
5
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.18.0...master)
|
|
6
|
+
|
|
7
|
+
## 0.18.0
|
|
8
|
+
|
|
9
|
+
[Full Changelog](https://github.com/typhoeus/ethon/compare/v0.17.0...v0.18.0)
|
|
10
|
+
|
|
11
|
+
* Fixed verbose mode attempting to print binary SSL data by replacing it with a summary.
|
|
12
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#265](https://github.com/typhoeus/ethon/pull/265))
|
|
13
|
+
* Fixed `on_headers` callbacks being called once per header line instead of once for all headers.
|
|
14
|
+
([Felipe Mesquita](https://github.com/felipedmesquita), [#264](https://github.com/typhoeus/ethon/pull/264))
|
|
15
|
+
* Stabilized test server boot on macOS by fixing IPv6/IPv4 localhost resolution and preventing orphaned processes.
|
|
16
|
+
([Geremia Taglialatela](https://github.com/tagliala), [#261](https://github.com/typhoeus/ethon/pull/261))
|
|
17
|
+
* Added `logger` to runtime dependencies for Ruby 3.5+ compatibility.
|
|
18
|
+
([Geremia Taglialatela](https://github.com/tagliala), [#259](https://github.com/typhoeus/ethon/pull/259))
|
|
19
|
+
* Opted-in for MFA requirement explicitly by adding `rubygems_mfa_required` metadata.
|
|
20
|
+
([Geremia Taglialatela](https://github.com/tagliala), [#257](https://github.com/typhoeus/ethon/pull/257))
|
|
21
|
+
* Removed redundant encoding and require_relative checks.
|
|
22
|
+
([Geremia Taglialatela](https://github.com/tagliala), [#258](https://github.com/typhoeus/ethon/pull/258))
|
|
6
23
|
|
|
7
24
|
## 0.17.0
|
|
8
25
|
|
data/ethon.gemspec
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# encoding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
lib = File.expand_path('../lib/', __FILE__)
|
|
4
3
|
$:.unshift lib unless $:.include?(lib)
|
|
@@ -19,6 +18,7 @@ Gem::Specification.new do |s|
|
|
|
19
18
|
s.license = 'MIT'
|
|
20
19
|
|
|
21
20
|
s.add_dependency('ffi', ['>= 1.15.0'])
|
|
21
|
+
s.add_dependency('logger')
|
|
22
22
|
|
|
23
23
|
s.files = Dir.chdir(__dir__) do
|
|
24
24
|
`git ls-files -z`.split("\x0").reject do |file|
|
|
@@ -26,4 +26,12 @@ Gem::Specification.new do |s|
|
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
s.require_path = 'lib'
|
|
29
|
+
|
|
30
|
+
s.metadata = {
|
|
31
|
+
'bug_tracker_uri' => 'https://github.com/typhoeus/ethon/issues',
|
|
32
|
+
'changelog_uri' => "https://github.com/typhoeus/ethon/blob/v#{s.version}/CHANGELOG.md",
|
|
33
|
+
'documentation_uri' => "https://www.rubydoc.info/gems/ethon/#{s.version}",
|
|
34
|
+
'rubygems_mfa_required' => 'true',
|
|
35
|
+
'source_code_uri' => "https://github.com/typhoeus/ethon/tree/v#{s.version}"
|
|
36
|
+
}
|
|
29
37
|
end
|
data/lib/ethon/easy/callbacks.rb
CHANGED
|
@@ -37,10 +37,10 @@ module Ethon
|
|
|
37
37
|
# @return [ Proc ] The callback.
|
|
38
38
|
def body_write_callback
|
|
39
39
|
@body_write_callback ||= proc do |stream, size, num, object|
|
|
40
|
-
headers
|
|
40
|
+
headers_user_callback_result = headers
|
|
41
41
|
result = body(chunk = stream.read_string(size * num))
|
|
42
42
|
@response_body << chunk if result == :unyielded
|
|
43
|
-
result != :abort ? size * num : -1
|
|
43
|
+
(result != :abort && headers_user_callback_result != :abort) ? size * num : -1
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -52,9 +52,8 @@ module Ethon
|
|
|
52
52
|
# @return [ Proc ] The callback.
|
|
53
53
|
def header_write_callback
|
|
54
54
|
@header_write_callback ||= proc {|stream, size, num, object|
|
|
55
|
-
result = headers
|
|
56
55
|
@response_headers << stream.read_string(size * num)
|
|
57
|
-
|
|
56
|
+
size * num
|
|
58
57
|
}
|
|
59
58
|
end
|
|
60
59
|
|
|
@@ -69,7 +68,14 @@ module Ethon
|
|
|
69
68
|
@debug_callback ||= proc {|handle, type, data, size, udata|
|
|
70
69
|
message = data.read_string(size)
|
|
71
70
|
@debug_info.add type, message
|
|
72
|
-
|
|
71
|
+
|
|
72
|
+
if [:ssl_data_in, :ssl_data_out].include?(type)
|
|
73
|
+
print "[#{size} bytes data]\n"
|
|
74
|
+
elsif [:data_in, :data_out].include?(type)
|
|
75
|
+
# print "} [#{size} bytes data]\n"
|
|
76
|
+
else
|
|
77
|
+
print message
|
|
78
|
+
end
|
|
73
79
|
0
|
|
74
80
|
}
|
|
75
81
|
end
|
data/lib/ethon/loggable.rb
CHANGED
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.
|
|
4
|
+
version: 0.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hans Hasselberg
|
|
@@ -23,6 +23,20 @@ dependencies:
|
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: 1.15.0
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: logger
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
26
40
|
description: Very lightweight libcurl wrapper.
|
|
27
41
|
email:
|
|
28
42
|
- me@hans.io
|
|
@@ -91,7 +105,12 @@ files:
|
|
|
91
105
|
homepage: https://github.com/typhoeus/ethon
|
|
92
106
|
licenses:
|
|
93
107
|
- MIT
|
|
94
|
-
metadata:
|
|
108
|
+
metadata:
|
|
109
|
+
bug_tracker_uri: https://github.com/typhoeus/ethon/issues
|
|
110
|
+
changelog_uri: https://github.com/typhoeus/ethon/blob/v0.18.0/CHANGELOG.md
|
|
111
|
+
documentation_uri: https://www.rubydoc.info/gems/ethon/0.18.0
|
|
112
|
+
rubygems_mfa_required: 'true'
|
|
113
|
+
source_code_uri: https://github.com/typhoeus/ethon/tree/v0.18.0
|
|
95
114
|
rdoc_options: []
|
|
96
115
|
require_paths:
|
|
97
116
|
- lib
|