excon 0.94.0 → 0.96.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTORS.md +182 -140
- data/excon.gemspec +0 -1
- data/lib/excon/connection.rb +3 -1
- data/lib/excon/response.rb +12 -0
- data/lib/excon/socket.rb +10 -4
- data/lib/excon/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f536fc005dab3b336b1da07902d62bbb9d4c8fc1c96b35bbf397e35a261df28
|
4
|
+
data.tar.gz: cac9b79b1ee19bfc4be9860c571c56a003395c19444ba10ee2a6be86fea6c79c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07c7f5a37768b660eff0a4bb700c08d10fd02b6365e081719f3e345798148e15b1ec63d8bf3c643328d2a9b3501ec4cf33c4d20e0a670723cb89cff34c143a09
|
7
|
+
data.tar.gz: 16af4b9c500b08dd86014d31daf29e0ffb96ef249ffd97743b103be6326d9bbd6f1e90b957794943038bb2050a4ce1ea8bdce6d1860b91ee60820b5cc937cac8
|
data/CONTRIBUTORS.md
CHANGED
@@ -1,140 +1,182 @@
|
|
1
|
-
* Aaron Stone
|
2
|
-
* Adam
|
3
|
-
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
28
|
-
*
|
29
|
-
*
|
30
|
-
*
|
31
|
-
*
|
32
|
-
*
|
33
|
-
*
|
34
|
-
*
|
35
|
-
*
|
36
|
-
*
|
37
|
-
*
|
38
|
-
*
|
39
|
-
*
|
40
|
-
*
|
41
|
-
*
|
42
|
-
*
|
43
|
-
*
|
44
|
-
*
|
45
|
-
*
|
46
|
-
*
|
47
|
-
*
|
48
|
-
*
|
49
|
-
*
|
50
|
-
*
|
51
|
-
*
|
52
|
-
*
|
53
|
-
*
|
54
|
-
*
|
55
|
-
*
|
56
|
-
*
|
57
|
-
*
|
58
|
-
*
|
59
|
-
*
|
60
|
-
*
|
61
|
-
*
|
62
|
-
*
|
63
|
-
*
|
64
|
-
*
|
65
|
-
*
|
66
|
-
*
|
67
|
-
*
|
68
|
-
*
|
69
|
-
*
|
70
|
-
*
|
71
|
-
*
|
72
|
-
*
|
73
|
-
*
|
74
|
-
*
|
75
|
-
*
|
76
|
-
*
|
77
|
-
*
|
78
|
-
*
|
79
|
-
*
|
80
|
-
*
|
81
|
-
*
|
82
|
-
*
|
83
|
-
*
|
84
|
-
*
|
85
|
-
*
|
86
|
-
*
|
87
|
-
*
|
88
|
-
*
|
89
|
-
*
|
90
|
-
*
|
91
|
-
*
|
92
|
-
*
|
93
|
-
*
|
94
|
-
*
|
95
|
-
*
|
96
|
-
*
|
97
|
-
*
|
98
|
-
*
|
99
|
-
*
|
100
|
-
*
|
101
|
-
*
|
102
|
-
*
|
103
|
-
*
|
104
|
-
*
|
105
|
-
*
|
106
|
-
*
|
107
|
-
*
|
108
|
-
*
|
109
|
-
*
|
110
|
-
*
|
111
|
-
*
|
112
|
-
*
|
113
|
-
*
|
114
|
-
*
|
115
|
-
*
|
116
|
-
*
|
117
|
-
*
|
118
|
-
*
|
119
|
-
*
|
120
|
-
*
|
121
|
-
*
|
122
|
-
*
|
123
|
-
*
|
124
|
-
*
|
125
|
-
*
|
126
|
-
*
|
127
|
-
*
|
128
|
-
*
|
129
|
-
*
|
130
|
-
*
|
131
|
-
*
|
132
|
-
*
|
133
|
-
*
|
134
|
-
*
|
135
|
-
*
|
136
|
-
*
|
137
|
-
*
|
138
|
-
*
|
139
|
-
*
|
140
|
-
*
|
1
|
+
* Aaron Stone
|
2
|
+
* Adam Avilla
|
3
|
+
* Adam Esterline
|
4
|
+
* Alexander Sandström
|
5
|
+
* Alexandr Burov
|
6
|
+
* Andrew Katz
|
7
|
+
* Andrew Metcalf
|
8
|
+
* Andrew Sullivan Cant
|
9
|
+
* André Diego Piske
|
10
|
+
* Andy Delcambre
|
11
|
+
* Anshul Khandelwal
|
12
|
+
* Anton Chuchkalov
|
13
|
+
* Antonio Terceiro
|
14
|
+
* Ash Wilson
|
15
|
+
* Atul Bhosale
|
16
|
+
* Bart de Water
|
17
|
+
* Ben Burkert
|
18
|
+
* Benedikt Böhm
|
19
|
+
* Bill Mill
|
20
|
+
* Bo Jeanes
|
21
|
+
* Brandur
|
22
|
+
* Brian D. Burns
|
23
|
+
* Brian Hartsock
|
24
|
+
* Bryan Paxton
|
25
|
+
* Caio Chassot
|
26
|
+
* Caius Durling
|
27
|
+
* Carl Hörberg
|
28
|
+
* Carl Hörberg
|
29
|
+
* Carlos Sanchez
|
30
|
+
* Casper Thomsen
|
31
|
+
* Chris Hanks
|
32
|
+
* Christoph Rieß
|
33
|
+
* Christophe Taton
|
34
|
+
* Claudio Poli
|
35
|
+
* Craig Shannon
|
36
|
+
* Damien Mathieu
|
37
|
+
* Dan Hensgen
|
38
|
+
* Dan Peterson
|
39
|
+
* Dan Prince
|
40
|
+
* Dane Harrigan
|
41
|
+
* Daniel Berger
|
42
|
+
* Dave Myron
|
43
|
+
* Dave Newton
|
44
|
+
* Dave Vasilevsky
|
45
|
+
* David Biehl
|
46
|
+
* David Taylor
|
47
|
+
* Dimitrij Denissenko
|
48
|
+
* Dominik Richter
|
49
|
+
* Doug McInnes
|
50
|
+
* Esteban Pastorino
|
51
|
+
* Eugene Howe
|
52
|
+
* Evan Phoenix
|
53
|
+
* Fabian Wiesel
|
54
|
+
* Federico Ravasio
|
55
|
+
* Felix Wolfsteller
|
56
|
+
* Glenn Pratt
|
57
|
+
* Graeme Nelson
|
58
|
+
* Grey Baker
|
59
|
+
* Guillaume Balaine
|
60
|
+
* Hakan Ensari
|
61
|
+
* Hiroshi Hatake
|
62
|
+
* Ian Neubert
|
63
|
+
* Igor Fedoronchuk
|
64
|
+
* Jacob Atzen
|
65
|
+
* James Cox
|
66
|
+
* James Watling
|
67
|
+
* Jean Mertz
|
68
|
+
* Jeremy Hinegardner
|
69
|
+
* Jesse Kempf
|
70
|
+
* Jessica Jiang
|
71
|
+
* Joe Rafaniello
|
72
|
+
* John Keiser
|
73
|
+
* John Leach
|
74
|
+
* Jonas Pfenniger
|
75
|
+
* Jonathan Dance
|
76
|
+
* Jonathan Roes
|
77
|
+
* Joshua B. Smith
|
78
|
+
* Joshua Gross
|
79
|
+
* Joshua Mckinney
|
80
|
+
* Joshua Napoli
|
81
|
+
* Kelly Mahan
|
82
|
+
* Kensuke Nagae
|
83
|
+
* Kimmo Lehto
|
84
|
+
* Koen Rouwhorst
|
85
|
+
* Konstantin Shabanov
|
86
|
+
* Kyle Purkiss
|
87
|
+
* Kyle Rames
|
88
|
+
* Lewis Marshall
|
89
|
+
* Lincoln Stoll
|
90
|
+
* Louis Sobel
|
91
|
+
* Mahemoff
|
92
|
+
* Marco Costa
|
93
|
+
* Markus Bucher
|
94
|
+
* Mathias Meyer
|
95
|
+
* Matt Gauger
|
96
|
+
* Matt Palmer
|
97
|
+
* Matt Sanders
|
98
|
+
* Matt Snyder
|
99
|
+
* Matt Todd
|
100
|
+
* Maurice Schreiber
|
101
|
+
* Max Lincoln
|
102
|
+
* Michael Brodhead
|
103
|
+
* Michael Hale
|
104
|
+
* Michael Rowe
|
105
|
+
* Michael Rykov
|
106
|
+
* Mike Heffner
|
107
|
+
* Milovan Zogovic
|
108
|
+
* Myron Marston
|
109
|
+
* Nathan Long
|
110
|
+
* Nathan Sutton
|
111
|
+
* Nick Osborn
|
112
|
+
* Nicolas Leger
|
113
|
+
* Nicolas Sanguinetti
|
114
|
+
* Paul Gideon Dann
|
115
|
+
* Pavel
|
116
|
+
* Pavel Valena
|
117
|
+
* Peter Meier
|
118
|
+
* Peter Weldon
|
119
|
+
* Phil Ross
|
120
|
+
* Raul Murciano
|
121
|
+
* Richard Godbee
|
122
|
+
* Richard Ramsden
|
123
|
+
* Rohan Mendon
|
124
|
+
* Ruslan Korolev
|
125
|
+
* Ruslan Kyrychuk
|
126
|
+
* Ryan Bigg
|
127
|
+
* Ryan Mohr
|
128
|
+
* Ryan Schlesinger
|
129
|
+
* Ryoji Yoshioka
|
130
|
+
* Sam
|
131
|
+
* Sam Lehman
|
132
|
+
* Sam Withrow
|
133
|
+
* Scott Gonyea
|
134
|
+
* Scott Walkinshaw
|
135
|
+
* Sean Cribbs
|
136
|
+
* Sergio Rubio
|
137
|
+
* Shai Rosenfeld
|
138
|
+
* Stan Hu
|
139
|
+
* Stefan Merettig
|
140
|
+
* Stephen Chu
|
141
|
+
* Swanand Pagnis
|
142
|
+
* Terry Howe
|
143
|
+
* Thom Mahoney & Josh Lane
|
144
|
+
* Thom May
|
145
|
+
* Tim Carey-Smith
|
146
|
+
* Timothée Peignier
|
147
|
+
* Tobias Schmidt
|
148
|
+
* Todd Lunter
|
149
|
+
* Tom Maher
|
150
|
+
* Trym Skaar
|
151
|
+
* Tuomas Silen
|
152
|
+
* Victor Costan
|
153
|
+
* Viven
|
154
|
+
* Vít Ondruch
|
155
|
+
* Wesley Beary
|
156
|
+
* Yusuke Nakamura
|
157
|
+
* Zach Anker
|
158
|
+
* chrisrhoden
|
159
|
+
* dependabot[bot]
|
160
|
+
* dickeyxxx
|
161
|
+
* geemus
|
162
|
+
* geemus (Wesley Beary)
|
163
|
+
* ggoodale
|
164
|
+
* ivan.filenko
|
165
|
+
* jasquat
|
166
|
+
* karimb
|
167
|
+
* marios
|
168
|
+
* mkb
|
169
|
+
* nathannaveen
|
170
|
+
* ojab
|
171
|
+
* patrick brisbin
|
172
|
+
* pavel
|
173
|
+
* phiggins
|
174
|
+
* rin_ne
|
175
|
+
* rinrinne
|
176
|
+
* rkyrychuk
|
177
|
+
* shale
|
178
|
+
* sshaw
|
179
|
+
* starbelly
|
180
|
+
* twrodriguez
|
181
|
+
* wsnarski
|
182
|
+
* zimbatm
|
data/excon.gemspec
CHANGED
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_development_dependency('eventmachine', '>= 1.0.4')
|
27
27
|
s.add_development_dependency('open4')
|
28
28
|
s.add_development_dependency('rake')
|
29
|
-
s.add_development_dependency('rdoc')
|
30
29
|
s.add_development_dependency('shindo')
|
31
30
|
s.add_development_dependency('sinatra')
|
32
31
|
s.add_development_dependency('sinatra-contrib')
|
data/lib/excon/connection.rb
CHANGED
@@ -89,7 +89,9 @@ module Excon
|
|
89
89
|
end
|
90
90
|
|
91
91
|
if @data[:scheme] == UNIX
|
92
|
-
|
92
|
+
# 'uri' >= v0.12.0 returns an empty string instead of nil for no host.
|
93
|
+
# So treat the parameter as present if and only if it is both non-nill and non-empty.
|
94
|
+
if @data[:host] && !@data[:host].empty?
|
93
95
|
raise ArgumentError, "The `:host` parameter should not be set for `unix://` connections.\n" +
|
94
96
|
"When supplying a `unix://` URI, it should start with `unix:/` or `unix:///`."
|
95
97
|
elsif !@data[:socket]
|
data/lib/excon/response.rb
CHANGED
@@ -20,15 +20,24 @@ module Excon
|
|
20
20
|
def host
|
21
21
|
@data[:host]
|
22
22
|
end
|
23
|
+
def scheme
|
24
|
+
@data[:scheme]
|
25
|
+
end
|
23
26
|
def local_address
|
24
27
|
@data[:local_address]
|
25
28
|
end
|
26
29
|
def local_port
|
27
30
|
@data[:local_port]
|
28
31
|
end
|
32
|
+
def http_method # can't be named "method"
|
33
|
+
@data[:method]
|
34
|
+
end
|
29
35
|
def path
|
30
36
|
@data[:path]
|
31
37
|
end
|
38
|
+
def query
|
39
|
+
@data[:query]
|
40
|
+
end
|
32
41
|
def port
|
33
42
|
@data[:port]
|
34
43
|
end
|
@@ -72,8 +81,11 @@ module Excon
|
|
72
81
|
:body => String.new,
|
73
82
|
:cookies => [],
|
74
83
|
:host => datum[:host],
|
84
|
+
:scheme => datum[:scheme],
|
85
|
+
:method => datum[:method],
|
75
86
|
:headers => Excon::Headers.new,
|
76
87
|
:path => datum[:path],
|
88
|
+
:query => datum[:query],
|
77
89
|
:port => datum[:port],
|
78
90
|
:status => status,
|
79
91
|
:status_line => line,
|
data/lib/excon/socket.rb
CHANGED
@@ -72,8 +72,8 @@ module Excon
|
|
72
72
|
if idx.nil?
|
73
73
|
result << block
|
74
74
|
else
|
75
|
-
|
76
|
-
|
75
|
+
result << block.slice!(0, idx+1)
|
76
|
+
add_to_read_buffer(block)
|
77
77
|
break
|
78
78
|
end
|
79
79
|
block = read_nonblock(@data[:chunk_size]) || raise(EOFError)
|
@@ -194,8 +194,14 @@ module Excon
|
|
194
194
|
|
195
195
|
def read_nonblock(max_length)
|
196
196
|
begin
|
197
|
-
|
198
|
-
@
|
197
|
+
if max_length
|
198
|
+
until @backend_eof || @read_buffer.length >= max_length
|
199
|
+
@read_buffer << @socket.read_nonblock(max_length - @read_buffer.length)
|
200
|
+
end
|
201
|
+
else
|
202
|
+
while !@backend_eof
|
203
|
+
@read_buffer << @socket.read_nonblock(@data[:chunk_size])
|
204
|
+
end
|
199
205
|
end
|
200
206
|
rescue OpenSSL::SSL::SSLError => error
|
201
207
|
if error.message == 'read would block'
|
data/lib/excon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.96.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dpiddy (Dan Peterson)
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-01-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -96,20 +96,6 @@ dependencies:
|
|
96
96
|
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
|
-
- !ruby/object:Gem::Dependency
|
100
|
-
name: rdoc
|
101
|
-
requirement: !ruby/object:Gem::Requirement
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: '0'
|
106
|
-
type: :development
|
107
|
-
prerelease: false
|
108
|
-
version_requirements: !ruby/object:Gem::Requirement
|
109
|
-
requirements:
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: '0'
|
113
99
|
- !ruby/object:Gem::Dependency
|
114
100
|
name: shindo
|
115
101
|
requirement: !ruby/object:Gem::Requirement
|