You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/05/24 23:42:17 UTC

[whimsy] branch master updated: error recovery

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 af588dd  error recovery
af588dd is described below

commit af588dd2b687b82f61528562be75922872c6998e
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu May 24 19:42:07 2018 -0400

    error recovery
---
 www/board/agenda/templates/committers_report.text.erb |  6 +++---
 www/board/agenda/views/committers_report.text.rb      | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/www/board/agenda/templates/committers_report.text.erb b/www/board/agenda/templates/committers_report.text.erb
index 013ce0d..d5303bf 100644
--- a/www/board/agenda/templates/committers_report.text.erb
+++ b/www/board/agenda/templates/committers_report.text.erb
@@ -12,15 +12,15 @@ The <%= @date.strftime('%B') %> board meeting took place on the <%= @date.day.or
 %>
 The following directors were present:
 
-  <%= @attendance[:director].join(", ") %>
+  <%= Array(@attendance[:director]).join(", ") %>
 
 The following officers were present:
 
-  <%= @attendance[:officer].join(", ") %>
+  <%= Array(@attendance[:officer]).join(", ") %>
 
 The following guests were present:
 
-  <%= @attendance[:guest].join(", ") %>
+  <%= Array(@attendance[:guest]).join(", ") %>
 
 <%#
 
diff --git a/www/board/agenda/views/committers_report.text.rb b/www/board/agenda/views/committers_report.text.rb
index 5ca4052..6e6718b 100644
--- a/www/board/agenda/views/committers_report.text.rb
+++ b/www/board/agenda/views/committers_report.text.rb
@@ -6,11 +6,11 @@ require 'chronic'
 board_svn = ASF::SVN['foundation_board']
 minutes_file = File.join(AGENDA_WORK, "board_minutes_#@date.yml").untaint
 agenda_file = File.join(board_svn, "board_agenda_#@date.txt").untaint
-minutes = YAML.load_file(minutes_file)
+minutes = YAML.load_file(minutes_file) rescue {}
 agenda = Agenda.parse(File.basename(agenda_file), :full)
 
 # extract attendance from minutes and people from agenda
-attendance = minutes['attendance'].select {|name, info| info[:present]}.
+attendance = Array(minutes['attendance']).select {|name, info| info[:present]}.
   sort_by {|name, info| info[:sortName]}
 people = agenda[1]['people'].values
 
@@ -33,7 +33,7 @@ agenda.each do |item|
 end
 
 # extract list of rejected reports
-@rejected = minutes[:rejected]
+@rejected = Array(minutes[:rejected])
 
 # extract date of the meeting
 @date = Time.at(agenda[0]['timestamp']/1000)
@@ -47,7 +47,7 @@ agenda.each do |item|
   if minutes[item['title']] == 'approved'
     @approved_minutes << month
   else
-    @other_minutes << [ month, minutes[item['title']] ]
+    @other_minutes << [ month, minutes[item['title']] || 'tabled' ]
   end
 end
 
@@ -62,7 +62,7 @@ agenda.each do |item|
     title += " (#{item['people'][chair][:name]}, VP)" if chair
     @approved_resolutions << title
   else
-    @other_resolutions << [ item['fulltitle'], minutes[item['title']] ]
+    @other_resolutions << [item['fulltitle'], minutes[item['title']]||'tabled']
   end
 end
 

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