lib/soca/plugins/mustache.rb in soca-0.1.2 vs lib/soca/plugins/mustache.rb in soca-0.2.0
- old
+ new
@@ -25,10 +25,10 @@
files.each do |file|
Soca.logger.debug "Running #{file} through mustache."
basename = File.basename(file)
dir = File.dirname(file)
parts = basename.split(/\./)
- new_file = parts.length > 2 ? parts[0..-2].join('.') : basename[0] + ".html"
+ new_file = parts.length > 2 ? parts[0..-2].join('.') : parts[0] + ".html"
File.open(File.join(dir, new_file), 'w') do |f|
f << ::Mustache.render(File.read(file), vars)
end
Soca.logger.debug "Wrote to #{new_file}"
end