Sha256: a5b90df7bc9fe26ff4ffb5777a8f289e955d3e1b53182890f64ba67be5af79ea
Contents?: true
Size: 765 Bytes
Versions: 6
Compression:
Stored size: 765 Bytes
Contents
require 'json' module Stackster class StackUpdater def initialize(args) @config = args[:config] @entry = args[:entry] @name = args[:name] @template_body = args[:template_body] @cf = AWS::CloudFormation.new :config => @config end def update @cf.update :name => @name, :parameters => read_parameters_from_entry, :template => @template_body end def read_parameters_from_entry h = {} read_parameters_from_template.each do |p| h[p] = @entry.attributes[p] if @entry.attributes[p] end h end def read_parameters_from_template t = JSON.parse @template_body t['Paramaters'].nil? ? t['Parameters'].keys : [] end end end
Version data entries
6 entries across 6 versions & 1 rubygems