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 6e22546b Tidy up; drop stale refs to list-subs
6e22546b is described below
commit 6e22546b469f191c8f454c5ea40c9b9e7854d005
Author: Sebb <[email protected]>
AuthorDate: Mon Aug 22 17:04:11 2022 +0100
Tidy up; drop stale refs to list-subs
---
lib/whimsy/asf/config.rb | 3 +--
lib/whimsy/asf/mlist.rb | 10 +++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/lib/whimsy/asf/config.rb b/lib/whimsy/asf/config.rb
index dfe2740a..6d0a7184 100644
--- a/lib/whimsy/asf/config.rb
+++ b/lib/whimsy/asf/config.rb
@@ -72,8 +72,7 @@ module ASF
@config[:cache] ||= "#{@root}/cache"
# Contains the data files from the ezmlm mail server, e.g.
- # list-subs - subscriptions
- # list-mods - moderators
+ # cache/ directory tree
# The above are used by mlist.rb
# list-flags - flags domain listname
# The above are used by mail.rb
diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb
index 8be41062..dbe6b1b2 100644
--- a/lib/whimsy/asf/mlist.rb
+++ b/lib/whimsy/asf/mlist.rb
@@ -211,7 +211,7 @@ module ASF
self.list_subscribers(mail_domain, podling, list_subs, true)
end
- # returns the list time (defaulting to list-subs time if the marker is not
present)
+ # returns the list time
def self.list_time
File.mtime(LIST_TIME)
end
@@ -339,18 +339,18 @@ module ASF
return nil
end
- # Parses the list-mods/list-subs files
+ # Scans the cache files
# Param: type = 'mod' or 'sub' or 'dig'
# Yields:
# - domain (e.g. [xxx.].apache.org)
# - list (e.g. dev)
# - emails as an array
- def self.list_parse(type)
+ def self.list_parse(type, &block)
case type
when 'dig'
type = 'digest'
when 'sub', 'mod'
- #
+ # pass
else
raise ArgumentError.new('type: expecting dig, mod or sub')
end
@@ -361,7 +361,7 @@ module ASF
if cached
begin
cached.each do |d, l, m|
- yield d, l, m # these are already frozen
+ block.call d, l, m # these are already frozen
end
return
rescue WeakRef::RefError