lib/cfn-flow/template.rb in cfn-flow-0.0.1 vs lib/cfn-flow/template.rb in cfn-flow-0.0.3

- old
+ new

@@ -15,16 +15,18 @@ # Determine if this file is a CFN template def is_cfn_template? from_data.is_a?(Hash) && from_data.key?('Resources') end + # Returns a response object if valid, or raises an + # Aws::CloudFormation::Errors::ValidationError with an error message def validate! cfn.validate_template(template_body: to_json) end def key - # Replace leading './' in from, rename *.yml to *.json - File.join(prefix, from.sub(/\A\.\//, '').sub(/\.yml\Z/, '.json')) + # Replace leading './' in from + File.join(prefix, from.sub(/\A\.\//, '')) end def upload! s3_object.put(body: to_json) end