lib/cfer.rb in cfer-0.5.0.pre.rc4 vs lib/cfer.rb in cfer-0.5.0
- old
+ new
@@ -62,11 +62,11 @@
options[:on_failure].upcase! if options[:on_failure]
tmpl = options[:template] || "#{stack_name}.rb"
cfn = options[:aws_options] || {}
cfn_stack = options[:cfer_client] || Cfer::Cfn::Client.new(cfn.merge(stack_name: stack_name))
- raise Cfer::Util::CferError, "No such template file: #{tmpl}" unless File.exists?(tmpl) || options[:cfer_stack]
+ raise Cfer::Util::CferError, "No such template file: #{tmpl}" unless File.exist?(tmpl) || options[:cfer_stack]
stack =
options[:cfer_stack] ||
Cfer::stack_from_file(tmpl,
options.merge(
client: cfn_stack,
@@ -124,11 +124,11 @@
when 'json'
puts render_json(cfn_stack, options)
when 'table', nil
puts "Status: #{cfn_stack[:stack_status]}"
puts "Description: #{cfn_stack[:description]}" if cfn_stack[:description]
- puts "Created with Cfer version: #{Semantic::Version.new(cfer_version_str).to_s} (current: #{Cfer::SEMANTIC_VERSION.to_s})" if cfer_version
+ puts "Created with Cfer version: #{Semantic::Version.new(cfer_version_str)} (current: #{Cfer::SEMANTIC_VERSION.to_s})" if cfer_version
puts ""
def tablify(list, type)
list ||= []
list.map { |param|
{
@@ -163,11 +163,11 @@
def generate!(tmpl, options = {})
config(options)
cfn = options[:aws_options] || {}
cfn_stack = options[:cfer_client] || Cfer::Cfn::Client.new(cfn)
- raise Cfer::Util::CferError, "No such template file: #{tmpl}" unless File.exists?(tmpl) || options[:cfer_stack]
+ raise Cfer::Util::CferError, "No such template file: #{tmpl}" unless File.exist?(tmpl) || options[:cfer_stack]
stack = options[:cfer_stack] || Cfer::stack_from_file(tmpl,
options.merge(client: cfn_stack, parameters: generate_final_parameters(options))).to_h
puts render_json(stack, options)
end
@@ -331,10 +331,9 @@
end
%w{
version.rb
block.rb
-cli.rb
config.rb
util/error.rb
core/hooks.rb