lib/kumogata/client.rb in kumogata-0.5.10 vs lib/kumogata/client.rb in kumogata-0.5.11
- old
+ new
@@ -221,11 +221,14 @@
end
def evaluate_template(template, path_or_url)
key_converter = proc do |key|
key = key.to_s
- key.gsub!('__', '::') unless @options.skip_replace_underscore?
+ unless @options.skip_replace_underscore?
+ key.gsub!('_', ':')
+ key.gsub!('__', '::')
+ end
key
end
value_converter = proc do |v|
case v
@@ -335,11 +338,13 @@
stack_name = stack_name.join('-')
stack_name.gsub!(/[^-a-zA-Z0-9]+/, '-')
end
Kumogata.logger.info("Creating stack: #{stack_name}".cyan)
- stack = @cloud_formation.stacks.create(stack_name, template.to_json, build_create_options)
+ stack = @cloud_formation.stacks.create(stack_name,
+ JSON.pretty_generate(template),
+ build_create_options)
return if @options.detach?
event_log = {}
@@ -366,10 +371,10 @@
stack = @cloud_formation.stacks[stack_name]
stack.status
Kumogata.logger.info("Updating stack: #{stack_name}".green)
event_log = create_event_log(stack)
- stack.update(build_update_options(template.to_json))
+ stack.update(build_update_options(JSON.pretty_generate(template)))
return if @options.detach?
unless while_in_progress(stack, 'UPDATE_COMPLETE', event_log)
errmsgs = ['Update failed']