lib/jets/cfn/builders/interface.rb in jets-2.1.7 vs lib/jets/cfn/builders/interface.rb in jets-2.2.0

- old
+ new

@@ -4,15 +4,17 @@ # * template_path module Jets::Cfn::Builders module Interface extend Memoist - def build + def build(parent=false) # Do not bother building or writing the template unless there are functions defined return if @app_class && !@app_class.build? - compose # must be implemented by subclass + if @options.nil? || @options[:templates] || @options[:stack_type] != :minimal || parent + compose # must be implemented by subclass + end write end def write FileUtils.mkdir_p(File.dirname(template_path)) @@ -56,21 +58,21 @@ def add_parameter(name, options={}) defaults = { Type: "String" } options = defaults.merge(options) @template[:Parameters] ||= {} - @template[:Parameters][name.to_s.camelize] = options + @template[:Parameters][name.to_s.camelize] = Jets::Camelizer.transform(options) end def add_outputs(attributes) attributes.each do |name,value| add_output(name.to_s.camelize, Value: value) end end def add_output(name, options={}) @template[:Outputs] ||= {} - @template[:Outputs][name.camelize] = options + @template[:Outputs][name.camelize] = Jets::Camelizer.transform(options) end def add_resources @app_class.tasks.each do |task| task.associated_resources.each do |associated|