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 07f1efc += list_types
07f1efc is described below
commit 07f1efc9e6231ff5d69ea9030ea8b8f51c5f3269
Author: Sebb <[email protected]>
AuthorDate: Thu Feb 25 17:57:09 2021 +0000
+= list_types
---
lib/whimsy/asf/mlist.rb | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb
index 00f835b..5c1f236 100644
--- a/lib/whimsy/asf/mlist.rb
+++ b/lib/whimsy/asf/mlist.rb
@@ -225,6 +225,20 @@ module ASF
end
end
+ # return the [domain, list, types=public|private|...] for all entries in
the subscriber listings
+ # the subscribers are not included
+ def self.list_types(show_all=false)
+ list_archivers do |dom, list, subs|
+ types = {}
+ subs.each do |sub|
+ type = sub[2]
+ types[type] = 1 unless %w(alias direct).include? type
+ end
+ type = types.keys.sort.join(',')
+ yield [dom, list, type] if show_all || type == 'public'
+ end
+ end
+
# return the [domain, list] for all entries in the subscriber listings
# the subscribers are not included
def self.each_list