lib/fulmar/domain/service/config_rendering_service.rb in fulmar-1.0.0 vs lib/fulmar/domain/service/config_rendering_service.rb in fulmar-1.1.0
- old
+ new
@@ -9,10 +9,11 @@
@config = config
end
def render
return unless @config[:config_templates]
- @config[:config_templates].each do |template|
+ @config[:config_templates].each do |template_file|
+ template = "#{@config[:local_path]}/#{template_file}"
fail "Template filenames must end in .erb - '#{template}' does not" unless template[-4, 4] == '.erb'
fail "Cannot render missing config file '#{template}'" unless File.exist? template
renderer = ERB.new(File.read(template))
result_path = File.dirname(template) + '/' + File.basename(template, '.erb')