whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [2/2] Commit dd6e5ea: Merge branch 'master' of github.com:apache/whimsy
Date Thu, 14 Jan 2016 13:53:51 GMT
Commit dd6e5ea4f5ad2ad6742f709f23c1b9506d9350b0:
    Merge branch 'master' of github.com:apache/whimsy


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
doap_Whimsy.rdf                                              | ++++ ----
lib/whimsy/asf/committee.rb                                  | +++++++++++++ 
www/roster/public_committee_info.rb                          | +++ -
------------------------------------------------------------
25 changes: 20 additions, 5 deletions.
------------------------------------------------------------


diff --git a/doap_Whimsy.rdf b/doap_Whimsy.rdf
index d8e9153..1199f38 100644
--- a/doap_Whimsy.rdf
+++ b/doap_Whimsy.rdf
@@ -31,10 +31,10 @@
     <programming-language>JavaScript</programming-language>
     <category rdf:resource="http://projects.apache.org/category/content" />
     <repository>
-      <SVNRepository>
-        <location rdf:resource="https://svn.apache.org/repos/infra/infrastructure/trunk/projects/whimsy"/>
-        <browse rdf:resource="http://svn.apache.org/repos/infra/infrastructure/trunk/projects/whimsy"/>
-      </SVNRepository>
+      <GitRepository>
+        <location rdf:resource="https://github.com/apache/whimsy.git"/>
+        <browse rdf:resource="https://github.com/apache/whimsy.git"/>
+      </GitRepository>
     </repository>
   </Project>
 </rdf:RDF>
diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 6beb007..1a56510 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -59,34 +59,47 @@ def self.load_committee_info
       @@svn_change = Time.parse(
         `svn info #{file}`[/Last Changed Date: (.*) \(/, 1]).gmtime
 
+      # Split the file on lines starting "* ", i.e. the start of each group in section 3
       info = File.read(file).split(/^\* /)
+      # Extract the text before first entry in section 3 and split on section headers,
+      # keeping sections 1 (COMMITTEES) and 2 (REPORTING).
       head, report = info.shift.split(/^\d\./)[1..2]
+      # Drop lines which could match group entries
       head.gsub! /^\s+NAME\s+CHAIR\s*$/,'' # otherwise could match an entry with no e-mail
 
       # extract the committee chairs (e-mail address is required here)
+      # Note: this includes the non-PMC entries
       head.scan(/^[ \t]+(\w.*?)[ \t][ \t]+(.*)[ \t]+<(.*?)@apache\.org>/).
         each do |committee, name, id|
           list[committee].chairs << {name: name, id: id}
         end
 
       # Extract the non-PMC committees (e-mail address may be absent)
+      # first drop leading text so we only match non-PMCs
       @nonpmcs = head.sub(/.*?also has /m,'').
         scan(/^[ \t]+(\w.*?)(?:[ \t][ \t]|[ \t]?$)/).flatten.uniq.
         map {|name| list[name]}
 
+      # for each committee in section 3
       info.each do |roster|
+        # extract the committee name and canonicalise
         committee = list[@@namemap.call(roster[/(\w.*?)\s+\(/,1])]
+        # get the start date
         committee.established = roster[/\(est\. (.*?)\)/, 1]
+        # Extract any emeritus members (now probably redundant)
         roster.gsub! /^.*\(\s*emeritus\s*\).*/i do |line|
           committee.emeritus += line.scan(/<(.*?)@apache\.org>/).flatten
           ''
         end
+        # extract the availids (is this used?)
         committee.info = roster.scan(/<(.*?)@apache\.org>/).flatten
+        # drop (chair) markers and extract 0: name, 1: availid, 2: [date], 3: date
         committee.roster = Hash[roster.gsub(/\(\w+\)/, '').
           scan(/^\s*(.*?)\s*<(.*?)@apache\.org>\s+(\[(.*?)\])?/).
           map {|list| [list[1], {name: list[0], date: list[3]}]}]
       end
 
+      # process report section
       report.scan(/^([^\n]+)\n---+\n(.*?)\n\n/m).each do |period, committees|
         committees.scan(/^   \s*(.*)/).each do |committee|
           committee, comment = committee.first.split(/\s+#\s+/,2)
diff --git a/www/roster/public_committee_info.rb b/www/roster/public_committee_info.rb
index 3c16805..2735213 100644
--- a/www/roster/public_committee_info.rb
+++ b/www/roster/public_committee_info.rb
@@ -39,8 +39,10 @@
     mail_list: committee.mail_list,
     established: committee.established,
     report: schedule,
+    # Convert {:name=>"Public Name", :id=>"availid"} to 
+    # "chair": { "availid": { "name": "Public Name" } }
     chair: Hash[committee.chairs.map {|chair|
-      chair = chair.dup; [chair.delete(:id), chair]}],
+      [chair[:id], :name => chair[:name] ]}],
     roster: committee.roster,
     pmc: !ASF::Committee.nonpmcs.include?(committee)
   }]

Mime
View raw message