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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9172bcca4b13cbe8b15425156a6139deb65cb013
4
- data.tar.gz: 1c3452cd4b88cac928c732098e65ef2c7bc5fce8
3
+ metadata.gz: ce3c91709327a9b32de8dadfaf39134e97619250
4
+ data.tar.gz: bf9357248ce5c3bc4ec440495926cd03e6ba265c
5
5
  SHA512:
6
- metadata.gz: 89ff06303106907931d430498f98fce1cf150a05ed03491ebab743c95e927b57ba6e1f5e2f1cd59f3dbc3521b8bee7a3eee21f899d4dab6b4693642bf11e5a4d
7
- data.tar.gz: 299c03e247fa6dfb1bda73714940d4bd18091b007500b51334e94367cc9896474744bc12f3caeb52d6c184f112425c2f786d885b5daa0f39ec99ba6c280c03d2
6
+ metadata.gz: 78eccab00c7212b0dc7a449776498c6b5702b5023e3c54c55aedcb1005c5ac615b02ed44d585af8813f516cb40b3da5494f7eb0bf77bfdcdfa352da72f377e5a
7
+ data.tar.gz: 9eb1f64ff1911b2573dc72ce06cf1b5aee5535260950faae72ba4ee114fa794d4b0eb6a14ad32707fc5b976df8e952a864842d07caa67c903bb98ee756bb86e3
@@ -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'].each {|k,p| env['rack.request.query_hash'][k] = fix_param(p) }
28
- env['rack.request.form_hash'].each {|k,p| env['rack.request.form_hash'][k] = fix_param(p) }
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)
@@ -1,3 +1,3 @@
1
1
  class Rack::JQueryParams
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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