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/23 17:29:07 UTC

[whimsy] branch master updated: move minutes formatting to template

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 20e9b1e  move minutes formatting to template
20e9b1e is described below

commit 20e9b1e97bcc5ad9a1e84094225fd2e7cb10afe9
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed May 23 13:28:38 2018 -0400

    move minutes formatting to template
---
 www/board/agenda/views/committers_report.text.rb | 34 ++++++++++++------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/www/board/agenda/views/committers_report.text.rb b/www/board/agenda/views/committers_report.text.rb
index e9e3064..93d495d 100644
--- a/www/board/agenda/views/committers_report.text.rb
+++ b/www/board/agenda/views/committers_report.text.rb
@@ -56,15 +56,15 @@ end
 @date = Time.at(agenda[0]['timestamp']/1000)
 
 # get list of minutes
-approved_minutes = Array.new
-other_minutes = Array.new
+@approved_minutes = Array.new
+@other_minutes = Array.new
 agenda.each do |item|
   next unless item[:attach] =~ /^3[A-Z]/
   month = item['title'].split(' ').first
   if minutes[item['title']] == 'approved'
-    approved_minutes << month
+    @approved_minutes << month
   else
-    other_minutes << "The #{month} minutes were #{minutes[item['title']]}."
+    @other_minutes << [ month, minutes[item['title']] ]
   end
 end
 
@@ -83,22 +83,11 @@ agenda.each do |item|
   end
 end
 
-##### 7: Find out the date of the next board report
-
+# Find out the date of the next board report
 next_meeting = ASF::Board.nextMeeting
 @next_meeting = next_meeting.day.ordinalize + " of " + 
   next_meeting.strftime('%B')
 
-if !approved_minutes.empty?
-  @minutes = "\nThe " + approved_minutes.join(", ").sub(/, ([^,]*)$/, ' and \1') + " minutes were " + (approved_minutes.length > 1 ? "all " : "") + "approved. \nMinutes will be posted to http://www.apache.org/foundation/records/minutes/\n"
-else
-  @minutes = ""
-end
-
-if !other_minutes.empty?
-  @minutes += other_minutes.join("\n") + "\n"
-end
-
 ##### Write the report
 template = <<REPORT
 PLEASE EDIT THIS, IT IS ONLY AN ESTIMATE.
@@ -125,12 +114,23 @@ The following officers were present:
 The following guests were present:
 
   <%= @attendance[:guest].join(", ") %>
+
 <%#
 
    ###### previous meeting minutes
 
 %>
-#{@minutes}
+<% unless @approved_minutes.empty? %>
+The <%= @approved_minutes.join(", ").sub(/, ([^,]*)$/, ' and \1') %> minutes were <%= (@approved_minutes.length > 1 ? "all " : "") %>approved.
+Minutes will be posted to http://www.apache.org/foundation/records/minutes/
+
+<% end %>
+<% unless @other_minutes.empty? %>
+<% @other_minutes.each do |month, disposition| %>
+The <%= month %> minutes were <%= disposition %>.
+<% end %>
+
+<% end %>
 <%#
 
    ###### missing reports

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