Skip to content

Commit

Permalink
Fixup a few Stack methods that parse JSON directly. (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
askreet committed Sep 29, 2016
1 parent c45b78c commit 14ccf96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/moonshot/stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def overrides
# Return a Hash of the default values defined in the stack template.
def default_values
h = {}
JSON.parse(template.body).fetch('Parameters', {}).map do |k, v|
h[k] = v['Default']
template.parameters.each do |p|
h[p.name] = h.default
end
h
end
Expand Down Expand Up @@ -238,7 +238,7 @@ def stack_parameter_overrides
end

def stack_parameters
@stack_parameters ||= JSON.parse(template.body).fetch('Parameters', {}).keys
template.parameters.map(&:name)
end

def import_parent_parameters
Expand Down

0 comments on commit 14ccf96

Please sign in to comment.