excon 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/excon/utils.rb +5 -11
- data/lib/excon/version.rb +1 -1
- data/lib/excon.rb +2 -2
- 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: 9cadb0fca5300321fa61bcdb57371355155c81328976a0f9e656e73b272e7b2c
|
4
|
+
data.tar.gz: 82fcc66b00fbda3159cab3153e8a084b68bf5c5fc193e5c2fb1b3eca511e8999
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 696637b0c1d203447e5b45ca73c7d5c97ed8dc2dea05c60873828b661c2d63f44a9c10b4970cc6ec79b9daa05abae603a5e015297c6c67046a8318c0768aa4e8
|
7
|
+
data.tar.gz: 62ec0190538e8ed8665e8f9bf95108d5acf9e3f6a4f7c71200dde2d6582c99fe444d9b6a2450c1f101d98ec784df4537fd677ed21744fd2d9c6d44b6fb5ef606
|
data/lib/excon/utils.rb
CHANGED
@@ -69,21 +69,15 @@ module Excon
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
params = {}
|
72
|
+
def split_query_string(string)
|
73
|
+
query = {}
|
75
74
|
|
76
75
|
string.split(/[&;] */n).each do |pair|
|
77
|
-
key, value = pair.split('=', 2)
|
78
|
-
|
79
|
-
params[key] = if params[key]
|
80
|
-
[params[key], value].flatten
|
81
|
-
else
|
82
|
-
value
|
83
|
-
end
|
76
|
+
key, value = pair.split('=', 2)
|
77
|
+
query[key] = query[key] ? [query[key], value].flatten : value
|
84
78
|
end
|
85
79
|
|
86
|
-
|
80
|
+
query
|
87
81
|
end
|
88
82
|
|
89
83
|
def default_port?(datum)
|
data/lib/excon/version.rb
CHANGED
data/lib/excon.rb
CHANGED
@@ -163,7 +163,7 @@ module Excon
|
|
163
163
|
request_params[:headers] = headers
|
164
164
|
end
|
165
165
|
if request_params.key?(:query) && request_params[:query].instance_of?(String)
|
166
|
-
request_params[:query] = Utils.
|
166
|
+
request_params[:query] = Utils.split_query_string(request_params[:query])
|
167
167
|
end
|
168
168
|
if block_given?
|
169
169
|
raise(ArgumentError, 'stub requires either response_params OR a block') if response_params
|
@@ -186,7 +186,7 @@ module Excon
|
|
186
186
|
request_params[:method] = method.to_s.downcase.to_sym
|
187
187
|
end
|
188
188
|
if request_params.key?(:query) && request_params[:query].instance_of?(String)
|
189
|
-
request_params[:query] = Utils.
|
189
|
+
request_params[:query] = Utils.split_query_string(request_params[:query])
|
190
190
|
end
|
191
191
|
Excon.stubs.each do |stub, response_params|
|
192
192
|
captures = { headers: {} }
|
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: 1.1.
|
4
|
+
version: 1.1.1
|
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: 2024-10-
|
13
|
+
date: 2024-10-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|