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 2017/09/23 20:01:29 UTC

[whimsy] branch master updated (e4fc30c -> 9a97096)

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 e4fc30c  Make PodlingNameSearch work with Vue.js
     new 14d26ab  forgot to commit the file
     new f79f027  flush cache of agendas parsed with previous versions of the library
     new 9a97096  parse change chair resolutions

The 3 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:
 lib/whimsy/asf.rb                                  |  2 +-
 lib/whimsy/asf/agenda/special.rb                   | 59 +++++++++++++---------
 www/board/agenda/models/agenda.rb                  |  6 +++
 www/board/agenda/views/actions/todos.json.rb       |  5 +-
 .../workbench => test/icla}/views/vue-config.js.rb |  0
 5 files changed, 45 insertions(+), 27 deletions(-)
 copy www/{secretary/workbench => test/icla}/views/vue-config.js.rb (100%)

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].

[whimsy] 03/03: parse change chair resolutions

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 9a970963779351036c6dd41fdd0db9220fa20a25
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sat Sep 23 16:01:11 2017 -0400

    parse change chair resolutions
---
 lib/whimsy/asf/agenda/special.rb             | 59 ++++++++++++++++------------
 www/board/agenda/views/actions/todos.json.rb |  5 ++-
 2 files changed, 38 insertions(+), 26 deletions(-)

diff --git a/lib/whimsy/asf/agenda/special.rb b/lib/whimsy/asf/agenda/special.rb
index 812e067..31a4064 100644
--- a/lib/whimsy/asf/agenda/special.rb
+++ b/lib/whimsy/asf/agenda/special.rb
@@ -68,6 +68,8 @@ class ASF::Board::Agenda
       people += text.scan(/#{list_item}<(#{asfid})(?:@|\s*at\s*)
         (?:\.\.\.|apache\.org|apache\sdot\sorg)>\s*$/xi)
 
+      need_chair = false
+
       whimsy = 'https://whimsy.apache.org'
       if title =~ /Change (.*?) Chair/ or title =~ /Terminate (\w+)$/
         people.clear
@@ -95,36 +97,13 @@ class ASF::Board::Agenda
           attrs['warnings'] ||= ['Unable to match expected number of names']
           attrs['names'] = committee.names
         end
+
+        need_chair = true
       else
         if title =~ /Establish (.*)/
           name = $1
           attrs['prior_reports'] =
             "#{whimsy}/board/minutes/#{name.gsub(/\W/,'_')}"
-          if text =~ /FURTHER RESOLVED, that\s+([^,]*?),?\s+be\b/
-            chairname = $1.gsub(/\s+/, ' ').strip
-
-            if chairname =~ /\s\(([-.\w]+)\)$/
-              # if chair's id is present in parens, use that value
-              attrs['chair'] = $1 unless $1.empty?
-              chairname.sub! /\s+\(.*\)$/, ''
-            else
-              # match chair's name against people in the committee
-              chair = people.find {|person| person.first == chairname}
-              attrs['chair'] = (chair ? chair.last : nil)
-            end
-
-            unless people.include? [chairname, attrs['chair']]
-              if people.empty?
-                attrs['warnings'] ||= ['Unable to locate PMC email addresses'] 
-              elsif attrs['chair']
-                attrs['warnings'] ||= ['Chair not member of PMC'] 
-              else
-                attrs['warnings'] ||= ['Chair not found in resolution'] 
-              end
-            end
-          else
-            attrs['warnings'] ||= ['Chair not found in resolution'] 
-          end
 
           if text.scan(/[<(][-.\w]+@(?:[-\w]+\.)+\w+[>)]/).
             any? {|email| not email.include? 'apache.org'}
@@ -132,6 +111,36 @@ class ASF::Board::Agenda
             attrs['warnings'] ||= ['non apache.org email address found'] 
           end
         end
