]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/rm/rm_dummy_runner.rb
Remove a TODO I don't intend to DO.
[mailshears.git] / lib / rm / rm_dummy_runner.rb
index 091d32881bb9940f5f72c5ff2f67c3ba0030010e..62d9b628dd7db4b69c27a0804acae27e73325385 100644 (file)
@@ -3,15 +3,20 @@ require 'common/runner'
 class RmDummyRunner
   include Runner
 
-  def run(plugin, *targets)
+  def run(cfg, plugin, *targets)
     targets.each do |target|
-      if target.include?('@') then
-        user_description = plugin.describe_account(target)
-        report(plugin, "Would remove user: #{user} (#{user_description})")
-      else
-        domain_description = plugin.describe_domain(target)
-        report(plugin, "Would remove domain: #{domain} (#{domain_description})")
+      target_description = plugin.describe(target)
+      msg =  "Would remove #{target.class.to_s().downcase()} #{target}"
+
+      # Only append the extra description if it's useful.
+      if not target_description.nil? and
+         not target_description.empty? and
+         not target_description == target.to_s() then
+        msg += " (#{target_description})"
       end
+      msg += '.'
+
+      report(plugin, msg)
     end
 
   end