lib/aws/cfn/compiler/mixins/compile.rb in aws-cfn-compiler-0.9.4 vs lib/aws/cfn/compiler/mixins/compile.rb in aws-cfn-compiler-0.9.5
- old
+ new
@@ -31,11 +31,25 @@
when :Template
File.basename(@config[:template])
when :DescriptionString
v = nil
begin
- parents = "Parents: #{meta(:DependsOn)} "
+ dependson = meta(:DependsOn)
rescue
+ dependson = ''
+ end
+ begin
+ required = meta(:Require)['Template'].map { |e| e.keys }.flatten
+ rescue
+ required = ''
+ end
+ if dependson or required
+ # noinspection RubyHashKeysTypesInspection
+ parents = {}
+ dependson.each { |i| parents[i] = true }
+ required.each { |i| parents[i] = true }
+ parents = "Parents: [#{parents.keys.join(',')}] "
+ else
parents = ''
end
# noinspection RubyExpressionInStringInspection
template = '#{meta(:Project,:Description)}(#{meta(:Project,:Name)}) - #{meta(:Name)} v#{meta(:Version)}; #{parents} [Compiled with #{meta(:Compiler,:Name)} v#{meta(:Compiler,:Version)}]'
begin