+
+        need_chair = true
+      end
+
+      if need_chair
+	if text =~ /FURTHER RESOLVED, that\s+([^,]*?),?\s+be\b/
+	  chairname = $1.gsub(/\s+/, ' ').strip
+
+	  if chairname =~ /\s\(([-.\w]+)\)$/
+	    # if chair's id is present in parens, use that value
+	    attrs['chair'] = $1 unless $1.empty?
+	    chairname.sub! /\s+\(.*\)$/, ''
+	  else
+	    # match chair's name against people in the committee
+	    chair = people.find {|person| person.first == chairname}
+	    attrs['chair'] = (chair ? chair.last : nil)
+	  end
+
+	  unless people.include? [chairname, attrs['chair']]
+	    if people.empty?
+	      attrs['warnings'] ||= ['Unable to locate PMC email addresses'] 
+	    elsif attrs['chair']
+	      attrs['warnings'] ||= ['Chair not member of PMC'] 
+	    else
+	      attrs['warnings'] ||= ['Chair not found in resolution'] 
+	    end
+	  end
+	else
+	  attrs['warnings'] ||= ['Chair not found in resolution'] 
+	end
       end
 
       people.map! do |name, id| 
diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb
index ded1848..b01abf1 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -172,10 +172,12 @@ end
 transitioning = {}
 establish = {}
 terminate = {}
+change = []
 
 Agenda.parse(agenda, :full).each do |item|
   next unless item[:attach] =~ /^7\w$/
-  if item['title'] =~ /^Change .*? Chair$/ and item['people']
+  if item['title'] =~ /^Change (.*?) Chair$/ and item['people']
+    change << {name: $1, resolution: item['title'], chair: item['chair']}
     item['people'].keys.each do |person|
       transitioning[ASF::Person.find(person)] = item['title']
     end
@@ -196,6 +198,7 @@ _add add.map {|person| {id: person.id, name: person.public_name,
   sort_by {|person| person[:id]}
 _remove remove.map {|person| {id: person.id, name: person.public_name}}.
   sort_by {|person| person[:id]}
+_change change
 _establish establish.
   map {|name, resolution| {name: name, resolution: resolution}}
 _terminate terminate.

-- 
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.

[whimsy] 01/03: forgot to commit the file

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 14d26ab71a0b8ff0959192b92fd58729018b5c68
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sat Sep 23 15:56:03 2017 -0400

    forgot to commit the file
---
 www/test/icla/views/vue-config.js.rb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/www/test/icla/views/vue-config.js.rb b/www/test/icla/views/vue-config.js.rb
new file mode 100644
index 0000000..bdcce94
--- /dev/null
+++ b/www/test/icla/views/vue-config.js.rb
@@ -0,0 +1,8 @@
+# Filter out "data property already declared as a prop" warnings
+Vue.config.warnHandler = proc do |msg, vm, trace|
+  return if msg =~ /^The data property "\w+" is already declared as a prop\./
+  console.error "[Vue warn]: " + msg + trace if defined? console
+end
+
+# reraise errors to enable easier debugging
+Vue.config.errorHandler = proc {|err, vm, info| raise err}

-- 
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.

[whimsy] 02/03: flush cache of agendas parsed with previous versions of the library

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 f79f027359218b3fe5e101dc908534004b232ed4
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sat Sep 23 15:58:58 2017 -0400

    flush cache of agendas parsed with previous versions of the library
---
 lib/whimsy/asf.rb                 | 2 +-
 www/board/agenda/models/agenda.rb | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf.rb b/lib/whimsy/asf.rb
index 68e29a7..60d2f0e 100644
--- a/lib/whimsy/asf.rb
+++ b/lib/whimsy/asf.rb
@@ -27,7 +27,7 @@ module ASF
   def self.library_mtime
     parent_dir = File.dirname(File.expand_path(__FILE__))
     sources = Dir.glob("#{parent_dir}/**/*")
-    times = sources.map {|source| File.mtime(source)}
+    times = sources.map {|source| File.mtime(source.untaint)}
     times.max.gmtime
   end
 
diff --git a/www/board/agenda/models/agenda.rb b/www/board/agenda/models/agenda.rb
index 9448ceb..5587fb6 100755
--- a/www/board/agenda/models/agenda.rb
+++ b/www/board/agenda/models/agenda.rb
@@ -14,6 +14,12 @@ class Agenda
   FileUtils.mkdir_p CACHE
   @@cache = Hash.new {|hash, key| hash[key] = {mtime: 0}}
 
+  # flush cache of files made with previous versions of the library
+  libmtime = ASF::library_mtime
+  Dir["#{CACHE}/*.yml"].each do |cache|
+    File.unlink(cache) if File.mtime(cache) < libmtime
+  end
+
   # fetch parsed agenda from in memory cache if up to date, otherwise
   # fall back to disk.
   def self.[](file)

-- 
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.