lib/nanoc/cli/commands/compile.rb in nanoc-4.5.2 vs lib/nanoc/cli/commands/compile.rb in nanoc-4.5.3

- old
+ new

@@ -64,12 +64,12 @@ setup_diffs old_contents = {} Nanoc::Int::NotificationCenter.on(:will_write_rep, self) do |rep, path| old_contents[rep] = File.file?(path) ? File.read(path) : nil end - Nanoc::Int::NotificationCenter.on(:rep_written, self) do |rep, path, _is_created, _is_modified| - unless rep.binary? + Nanoc::Int::NotificationCenter.on(:rep_written, self) do |rep, binary, path, _is_created, _is_modified| + unless binary new_contents = File.file?(path) ? File.read(path) : nil if old_contents[rep] && new_contents generate_diff_for(path, old_contents[rep], new_contents) end old_contents.delete(rep) @@ -324,10 +324,10 @@ Nanoc::Int::NotificationCenter.on(:compilation_suspended, self) do |rep| @acc_durations[rep] += Time.now - @start_times[rep] end - Nanoc::Int::NotificationCenter.on(:rep_written, self) do |rep, path, is_created, is_modified| + Nanoc::Int::NotificationCenter.on(:rep_written, self) do |rep, _binary, path, is_created, is_modified| @acc_durations[rep] += Time.now - @start_times[rep] duration = @acc_durations[rep] action = if is_created then :create