You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/09/22 11:18:22 UTC

[whimsy] branch master updated: Duh! same function as archivelistid

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 25cceee  Duh! same function as archivelistid
25cceee is described below

commit 25cceee981eed21f790c8f933f9b75e818f71592
Author: Sebb <se...@apache.org>
AuthorDate: Sun Sep 22 12:18:13 2019 +0100

    Duh! same function as archivelistid
---
 lib/whimsy/asf/mail.rb | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/lib/whimsy/asf/mail.rb b/lib/whimsy/asf/mail.rb
index 25f9bcc..ee17eda 100644
--- a/lib/whimsy/asf/mail.rb
+++ b/lib/whimsy/asf/mail.rb
@@ -91,6 +91,7 @@ module ASF
     # member: true if member
     # pmc_chair: true if pmc_chair
     # ldap_pmcs: list of (P)PMC mail_list names
+    # output is in the format [host-list] as it is derived from bin/.archives
     def self.cansub(member, pmc_chair, ldap_pmcs)
       Mail._load_lists
       if member
@@ -193,31 +194,6 @@ module ASF
       # Invalid; return input rather than failing
       return email
     end
-
-    # Convert a domain and list name to a host-list as used in .archives and mod_mbox/private
-    # Input:
-    # - dom=full domain, or list@domain if list is nil
-    # - list or nil
-    # Output:
-    # - [host-]list
-    def self.toHostList(_dom, _list=nil)
-      # don't overwrite parameters so can report error properly
-      if _list
-        list = _list
-        dom = _dom
-      else
-        list,dom = _dom.split('@')
-      end
-      if dom == 'apache.org'
-        return list
-      elsif dom == 'apachecon.com'
-        return "apachecon-#{list}"
-      elsif dom =~ /^([^.]+)\.apache\.org$/
-        return "#$1-#{list}"
-      else
-        raise "Cannot parse #{_dom},#{_list}"
-      end
-    end
     
   end