coral_core 0.2.16 → 0.2.17
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.
- data/VERSION +1 -1
- data/coral_core.gemspec +1 -1
- data/lib/coral_core/resource.rb +7 -2
- data/lib/coral_core/util/data.rb +4 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.17
|
data/coral_core.gemspec
CHANGED
data/lib/coral_core/resource.rb
CHANGED
@@ -91,12 +91,16 @@ module Resource
|
|
91
91
|
#---
|
92
92
|
|
93
93
|
def self.render(resource, options = {})
|
94
|
-
|
94
|
+
resource = Core.string_map(resource.clone)
|
95
|
+
config = Config.ensure(options)
|
95
96
|
|
96
|
-
|
97
|
+
resource.keys.each do |name|
|
97
98
|
if match = name.match(/^(.+)_template$/)
|
98
99
|
target = match.captures[0]
|
99
100
|
|
101
|
+
#dbg(name, 'name')
|
102
|
+
#dbg(target, 'target')
|
103
|
+
|
100
104
|
config.set(:noralize_template, config.get("normalize_#{target}", true))
|
101
105
|
config.set(:interpolate_template, config.get("interpolate_#{target}", true))
|
102
106
|
|
@@ -105,6 +109,7 @@ module Resource
|
|
105
109
|
end
|
106
110
|
end
|
107
111
|
|
112
|
+
#dbg(resource, 'render exit')
|
108
113
|
return resource
|
109
114
|
end
|
110
115
|
|
data/lib/coral_core/util/data.rb
CHANGED
@@ -107,8 +107,11 @@ class Data
|
|
107
107
|
force = force.is_a?(Coral::Config) ? force.get(:force, true) : force
|
108
108
|
|
109
109
|
if data.is_a?(Array)
|
110
|
-
value = data.shift
|
110
|
+
value = data.shift.clone
|
111
|
+
|
111
112
|
data.each do |item|
|
113
|
+
item = item.clone
|
114
|
+
|
112
115
|
case value
|
113
116
|
when Hash
|
114
117
|
begin
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coral_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 53
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 17
|
10
|
+
version: 0.2.17
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adrian Webb
|