lib/nanoc/cli/commands/compile.rb in nanoc-4.2.0b1 vs lib/nanoc/cli/commands/compile.rb in nanoc-4.2.0
- old
+ new
@@ -318,18 +318,16 @@
@start_times[rep.raw_path] = Time.now
end
Nanoc::Int::NotificationCenter.on(:rep_written) do |_rep, path, is_created, is_modified|
duration = path && @start_times[path] ? Time.now - @start_times[path] : nil
action =
- case
- when is_created then :create
- when is_modified then :update
+ if is_created then :create
+ elsif is_modified then :update
else :identical
end
level =
- case
- when is_created then :high
- when is_modified then :high
+ if is_created then :high
+ elsif is_modified then :high
else :low
end
log(level, action, path, duration)
end
end