httparty 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of httparty might be problematic. Click here for more details.

data/History CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.7.7 2011-04-16
2
+ * bug fix
3
+ * Fix NoMethodError when using the NON_RAILS_QUERY_STRING_NORMALIZER with a hash whose key is a symbol and value is nil
4
+
1
5
  == 0.7.5 2011-04-16
2
6
  * bug fix
3
7
  * caused issue with latest rubygems
@@ -14,7 +14,7 @@ module HTTParty
14
14
  NON_RAILS_QUERY_STRING_NORMALIZER = Proc.new do |query|
15
15
  Array(query).map do |key, value|
16
16
  if value.nil?
17
- key
17
+ key.to_s
18
18
  elsif value.is_a?(Array)
19
19
  value.map {|v| "#{key}=#{URI.encode(v.to_s, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}"}
20
20
  else
@@ -1,5 +1,5 @@
1
1
  module HTTParty
2
- VERSION = "0.7.6".freeze
2
+ VERSION = "0.7.7".freeze
3
3
 
4
4
  CRACK_DEPENDENCY = "0.1.8".freeze
5
- end
5
+ end
@@ -13,7 +13,7 @@ describe HTTParty::Request do
13
13
  URI.unescape(query_string).should == "foo=bar&foo=baz"
14
14
  end
15
15
 
16
- context "when representing an array" do
16
+ context "when the query is an array" do
17
17
 
18
18
  it "doesn't include brackets" do
19
19
  query_string = normalizer[{:page => 1, :foo => %w(bar baz)}]
@@ -25,6 +25,13 @@ describe HTTParty::Request do
25
25
  query_string.should == "people=Bob%20Marley&people=Tim%20%26%20Jon"
26
26
  end
27
27
  end
28
+
29
+ context "when the query is a hash" do
30
+ it "correctly handles nil values" do
31
+ query_string = normalizer[{:page => 1, :per_page => nil}]
32
+ query_string.should == "page=1&per_page"
33
+ end
34
+ end
28
35
  end
29
36
 
30
37
  describe "initialization" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httparty
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
4
+ hash: 13
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 6
10
- version: 0.7.6
9
+ - 7
10
+ version: 0.7.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Nunemaker
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-04-16 00:00:00 -04:00
19
+ date: 2011-04-20 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -103,12 +103,13 @@ dependencies:
103
103
  requirements:
104
104
  - - "="
105
105
  - !ruby/object:Gem::Version
106
- hash: -1876988191
106
+ hash: 1923831981
107
107
  segments:
108
108
  - 1
109
109
  - 2
110
110
  - 0
111
- - pre2
111
+ - pre
112
+ - 2
112
113
  version: 1.2.0.pre2
113
114
  type: :development
114
115
  version_requirements: *id006
@@ -222,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
223
  requirements: []
223
224
 
224
225
  rubyforge_project:
225
- rubygems_version: 1.3.7
226
+ rubygems_version: 1.4.2
226
227
  signing_key:
227
228
  specification_version: 3
228
229
  summary: Makes http fun! Also, makes consuming restful web services dead easy.