lib/sfn/utils/stack_parameter_scrubber.rb in sfn-3.0.30 vs lib/sfn/utils/stack_parameter_scrubber.rb in sfn-3.0.32

- old
+ new

@@ -1,31 +1,31 @@ -require 'sfn' +require "sfn" module Sfn module Utils # Helper for scrubbing stack parameters module StackParameterScrubber # Validate attributes within Parameter blocks ALLOWED_PARAMETER_ATTRIBUTES = [ - 'Type', 'Default', 'NoEcho', 'AllowedValues', 'AllowedPattern', - 'MaxLength', 'MinLength', 'MaxValue', 'MinValue', 'Description', - 'ConstraintDescription', + "Type", "Default", "NoEcho", "AllowedValues", "AllowedPattern", + "MaxLength", "MinLength", "MaxValue", "MinValue", "Description", + "ConstraintDescription", ] # Clean the parameters of the template # # @param template [Hash] # @return [Hash] template def parameter_scrub!(template) - parameters = template['Parameters'] + parameters = template["Parameters"] if parameters parameters.each do |name, options| options.delete_if do |attribute, value| !ALLOWED_PARAMETER_ATTRIBUTES.include?(attribute) end end - template['Parameters'] = parameters + template["Parameters"] = parameters end template end end end