parliament-ruby 1.0.0.pre4 → 1.0.0.pre5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fce7d9868bffbb9e8dc6d7a74bac5363f162e992
4
- data.tar.gz: 123f984616d9b2d5f5e623d9b22ed40a3328ef7a
3
+ metadata.gz: 296c0c0aa835ccd1ccd468d6a69e175302cee33e
4
+ data.tar.gz: 44a5e4602ce21c06829758aecbef61fc0d9692bf
5
5
  SHA512:
6
- metadata.gz: 07c5c78e0312f5a73a8444182b7d184dd8628e1c032682246dff42a06ea2f61ab5583fe6716c80a5c47b47387e0e9e9bad74b25474fbce07d32036aa860fa34e
7
- data.tar.gz: 944895ca5b29fd03ee27cc744fd763c13868884c59a8d4957b518f591e2e92b3ca9fc0787e8868c5687d93576d15da57b34dc3ace4cf30501b81d71ca991eba9
6
+ metadata.gz: ea81f80fd2066531f4cbc9075330483638608c04384102a4739f086a79b8df1aa6e0e7ac72c0593b969c7bf9c9e7404dc494af9aa3b8e5e6248461a16deaeb5a
7
+ data.tar.gz: a333b7fa798c5c9d164db4f3f268ddb40e092c23cbe4f69d2e12fd53d8ebad2d88064db9740cc53ff049bb8de3366be7d6d5280c984641f177a58452d3f8b389
@@ -194,15 +194,21 @@ module Parliament
194
194
  def separate_uri(query_url, query_params, additional_params)
195
195
  endpoint = URI.parse(query_url)
196
196
 
197
- temp_params = endpoint.query ? URI.decode_www_form(endpoint.query).to_h : {}
197
+ temp_params = {}
198
+
199
+ if endpoint.query
200
+ # Returns [ ["key", "value"], ["key", "value"] ]
201
+ key_value_array = URI.decode_www_form(endpoint.query)
202
+ key_value_array.map! { |key_value_pair| [ key_value_pair[0].to_sym, key_value_pair[1] ] }
203
+ temp_params = key_value_array.to_h
204
+ end
205
+
198
206
  temp_params = temp_params.merge(query_params)
199
207
  temp_params = temp_params.merge(additional_params) unless additional_params.nil?
200
208
 
201
209
  endpoint.query = nil
202
210
 
203
- encoded_params = URI.encode_www_form(temp_params.to_a) unless temp_params.empty?
204
-
205
- { endpoint: endpoint, params: encoded_params }
211
+ { endpoint: endpoint, params: temp_params }
206
212
  end
207
213
  end
208
214
  end
@@ -1,3 +1,3 @@
1
1
  module Parliament
2
- VERSION = '1.0.0.pre4'.freeze
2
+ VERSION = '1.0.0.pre5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parliament-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre4
4
+ version: 1.0.0.pre5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Rayner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-18 00:00:00.000000000 Z
11
+ date: 2018-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus