excon 0.3.7 → 0.3.8

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.
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'excon'
16
- s.version = '0.3.7'
17
- s.date = '2011-01-05'
16
+ s.version = '0.3.8'
17
+ s.date = '2011-01-07'
18
18
  s.rubyforge_project = 'excon'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -13,7 +13,7 @@ require 'excon/response'
13
13
  module Excon
14
14
 
15
15
  unless const_defined?(:VERSION)
16
- VERSION = '0.3.7'
16
+ VERSION = '0.3.8'
17
17
  end
18
18
 
19
19
  unless const_defined?(:CHUNK_SIZE)
@@ -62,9 +62,15 @@ module Excon
62
62
  when Hash
63
63
  request << '?'
64
64
  for key, values in params[:query]
65
- for value in [*values]
66
- value_string = value && ('=' << CGI.escape(value.to_s))
67
- request << key.to_s << value_string.to_s << '&'
65
+ case values
66
+ when nil
67
+ request << "#{key}&"
68
+ when Array
69
+ for value in values
70
+ request << "#{key}=#{CGI.escape(value.to_s)}&"
71
+ end
72
+ else
73
+ request << "#{key}=#{CGI.escape(values.to_s)}&"
68
74
  end
69
75
  end
70
76
  request.chop! # remove trailing '&'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 7
10
- version: 0.3.7
9
+ - 8
10
+ version: 0.3.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - geemus (Wesley Beary)
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-05 00:00:00 -08:00
18
+ date: 2011-01-07 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency