lib/cfer.rb in cfer-0.5.0.pre.rc3 vs lib/cfer.rb in cfer-0.5.0.pre.rc4

- 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) + raise Cfer::Util::CferError, "No such template file: #{tmpl}" unless File.exists?(tmpl) || options[:cfer_stack] stack = options[:cfer_stack] || Cfer::stack_from_file(tmpl, options.merge( client: cfn_stack, @@ -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) + raise Cfer::Util::CferError, "No such template file: #{tmpl}" unless File.exists?(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 @@ -328,9 +328,26 @@ COLORS_MAP[str][:finished] || false end end end -Dir["#{File.dirname(__FILE__)}/cfer/*.rb"].each { |f| require(f) unless f.ends_with?('console.rb') } -Dir["#{File.dirname(__FILE__)}/cfer/**/*.rb"].each { |f| require(f) unless f.ends_with?('console.rb') } +%w{ +version.rb +block.rb +cli.rb +config.rb + +util/error.rb + +core/hooks.rb +core/client.rb +core/functions.rb +core/resource.rb +core/stack.rb + +cfn/cfer_credentials_provider.rb +cfn/client.rb +}.each do |f| + require "#{File.dirname(__FILE__)}/cfer/#{f}" +end Dir["#{File.dirname(__FILE__)}/cferext/**/*.rb"].each { |f| require(f) }