lib/eco/data/locations/node_diff/nodes_diff.rb in eco-helpers-2.6.1 vs lib/eco/data/locations/node_diff/nodes_diff.rb in eco-helpers-2.6.2
- old
+ new
@@ -48,33 +48,35 @@
msg
end
def diffs_summary
- return "There were no differences identified" if diffs.empty?
- msg = "Identified #{diffs.count} differences:\n"
+ comp = "(#{source2.count} vs #{source1.count} nodes)"
+ return "There were no differences identified #{comp}" if diffs.empty?
+ msg = []
+ msg << "Identified #{diffs.count} differences #{comp}:"
msg << when_present(insert, '') do |count|
- " • #{count} nodes to insert\n"
+ " • #{count} nodes to insert"
end
msg << when_present(update, '') do |count|
- " • #{count} nodes to update\n"
+ " • #{count} nodes to update"
end
# msg << when_present(id, '') do |count|
# " • #{count} nodes to change id\n"
# end
msg << when_present(name, '') do |count|
- " • #{count} nodes to change name\n"
+ " • #{count} nodes to change name"
end
msg << when_present(move, '') do |count|
- " • #{count} nodes to move\n"
+ " • #{count} nodes to move"
end
msg << when_present(unarchive, '') do |count|
- " • #{count} nodes to unarchive\n"
+ " • #{count} nodes to unarchive"
end
msg << when_present(archive, '') do |count|
- " • #{count} nodes to archive\n"
+ " • #{count} nodes to archive"
end
- msg
+ msg.join("\n")
end
private
def when_present(list, default = nil)