uri-query_params 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.5.4 / 2011-03-19
2
+
3
+ * Fixed a bug when parsing query params containing `&&&&`.
4
+
1
5
  ### 0.5.3 / 2011-03-11
2
6
 
3
7
  * Only require `uri/common` for `URI.escape` and `URI.unescape`.
@@ -30,6 +30,9 @@ module URI
30
30
 
31
31
  if query_string
32
32
  query_string.split('&').each do |param|
33
+ # skip empty params
34
+ next if param.empty?
35
+
33
36
  name, value = param.split('=',2)
34
37
 
35
38
  if value
@@ -1,6 +1,6 @@
1
1
  module URI
2
2
  module QueryParams
3
3
  # uri-query_params version
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.4'
5
5
  end
6
6
  end
@@ -9,6 +9,10 @@ describe URI::QueryParams do
9
9
  subject.parse('').should be_empty
10
10
  end
11
11
 
12
+ it "should not parse empty params" do
13
+ subject.parse('a&&&b').should == {'a' => '', 'b' => ''}
14
+ end
15
+
12
16
  it "should parse a single query param name" do
13
17
  subject.parse('x').should have_key('x')
14
18
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: uri-query_params
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.3
5
+ version: 0.5.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Postmodern
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-11 00:00:00 -08:00
13
+ date: 2011-03-19 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -109,6 +109,6 @@ signing_key:
109
109
  specification_version: 3
110
110
  summary: Access the query parameters of a URI, just like $_GET in PHP.
111
111
  test_files:
112
- - spec/extensions/http_spec.rb
113
- - spec/extensions/https_spec.rb
114
112
  - spec/query_params_spec.rb
113
+ - spec/extensions/https_spec.rb
114
+ - spec/extensions/http_spec.rb