Fix gzip extension status output

This commit is contained in:
Juhamatti Niemelä 2016-01-18 19:55:45 +02:00
parent 732ac7cbe9
commit 22812cb340

View file

@ -64,10 +64,10 @@ class Middleman::Extensions::Gzip < ::Middleman::Extension
total_savings += (old_size - new_size)
size_change_word = (old_size - new_size) > 0 ? 'smaller' : 'larger'
builder.trigger :gzip, "#{output_filename} (#{NumberHelpers.new.number_to_human_size((old_size - new_size).abs)} #{size_change_word})"
builder.trigger :created, "#{output_filename} (#{NumberHelpers.new.number_to_human_size((old_size - new_size).abs)} #{size_change_word})"
end
builder.trigger :gzip, "Total gzip savings: #{NumberHelpers.new.number_to_human_size(total_savings)}"
builder.trigger :gzip, '', "Total gzip savings: #{NumberHelpers.new.number_to_human_size(total_savings)}"
I18n.locale = old_locale
end