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: fix test regressions
Date Fri, 23 Apr 2021 02:28:20 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 15d4259  fix test regressions
15d4259 is described below

commit 15d4259921b15f32b61594b0751d5b0692da0032
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Apr 22 22:28:01 2021 -0400

    fix test regressions
---
 www/board/agenda/views/actions/potential-actions.json.rb | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/www/board/agenda/views/actions/potential-actions.json.rb b/www/board/agenda/views/actions/potential-actions.json.rb
index 41a429e..8b896f1 100644
--- a/www/board/agenda/views/actions/potential-actions.json.rb
+++ b/www/board/agenda/views/actions/potential-actions.json.rb
@@ -3,9 +3,14 @@
 #
 
 # get posted action items from previous report
-today = Date.today.strftime("#{FOUNDATION_BOARD}/board_agenda_%Y_%m_%d.txt")
-base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].
- select {|file| file < today}.sort.last
+if ENV['RACK_ENV'] == 'test'
+  base = "#{FOUNDATION_BOARD}/board_agenda_2015_01_21.txt"
+else
+  today = Date.today.strftime("#{FOUNDATION_BOARD}/board_agenda_%Y_%m_%d.txt")
+  base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].
+   select {|file| file < today}.sort.last
+end
+
 parsed = ASF::Board::Agenda.parse(IO.read(base), true)
 actions = parsed.find {|item| item['title'] == 'Action Items'}['actions']
 

Mime
View raw message