nested_hash 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/lib/nested_hash.rb +1 -1
- data/lib/nested_hash/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
|
2
|
+
2012-05-16 Guillermo Alvarez Fernandez <guillermo@cientifico.net>
|
3
|
+
|
4
|
+
* nested_hash.rb (process): Now the values are sanitized correctly
|
5
|
+
|
6
|
+
|
2
7
|
2012-05-09 Guillermo Alvarez Fernandez <guillermo@cientifico.net>
|
3
8
|
|
4
9
|
* nested_hash.rb (process_nested): Added the ability of have hashs inside of
|
data/lib/nested_hash.rb
CHANGED
@@ -45,6 +45,7 @@ class NestedHash < Hash
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def process(key,value)
|
48
|
+
value = sanitize_value(value)
|
48
49
|
if key =~ /\./
|
49
50
|
process_nested(key,value)
|
50
51
|
else
|
@@ -52,7 +53,6 @@ class NestedHash < Hash
|
|
52
53
|
end
|
53
54
|
end
|
54
55
|
|
55
|
-
|
56
56
|
def sanitize_value(v)
|
57
57
|
v
|
58
58
|
end
|
data/lib/nested_hash/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nested_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-16 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'For example a hash like { "properties.age" => 3 } will be converted
|
15
15
|
into { "properties" => {"age" => 3}} '
|