X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fmv%2Fmv_dummy_runner.rb;h=52db27be6f0082051ee17565c7ee7b8b5c61b31a;hp=662abff73e89d1b176a97b4cea8d780415eec3bf;hb=650e23790019880da91c7c7248a214a13763fd3e;hpb=f819b178c5c1cb8adda0182c610e5c52fad8bea7 diff --git a/lib/mv/mv_dummy_runner.rb b/lib/mv/mv_dummy_runner.rb index 662abff..52db27b 100644 --- a/lib/mv/mv_dummy_runner.rb +++ b/lib/mv/mv_dummy_runner.rb @@ -10,7 +10,32 @@ class MvDummyRunner raise NotImplementedError.new(msg) end - puts "Would move user #{src.to_s()} to #{dst.to_s()}." + # Since we're not actually moving anything, the destination + # description is really only useful for seeing whether or not we'd + # be trying to move in on top of an existing account. + src_description = plugin.describe(src) + dst_description = plugin.describe(dst) + + msg = "Would move user #{src} " + + # Only append the extra description if it's useful. + if not src_description.nil? and + not src_description.empty? and + not src_description == src.to_s() then + msg += "(#{src_description}) " + end + + msg += "to #{dst}" + + # Only append the extra description if it's useful. + if not dst_description.nil? and + not dst_description.empty? and + not dst_description == dst.to_s() then + msg += " (#{dst_description})" + end + + msg += "." + report(plugin, msg) end end