queryparams 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -4
- data/lib/queryparams.rb +2 -0
- data/lib/queryparams/version.rb +1 -1
- data/spec/queryparams_spec.rb +1 -0
- metadata +3 -3
data/README.md
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
|
3
3
|
A straight forward gem to convert ruby hashes and arrays to http query strings. It supports hashes, arrays, nested hashes and arrays of hashes and all combinations thereof. E.g.:
|
4
4
|
|
5
|
-
|
5
|
+
QueryParams.encode({a: 1, b: "c"})
|
6
6
|
=> "a=1&b=c"
|
7
7
|
|
8
|
-
|
8
|
+
QueryParams.encode({a: {b: 'c', d: 'e'}, f: 'g'})
|
9
9
|
=> "a[b]=c&a[d]=e&f=g"
|
10
10
|
|
11
|
-
|
11
|
+
QueryParams.encode({a: ['bingo', 'hepp']})
|
12
12
|
=> "a[0]=bingo&a[1]=hepp"
|
13
13
|
|
14
|
-
|
14
|
+
QueryParams.encode({a: [{b:'c', d:'e'}, {f:'g'}]})
|
15
15
|
=> "a[0][b]=c&a[0][d]=e&a[1][f]=g"
|
data/lib/queryparams.rb
CHANGED
data/lib/queryparams/version.rb
CHANGED
data/spec/queryparams_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queryparams
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-29 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70151522636860 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70151522636860
|
25
25
|
description: ! ' It supports hashes, arrays, nested hashes and arrays of hashes and
|
26
26
|
all combinations thereof.'
|
27
27
|
email:
|