lib/aws/cfn/compiler/main.rb in aws-cfn-compiler-0.5.1 vs lib/aws/cfn/compiler/main.rb in aws-cfn-compiler-0.5.2
- old
+ new
@@ -10,10 +10,11 @@
class Main < Base
def run
@opts = Slop.parse(help: true) do
+ # command File.basename(__FILE__,'.rb')
on :d, :directory=, 'The directory to look in', as: String
on :o, :output=, 'The JSON file to output', as: String
on :s, :specification=, 'The specification to use when selecting components. A JSON or YAML file or JSON object', as: String
on :f, :formatversion=, 'The AWS Template format version. Default 2010-09-09', as: String
on :p, :precedence=, 'The precedence of template component types. Default: rb,yaml,yml,json,js', as: String, default: 'rb,ruby,yaml,yml,json,js'
@@ -47,18 +48,15 @@
'Parameters' => @items['Parameters'],
'Resources' => @items['Resources'],
'Outputs' => @items['Outputs'],
}
- @logger.step'Validating compiled file...'
-
validate(compiled)
output_file = @opts[:output] || 'compiled.json'
- save(compiled, output_file)
+ save(output_file,compiled)
- puts
- @logger.step'*** Compiled Successfully ***'
+ @logger.step '*** Compiled Successfully ***'
end
end
end
end