597
598
599
600
601
602
603
604
605
606
607
|
# File 'lib/onceover/controlrepo.rb', line 597
def self.evaluate_template(template_name, bind)
logger.debug "Evaluating template #{template_name}"
template_dir = File.expand_path('../../templates', File.dirname(__FILE__))
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, trim_mode: '-').result(bind)
end
|