]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/prune/plugins/roundcube.rb
Document everything with YARD and fix some bugs along the way.
[mailshears.git] / lib / prune / plugins / roundcube.rb
index 77eacfcb6fe5f1f09722769aaa82360c68c53334..929739297b46a9fe1d1a51ea347816091a5ece1f 100644 (file)
@@ -3,23 +3,12 @@ require 'pg'
 require 'prune/prune_plugin'
 require 'rm/plugins/roundcube'
 
-class RoundcubePrune < RoundcubeRm
 
+# Handle the pruning of Roundcube users from its database. This class
+# doesn't need to do anything; by inheriting from {RoundcubeRm}, we get
+# its {RoundcubeRm#remove_user} method and that's all we need to prune.
+#
+class RoundcubePrune < RoundcubeRm
+  # Needed for the magic includers <tt>run()</tt> method.
   include PrunePlugin
-
-
-  def get_leftover_domains(db_domains)
-    # Roundcube doesn't have a concept of domains. We could parse the
-    # usernames to see what domains are present, but the point is
-    # moot: all leftover accounts will be pruned anyway.
-    return []
-  end
-
-
-  def get_leftover_accounts(db_accounts)
-    # Get a list of all users who have logged in to Roundcube.
-    rc_accounts = self.list__users()
-    return rc_accounts - db_accounts
-  end
-
 end