70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/cloudformation_wrapper/stack_manager.rb', line 70
def self.verify_options(options)
defaults = {
description: 'Deployed with CloudFormation Wrapper.', parameters: {}, wait_for_stack: true,
capabilities: []
}
options_with_defaults = options.reverse_merge(defaults)
unless options_with_defaults[:template_path] && (options_with_defaults[:template_path].is_a? String)
raise ArgumentError, 'template_path must be provided (String)'
end
unless options_with_defaults[:parameters] && (options_with_defaults[:parameters].is_a? Hash)
raise ArgumentError, 'parameters must be provided (Hash)'
end
return options_with_defaults if options_with_defaults[:name] && (options_with_defaults[:name].is_a? String)
raise ArgumentError, 'name must be provided (String)'
end
|