Skip to content

Commit

Permalink
Merge pull request #92 from pingram3030/minify_stack_template
Browse files Browse the repository at this point in the history
Minify stack template JSON to save bytes
  • Loading branch information
askreet committed May 5, 2016
2 parents 0bd46e1 + 37ddfb8 commit 0dbe022
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/moonshot/stack_template.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'json'

module Moonshot
# A StackTemplate loads the JSON template from disk and stores information
# about it.
Expand All @@ -18,7 +20,9 @@ def initialize(filename, log:)
raise
end

@body = File.read(filename)
# The maximum TemplateBody length is 51,200 bytes, so we remove
# formatting white space.
@body = JSON.parse(File.read(filename)).to_json
end

def parameters
Expand Down

0 comments on commit 0dbe022

Please sign in to comment.