souschef-config 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/souschef/config.rb +8 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09866af0387ee6f6896f9a3d55409d22ccf6f6ab
4
- data.tar.gz: 7ea973448b4280fcbd807cde35fe6a5944220165
3
+ metadata.gz: 225c8c180f0fadcb3886c832b794b1859adcd8eb
4
+ data.tar.gz: 02f96e65cb4bce98224fa9e716b818fe379e6ae6
5
5
  SHA512:
6
- metadata.gz: 240a7b4f75ec8959a1e0f996bed7504a88834ff52b0a4d313d8ae204687010b999bf04e275ac075f2287f5571347f544c02f8964188704f3ee0ec8b8d58734d6
7
- data.tar.gz: b30bc0ca9ec187ccba0fcbec7f4248e9e8e56252cd1b0b13de0f4f4280e1f4b4c6e3038c656791e11632044b607627fa082d4341c89b435fbbca8f125f11372c
6
+ metadata.gz: 2ac741dbae0eda353bed5d4bfd06c24f828d65cb13151ee7aab4ba14cb388fa702c0f58b6000471703149e70d4076c900fd7bdcb3cea058c0dd495f9088a7804
7
+ data.tar.gz: 59b95fadee098f4905399785d6d428d660d777a33315b09e706f72ebff7015a88b9bc7b1432d3bd5385c33e727ddacc2af75493e432d37653b00fc2c6ebb9ce6
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souschef-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Blacksmith