Skip to content

Commit

Permalink
Updated dependency on Addressable to version >= 2.2.7 to handle neste…
Browse files Browse the repository at this point in the history
…d hash query values. I.e. `?one[two][three][]=four&one[two][three][]=five`
  • Loading branch information
bblimke committed Feb 19, 2012
1 parent 44de728 commit e56d313
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -49,6 +49,8 @@

Thanks to [Myron Marston](https://github.com/myronmarston)

* Updated dependency on Addressable to version >= 2.2.7 to handle nested hash query values. I.e. `?one[two][three][]=four&one[two][three][]=five`

* Fixed compatibility with Curb >= 0.7.16 This breaks compatibility with Curb < 0.7.16

* Fix #to_rack to handle non-array response bodies.
Expand Down
6 changes: 6 additions & 0 deletions spec/unit/util/uri_spec.rb
Expand Up @@ -178,6 +178,12 @@
uri = WebMock::Util::URI.normalize_uri(uri_string)
uri.query_values.should == {"a"=>{"d"=>"b", "e"=>"c", "b"=>{"c"=>"1"}}}
end

it "should successfully handle nested hash parameters" do
uri_string = 'http://www.example.com:80/path?one[two][three][]=four&one[two][three][]=five'
uri = WebMock::Util::URI.normalize_uri(uri_string)
uri.query_values.should == {"one"=>{"two"=>{"three" => ["four", "five"]}}}
end
end

describe "stripping default port" do
Expand Down
2 changes: 1 addition & 1 deletion webmock.gemspec
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |s|

s.rubyforge_project = 'webmock'

s.add_dependency 'addressable', '~> 2.2', '> 2.2.5'
s.add_dependency 'addressable', '>= 2.2.7'
s.add_dependency 'crack', '>=0.1.7'

s.add_development_dependency 'rspec', '~> 2.8'
Expand Down

0 comments on commit e56d313

Please sign in to comment.