beachio-hammer 0.1.0.pre8 → 0.1.0.pre9
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/Gemfile.lock +1 -1
- data/lib/hammer/tag_parser.rb +5 -1
- data/lib/hammer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '07779bca29478e635f67821d004ba96905631011cb967e95e00a6d1e84487411'
|
|
4
|
+
data.tar.gz: bc4e18fc7474ced30a3a7870526f52aa0d686929a3e6acdc65cfd3c220210498
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e448896ed2855bc9ff9cdc3577c42e7a0f701ef4deae3e3caddeb692a9239b0cedfa1caa6f92c1be0556bc98912a0d1a7aa8f63ef4f5d9a7ad09d8ff6da9af6
|
|
7
|
+
data.tar.gz: 8dd7f8b90f6111c8dcf800ee8270948f32594566993355e07d243f48654253d6ee4c63ab0ba30dc35d00d02536cb5de64565c5f3009ecae7ef4aad6c0e61685a
|
data/Gemfile.lock
CHANGED
data/lib/hammer/tag_parser.rb
CHANGED
|
@@ -235,10 +235,14 @@ module Hammer
|
|
|
235
235
|
processed = array_data.map do |item|
|
|
236
236
|
item_content = template.dup
|
|
237
237
|
item_hash = item.is_a?(Hash) ? item.transform_keys(&:to_s) : { "value" => item.to_s }
|
|
238
|
+
# Resolve dotted paths (e.g. @post.category.name) before scalar @post.category
|
|
239
|
+
# substitution — relation fields are Hashes and value_to_string(Hash) is empty.
|
|
240
|
+
item_content = process_nested_properties(item_content, item_hash, item_name)
|
|
238
241
|
item_hash.each do |key, value|
|
|
242
|
+
next if value.is_a?(Hash) || value.is_a?(Array)
|
|
243
|
+
|
|
239
244
|
item_content.gsub!("@#{item_name}.#{key}", value_to_string(value))
|
|
240
245
|
end
|
|
241
|
-
item_content = process_nested_properties(item_content, item_hash, item_name)
|
|
242
246
|
item_content = process_conditionals_in_loop(item_content, item_hash, item_name)
|
|
243
247
|
process_helper_expressions_in_loop(item_content, item_hash, item_name)
|
|
244
248
|
end.join
|
data/lib/hammer/version.rb
CHANGED