1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

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) total_savings += (old_size - new_size)
size_change_word = (old_size - new_size) > 0 ? 'smaller' : 'larger' 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 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 I18n.locale = old_locale
end end