lib/bourdain/helpers.rb in bourdain-1.2.18 vs lib/bourdain/helpers.rb in bourdain-1.2.19
- old
+ new
@@ -13,11 +13,11 @@
def apply_template file, opts
template_name, locals = opts[:template], opts[:locals]
locals = Bourdain::Helpers::Locals.new(locals).bind unless locals.nil?
template_path = gem_path('templates', *template_name)
template = ERB.new File.read(template_path)
- contents = template.result(locals)
- File.open(file, 'w') { |f| f.puts contents }
+ contents = template.result(locals).strip
+ File.open(file, 'w') { |f| f.write contents }
end
require_relative 'helpers/config'
require_relative 'helpers/locals'
require_relative 'helpers/logger'
\ No newline at end of file