Skip to content
Permalink
Browse files

Use JSON pretty_generate

  • Loading branch information...
n0ts committed Feb 10, 2017
1 parent abd3dd8 commit 5bba32b7a9e47dc1ba0e9d91f86a1d8286909695
Showing with 5 additions and 3 deletions.
  1. +4 −2 lib/kumogata/client.rb
  2. +1 −1 spec/spec_helper.rb
@@ -340,7 +340,9 @@ def create_stack(template, stack_name)
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?

@@ -371,7 +373,7 @@ def update_stack(template, stack_name)

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?

@@ -28,7 +28,7 @@ def tempfile(content, template_ext = nil)
basename = [basename, template_ext] if template_ext

Tempfile.open(basename) do |f|
f << content
f << content.chomp
f.flush
f.rewind
yield(f)

0 comments on commit 5bba32b

Please sign in to comment.
You can’t perform that action at this time.