lib/onceover/controlrepo.rb in onceover-3.4.0 vs lib/onceover/controlrepo.rb in onceover-3.5.0

- old
+ new

@@ -535,10 +535,15 @@ end def self.evaluate_template(template_name, bind) logger.debug "Evaluating template #{template_name}" template_dir = File.expand_path('../../templates', File.dirname(__FILE__)) - template = File.read(File.expand_path("./#{template_name}", template_dir)) + if File.file?(File.expand_path("./spec/templates/#{template_name}", @root)) + puts "Using Custom #{template_name}" + template = File.read(File.expand_path("./spec/templates/#{template_name}", @root)) + else + template = File.read(File.expand_path("./#{template_name}", template_dir)) + end ERB.new(template, nil, '-').result(bind) end def self.init_write_file(contents, out_file) create_dirs_and_log(File.dirname(out_file))