rack-jquery-params 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +20 -0
- data/README.md +7 -0
- data/lib/rack/jquery-params/load.rb +2 -2
- data/lib/rack/jquery-params/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce3c91709327a9b32de8dadfaf39134e97619250
|
4
|
+
data.tar.gz: bf9357248ce5c3bc4ec440495926cd03e6ba265c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78eccab00c7212b0dc7a449776498c6b5702b5023e3c54c55aedcb1005c5ac615b02ed44d585af8813f516cb40b3da5494f7eb0bf77bfdcdfa352da72f377e5a
|
7
|
+
data.tar.gz: 9eb1f64ff1911b2573dc72ce06cf1b5aee5535260950faae72ba4ee114fa794d4b0eb6a14ad32707fc5b976df8e952a864842d07caa67c903bb98ee756bb86e3
|
data/LICENSE.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Caleb Clark
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -4,6 +4,8 @@ rack-jquery-params
|
|
4
4
|
A Rack middleware that bridges the discrepancy between jQuery.param and how Rack parses nested params within query
|
5
5
|
strings and post bodies.
|
6
6
|
|
7
|
+
[![Gem Version](https://badge.fury.io/rb/rack-jquery-params.svg)](http://badge.fury.io/rb/rack-jquery-params)
|
8
|
+
|
7
9
|
If you use jQuery's get, post, put, or ajax methods then jQuery.param is run on your data. The problem is that jQuery.param
|
8
10
|
turns this javascript object:
|
9
11
|
|
@@ -77,3 +79,8 @@ use Rack::JQueryParams :applies_to => :get
|
|
77
79
|
```ruby
|
78
80
|
use Rack::JQueryParams :applies_to => [:get, :put, :delete]
|
79
81
|
```
|
82
|
+
|
83
|
+
|
84
|
+
## License
|
85
|
+
|
86
|
+
Please refer to [LICENSE.md](https://github.com/calebclark/rack-jquery-params/blob/master/LICENSE.md).
|
@@ -24,8 +24,8 @@ module Rack
|
|
24
24
|
def self.fix(env, valid_methods=:all)
|
25
25
|
valid_methods = extract_valid_methods(valid_methods)
|
26
26
|
return if valid_methods != :all and !valid_methods.include?(env['REQUEST_METHOD'])
|
27
|
-
env['rack.request.query_hash']
|
28
|
-
env['rack.request.form_hash']
|
27
|
+
fix_param(env['rack.request.query_hash'])
|
28
|
+
fix_param(env['rack.request.form_hash'])
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.fix_param(param)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-jquery-params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Clark
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- .yardopts
|
36
36
|
- .yardopts.rb
|
37
37
|
- Gemfile
|
38
|
+
- LICENSE.md
|
38
39
|
- README.md
|
39
40
|
- Rakefile
|
40
41
|
- lib/rack/jquery-params.rb
|