souschef-config 0.0.1 → 0.0.2
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/lib/souschef/config.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 225c8c180f0fadcb3886c832b794b1859adcd8eb
|
|
4
|
+
data.tar.gz: 02f96e65cb4bce98224fa9e716b818fe379e6ae6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2ac741dbae0eda353bed5d4bfd06c24f828d65cb13151ee7aab4ba14cb388fa702c0f58b6000471703149e70d4076c900fd7bdcb3cea058c0dd495f9088a7804
|
|
7
|
+
data.tar.gz: 59b95fadee098f4905399785d6d428d660d777a33315b09e706f72ebff7015a88b9bc7b1432d3bd5385c33e727ddacc2af75493e432d37653b00fc2c6ebb9ce6
|
data/lib/souschef/config.rb
CHANGED
|
@@ -67,6 +67,9 @@ module SousChef
|
|
|
67
67
|
context ||= hash
|
|
68
68
|
context[:__key__] = ''
|
|
69
69
|
|
|
70
|
+
_normalize(hash)
|
|
71
|
+
_normalize(context)
|
|
72
|
+
|
|
70
73
|
if not context.key? :__root__
|
|
71
74
|
context[:__root__] = context
|
|
72
75
|
end
|
|
@@ -119,5 +122,10 @@ module SousChef
|
|
|
119
122
|
attr_hash
|
|
120
123
|
end
|
|
121
124
|
|
|
125
|
+
@private
|
|
126
|
+
def _normalize(hash)
|
|
127
|
+
hash[:__default__] = hash.delete '__default__' if hash.key? '__default__'
|
|
128
|
+
hash[:__items__] = hash.delete '__items__' if hash.key? '__items__'
|
|
129
|
+
end
|
|
122
130
|
end
|
|
123
131
|
end
|