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/22 01:45:13 UTC

[whimsy] branch master updated (cdf6146 -> 3803644)

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git.


    from cdf6146  select latest minutes (not agenda); match people by name (not id)
     new 02cdae0  use library routine to determine next meeting
     new 3803644  use parse agenda to identify missing reports

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 www/board/agenda/views/committers_report.text.rb | 77 ++++++------------------
 1 file changed, 17 insertions(+), 60 deletions(-)

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

[whimsy] 02/02: use parse agenda to identify missing reports

Posted by ru...@apache.org.
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

commit 38036444bff1ba05772641fc3ff126862fee4a72
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon May 21 21:44:53 2018 -0400

    use parse agenda to identify missing reports
---
 www/board/agenda/views/committers_report.text.rb | 33 +++++++-----------------
 1 file changed, 9 insertions(+), 24 deletions(-)

diff --git a/www/board/agenda/views/committers_report.text.rb b/www/board/agenda/views/committers_report.text.rb
index b94ef38..a75024b 100644
--- a/www/board/agenda/views/committers_report.text.rb
+++ b/www/board/agenda/views/committers_report.text.rb
@@ -40,6 +40,15 @@ end
 attendance = attendance.group_by {|name, info| info[:role]}.
   map {|group, list| [group, list.map {|name, info| name}]}.to_h
 
+# get a list of missing attachments
+missing_reports = Array.new
+agenda.each do |item|
+  next unless item['missing']
+  next if item['to'] == 'president'
+  missing_reports << "Report from the Apache #{item['title']} Project" +
+    "  [#{item['owner']}]"
+end
+
 ##### Parse the agenda to find the data items above
 
 # Data items from agenda
@@ -50,7 +59,6 @@ month           = nil
 year            = nil
 minutes         = Array.new
 resolutions     = Array.new
-missing_reports = Array.new
 
 # State variables
 parsing_resolutions = false
@@ -91,29 +99,6 @@ File.open(agenda_file).each do |line|
     end
   end
 
-  # 6: Get the list of missing reports (aka empty attachments)
-  if !parsing_attachment && line =~ /^Attachment (..?): (.*)/
-    parsing_attachment = $1
-    current_attachment = $2
-    next
-  end
-  if parsing_attachment
-    if line.strip == ""
-      next
-    end
-    if line.strip == "-----------------------------------------"
-      if parsing_attachment.to_i.between?(1, 6)
-        puts "Skipping missing President Committee attachment: #{current_attachment}"
-      else
-        missing_reports << current_attachment
-      end
-      parsing_attachment = nil
-      next
-    end
-    parsing_attachment = nil
-    next
-  end
-
 end
 
 ##### 7: Find out the date of the next board report

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

[whimsy] 01/02: use library routine to determine next meeting

Posted by ru...@apache.org.
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

commit 02cdae00370b1c7ac2d675ea44f804576fdf6be0
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon May 21 21:44:31 2018 -0400

    use library routine to determine next meeting
---
 www/board/agenda/views/committers_report.text.rb | 44 +++++-------------------
 1 file changed, 8 insertions(+), 36 deletions(-)

diff --git a/www/board/agenda/views/committers_report.text.rb b/www/board/agenda/views/committers_report.text.rb
index 50d5906..b94ef38 100644
--- a/www/board/agenda/views/committers_report.text.rb
+++ b/www/board/agenda/views/committers_report.text.rb
@@ -8,12 +8,12 @@ require 'chronic'
 # Add the right prefix to a number
 def prefixNumber(number) 
   if number % 10 == 1
-    return number + "st"
+    number.to_s + "st"
+  elsif number % 10 == 2
+    number.to_s + "nd"
+  else
+    number.to_s + "th"
   end
-  if number % 10 == 2
-    return number + "nd"
-  end
-  return number + "th"
 end
 
 # load agenda and minutes
@@ -118,37 +118,9 @@ end
 
 ##### 7: Find out the date of the next board report
 
-calendar_file  = File.join(ASF::SVN['board'], 'calendar.txt')
-found_date = false
-next_meeting = nil
-File.open(calendar_file).each do |line|
-    if line =~ /\$Date:/
-      next
-    end
-    if line =~ /#{month} #{year}/
-      found_date = true
-      next
-    end
-    if found_date
-      if line =~ /(\d+) (\w+) \d{4}/
-        next_meeting = prefixNumber($1) + " of " + $2
-        break
-      end
-    end
-end
-if !next_meeting
-  puts "Error: Unable to determine the next meeting from #{calendar_file}\n"
-  nxt = Chronic.parse('3rd wednesday next month').to_s
-  ## Returns something like: Wed Dec 21 12:00:00 -0500 2011
-  if nxt =~ /Wed (\w{3}) (\d\d).*(\d{4})$/
-    next_meeting = "#{$1} #{$2} #{$3}"
-  end
-  ##exit 1
-end
-if !next_meeting
-  puts "Error: Unable to determine the next meeting at all\n"
-  exit 1
-end
+next_meeting = ASF::Board.nextMeeting
+next_meeting = prefixNumber(next_meeting.day) + " of " + 
+  next_meeting.strftime('%B')
 
 ##### 8: Find names of the VPs of TLPs in resolutions
 

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