canonical-rails 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/canonical_rails/tag_helper.rb +11 -1
- data/lib/canonical-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ccc17e60d57cf2678fae82ce8714e93c3507399e
|
|
4
|
+
data.tar.gz: a25733846d8db5cd144075730d16e2944516bc56
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa4c02c6d87c9923b1a0adb553bcd507c53c42abb7d2bb2156a5929dd2d29e8cc652f62fede618394dd3e49f32886643931cedc412b0ad9722a2a870dcb649bc
|
|
7
|
+
data.tar.gz: c44509c74e0b4932dc1990bf24a2ef4ea794ddcfeb042beea559b76b0d84dce277faa35a6af545d990f3fe371225b3b74f6dcd1370cbdd494e9794469447f022
|
|
@@ -37,7 +37,17 @@ module CanonicalRails
|
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def whitelisted_query_string
|
|
40
|
-
|
|
40
|
+
# Rack 1.4.5 fails to handle params that are not strings
|
|
41
|
+
# So if
|
|
42
|
+
# my_hash = { "a" => 1, "b" => 2}
|
|
43
|
+
# Rack::Utils.build_nested_query(my_hash) would return
|
|
44
|
+
# "a&b"
|
|
45
|
+
# Rack 1.4.5 did not have a test case for this scenario
|
|
46
|
+
# https://github.com/rack/rack/blob/9939d40a5e23dcb058751d1029b794aa2f551900/test/spec_utils.rb#L222
|
|
47
|
+
# Rack 1.6.0 has it
|
|
48
|
+
# https://github.com/rack/rack/blob/65a7104b6b3e9ecd8f33c63a478ab9a33a103507/test/spec_utils.rb#L251
|
|
49
|
+
|
|
50
|
+
"?" + Rack::Utils.build_nested_query(Hash[whitelisted_params.map{|k,v| v.is_a?(Numeric) ? [k,v.to_s] : [k,v]}]) if whitelisted_params.present?
|
|
41
51
|
end
|
|
42
52
|
end
|
|
43
53
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: canonical-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Ivanov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-03-
|
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|