whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: look for a full date, not just a digit
Date Tue, 01 May 2018 15:18:16 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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 b76ad55  look for a full date, not just a digit
b76ad55 is described below

commit b76ad558f48983aa8b96bc86c29c7a112e86ba5d
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue May 1 11:17:59 2018 -0400

    look for a full date, not just a digit
---
 www/secretary/workbench/server.rb            | 2 +-
 www/secretary/workbench/views/memapp.json.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/secretary/workbench/server.rb b/www/secretary/workbench/server.rb
index 2da2fb0..3049da4 100644
--- a/www/secretary/workbench/server.rb
+++ b/www/secretary/workbench/server.rb
@@ -155,7 +155,7 @@ get %r{/(\d{6})/(\w+)/_index_} do |month, hash|
   # applications can be accepted.  Two days are added to cover the adjournment
   # period of the meeting during which the vote takes place.
   received = Dir["#{ASF::SVN['Meetings']}/2*/memapp-received.txt"].sort.last
-  @meeting = Date.today - Date.parse(received[/\d+/]) <= 32
+  @meeting = Date.today - Date.parse(received[/\d{8}/]) <= 32
 
   _html :parts
 end
diff --git a/www/secretary/workbench/views/memapp.json.rb b/www/secretary/workbench/views/memapp.json.rb
index db97348..ea19305 100644
--- a/www/secretary/workbench/views/memapp.json.rb
+++ b/www/secretary/workbench/views/memapp.json.rb
@@ -6,7 +6,7 @@ received = Dir["#{meetings}/2*/memapp-received.txt"].sort.last.untaint
 
 # extract contents
 pattern = /^\w+\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(.*?)\s*\n/
-if Date.today - Date.parse(received[/\d+/]) <= 32
+if Date.today - Date.parse(received[/\d{8}/]) <= 32
   table = File.read(received).scan(pattern)
 else
   table = []

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.

Mime
View raw message