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 4d45c20  Report mail list file times for use by display
4d45c20 is described below

commit 4d45c20ba66f532f30fae616bb9c6376b6637019
Author: Sebb <[email protected]>
AuthorDate: Thu Jun 15 15:04:03 2017 +0100

    Report mail list file times for use by display
---
 www/roster/models/committee.rb | 2 ++
 www/roster/models/committer.rb | 2 ++
 www/roster/models/ppmc.rb      | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index 40be5bc..ff2176f 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -24,6 +24,7 @@ class Committee
 
     if pmc.roster.include? env.user or ASF::Person.find(env.user).asf_member?
       if File.exist? LIST_MODS
+         modtime = File.mtime(LIST_MODS)
          mail_list = "#{pmc.mail_list}.apache.org"
          moderators = File.read(LIST_MODS).split(/\n\n/).map do |stanza|
            list = stanza.match(/(\w+\.apache\.org)\/(.*?)\//)
@@ -52,6 +53,7 @@ class Committee
       roster: pmc.roster,
       mail: Hash[lists.sort],
       moderators: moderators,
+      modtime: modtime,
       project_info: info,
       image: image,
     }
diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index 4657929..fa64c10 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -127,6 +127,7 @@ class Committer
       response[:moderates] = {}
 
       if File.exist? LIST_MODS
+        response[:modtime] = File.mtime(LIST_MODS)
         moderators = File.read(LIST_MODS).split(/\n\n/).map do |stanza|
           list = stanza.match(/(\w*\.?apache\.org)\/(.*?)\//)
 
@@ -143,6 +144,7 @@ class Committer
 
     if env.user == id and File.exists? LIST_SUBS
       response[:subscriptions] = []
+      response[:subtime] = File.mtime(LIST_SUBS)
       emails = person.all_mail
 
       # File format
diff --git a/www/roster/models/ppmc.rb b/www/roster/models/ppmc.rb
index 18ba2b9..2ba9cae 100644
--- a/www/roster/models/ppmc.rb
+++ b/www/roster/models/ppmc.rb
@@ -11,6 +11,7 @@ class PPMC
     user = ASF::Person.find(env.user)
     if user.asf_member? or ppmc.members.include? user
       if File.exist? LIST_MODS
+         modtime = File.mtime(LIST_MODS)
          mail_list = ppmc.mail_list
          moderators = File.read(LIST_MODS).split(/\n\n/).map do |stanza|
            list = stanza.match(/(\w+)\.apache\.org\/(.*?)\//)
@@ -62,6 +63,7 @@ class PPMC
       roster: roster,
       mail: Hash[lists.sort],
       moderators: moderators,
+      modtime: modtime,
       duration: ppmc.duration,
       podlingStatus: statusInfo,
       namesearch: ppmc.namesearch,

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to