excon 0.95.0 → 0.96.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/lib/excon/connection.rb +3 -1
- data/lib/excon/response.rb +12 -0
- data/lib/excon/version.rb +1 -1
- metadata +2 -2
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/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/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
|