[whimsy] branch master updated: fix test regressions

2021-04-22 Thread rubys
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 
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']
 


[whimsy] branch master updated: fix potential actions

2021-04-22 Thread rubys
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 c71ad0d  fix potential actions
c71ad0d is described below

commit c71ad0dae9e2b79b7ad75bc2faf9a7691e02ab34
Author: Sam Ruby 
AuthorDate: Thu Apr 22 19:19:02 2021 -0400

fix potential actions
---
 www/board/agenda/views/actions/potential-actions.json.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/potential-actions.json.rb 
b/www/board/agenda/views/actions/potential-actions.json.rb
index d709fe1..41a429e 100644
--- a/www/board/agenda/views/actions/potential-actions.json.rb
+++ b/www/board/agenda/views/actions/potential-actions.json.rb
@@ -3,7 +3,7 @@
 #
 
 # get posted action items from previous report
-today = Date.today.strftime('board_agenda_%Y_%m_%d.txt')
+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
 parsed = ASF::Board::Agenda.parse(IO.read(base), true)


[whimsy] branch master updated: handle there only being one agenda in the directory

2021-04-22 Thread rubys
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 9a65fff  handle there only being one agenda in the directory
9a65fff is described below

commit 9a65fff1d549da06e3961bcd70446eede0e5c207
Author: Sam Ruby 
AuthorDate: Thu Apr 22 09:12:36 2021 -0400

handle there only being one agenda in the directory
---
 www/board/agenda/views/actions/potential-actions.json.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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