[whimsy] branch master updated: make script work post meeting

2022-06-17 Thread rubys
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 8c5093a3 make script work post meeting
8c5093a3 is described below

commit 8c5093a3500679dc32baf3e85673d44ec428caf8
Author: Sam Ruby 
AuthorDate: Fri Jun 17 18:39:06 2022 -0400

make script work post meeting
---
 www/members/non-participants.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 4f33583f..90ac7e88 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -19,7 +19,7 @@ today = Date.today.strftime('%Y%m%d')
 if meeting > today
   current_status = ASF::MeetingUtil.current_status(cur_mtg_dir)
 else
-  current_status = lambda {'No response'}
+  current_status = lambda {|id| 'No response'}
 end
 
 # separator / is added when link is generated



[whimsy] branch master updated: simplify label

2022-05-31 Thread rubys
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 be191c95 simplify label
be191c95 is described below

commit be191c9544653da81d356c7ad60d891b8eb673d7
Author: Sam Ruby 
AuthorDate: Tue May 31 20:58:46 2022 -0400

simplify label
---
 www/project/icla2/views/form.erb | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/project/icla2/views/form.erb b/www/project/icla2/views/form.erb
index 16c9dcea..0668f79d 100644
--- a/www/project/icla2/views/form.erb
+++ b/www/project/icla2/views/form.erb
@@ -6,8 +6,10 @@
 
   
 
-  What is your name?
-  
+  What is your name?
+
+  
+
   
 
   



[whimsy] branch master updated: add a skeleton of a new icla application

2022-05-31 Thread rubys
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 25483ad1 add a skeleton of a new icla application
25483ad1 is described below

commit 25483ad1b31bb64a52db09edd924646cd62a4d5f
Author: Sam Ruby 
AuthorDate: Tue May 31 20:44:10 2022 -0400

add a skeleton of a new icla application
---
 www/project/icla2/main.rb  | 13 +
 www/project/icla2/views/answer.erb | 10 ++
 www/project/icla2/views/form.erb   | 14 ++
 www/project/icla2/views/index.erb  | 10 ++
 4 files changed, 47 insertions(+)

diff --git a/www/project/icla2/main.rb b/www/project/icla2/main.rb
new file mode 100755
index ..d4386b6f
--- /dev/null
+++ b/www/project/icla2/main.rb
@@ -0,0 +1,13 @@
+require 'sinatra'
+
+get '/' do
+  erb :index
+end
+
+get '/form' do
+  erb :form
+end
+
+post '/answer' do
+  erb :answer
+end
diff --git a/www/project/icla2/views/answer.erb 
b/www/project/icla2/views/answer.erb
new file mode 100644
index ..988e2d5f
--- /dev/null
+++ b/www/project/icla2/views/answer.erb
@@ -0,0 +1,10 @@
+
+
+  
+ICLA Demo
+  
+
+  
+Hello <%= params[:name] %>.
+  
+
diff --git a/www/project/icla2/views/form.erb b/www/project/icla2/views/form.erb
new file mode 100644
index ..16c9dcea
--- /dev/null
+++ b/www/project/icla2/views/form.erb
@@ -0,0 +1,14 @@
+
+
+  
+ICLA Demo
+  
+
+  
+
+  What is your name?
+  
+  
+
+  
+
diff --git a/www/project/icla2/views/index.erb 
b/www/project/icla2/views/index.erb
new file mode 100644
index ..d8acd158
--- /dev/null
+++ b/www/project/icla2/views/index.erb
@@ -0,0 +1,10 @@
+
+
+  
+ICLA Demo
+  
+
+  
+Click on the following: link.
+  
+



[whimsy] branch master updated: Nokogumbo has been merged into Nokogiri

2022-05-24 Thread rubys
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 ea1c3722 Nokogumbo has been merged into Nokogiri
ea1c3722 is described below

commit ea1c3722515b25b7b23721f1ee79a827d8adb140
Author: Sam Ruby 
AuthorDate: Tue May 24 22:50:44 2022 -0400

Nokogumbo has been merged into Nokogiri

See https://github.com/rubys/nokogumbo#notice-end-of-life
---
 www/project/icla/Gemfile | 2 +-
 www/roster/Gemfile   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/project/icla/Gemfile b/www/project/icla/Gemfile
index c287548a..284d94e2 100644
--- a/www/project/icla/Gemfile
+++ b/www/project/icla/Gemfile
@@ -17,7 +17,7 @@ gem 'rake'
 gem 'wunderbar'
 gem 'ruby2js'
 gem 'sinatra'
-gem 'nokogumbo'
+gem 'nokogiri'
 gem 'execjs'
 
 group :test do
diff --git a/www/roster/Gemfile b/www/roster/Gemfile
index 4debc723..7b154013 100644
--- a/www/roster/Gemfile
+++ b/www/roster/Gemfile
@@ -16,7 +16,7 @@ gem 'rake'
 gem 'wunderbar'
 gem 'ruby2js'
 gem 'sinatra', '~> 2.0'
-gem 'nokogumbo'
+gem 'nokogiri'
 gem 'mail'
 gem 'kramdown'
 gem 'sanitize'



[whimsy] branch master updated: avoid use of chars as a field as it looks like a method call

2022-05-18 Thread rubys
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 61271403 avoid use of chars as a field as it looks like a method call
61271403 is described below

commit 6127140356016335df7c87eee2e25141858ffcda
Author: Sam Ruby 
AuthorDate: Wed May 18 05:31:02 2022 -0700

avoid use of chars as a field as it looks like a method call
---
 www/board/agenda/views/utils.js.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/views/utils.js.rb 
b/www/board/agenda/views/utils.js.rb
index 70ffe36b..c137d923 100644
--- a/www/board/agenda/views/utils.js.rb
+++ b/www/board/agenda/views/utils.js.rb
@@ -7,10 +7,10 @@ Server = {directors: []}
 
 # Escape HTML characters so that raw text can be safely inserted as HTML
 def htmlEscape(string)
-  return string.gsub(htmlEscape.chars) {|c| htmlEscape.replacement[c]}
+  return string.gsub(htmlEscape.special) {|c| htmlEscape.replacement[c]}
 end
 
-htmlEscape.chars = Regexp.new('[&<>]', 'g')
+htmlEscape.special = Regexp.new('[&<>]', 'g')
 htmlEscape.replacement = {'&' => '', '<' => '', '>' => ''}
 
 # escape a string so that it can be used as a regular expression



[whimsy] branch master updated: allow filtered json output

2022-05-11 Thread rubys
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 fcf60efa allow filtered json output
fcf60efa is described below

commit fcf60efa1984e379765b2575d65281eb07ffa743
Author: Sam Ruby 
AuthorDate: Wed May 11 16:57:08 2022 -0400

allow filtered json output
---
 www/members/non-participants.cgi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 0ee339e8..4f33583f 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -129,5 +129,6 @@ _html do
 end
 
 _json do
-  ASF::MeetingUtil.tracker((@meetingsMissed || 3).to_i)
+  ASF::MeetingUtil.tracker((@meetingsMissed || 3).to_i).
+select {|id, info| info['status'] == @status || @status == nil}.to_h
 end



[whimsy] branch master updated: don't show emeritus and deceased members as "active"

2022-04-18 Thread rubys
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 02376954 don't show emeritus and deceased members as "active"
02376954 is described below

commit 0237695459bd169b8bc335b6f6e9710753c64649
Author: Sam Ruby 
AuthorDate: Mon Apr 18 19:36:20 2022 -0400

don't show emeritus and deceased members as "active"
---
 www/members/inactive.cgi | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index 01b32de8..21d93e1b 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -97,11 +97,19 @@ _html do
   }
 ) do
 
+  member_status = ASF::Person.find(@user).asf_member?
+
   _p_ do
-_span "#{name}, your current meeting attendance status is: "
-_code tracker[@user]['status']
+if member_status != true
+  _span "#{name}, your current membership status is: "
+  _code member_status
+else
+  _span "#{name}, your current meeting attendance status is: "
+  _code tracker[@user]['status']
+end
   end
-  if active
+
+  if active and member_status == true
 att = miss = 0
 if !matrix.nil?
   matrix.each do |date, status|



[whimsy] branch master updated: make roster and secretary workbench ready for Ruby 3.1 and Node 17

2022-04-14 Thread rubys
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 e2d5462a make roster and secretary workbench ready for Ruby 3.1 and 
Node 17
e2d5462a is described below

commit e2d5462a7d772afe63b4d08489ee9894210c0453
Author: Sam Ruby 
AuthorDate: Thu Apr 14 16:05:52 2022 -0400

make roster and secretary workbench ready for Ruby 3.1 and Node 17
---
 www/roster/Gemfile  | 2 ++
 www/roster/views/committee.html.rb  | 2 +-
 www/roster/views/committer.html.rb  | 2 +-
 www/roster/views/committers.html.rb | 2 +-
 www/roster/views/group.html.rb  | 2 +-
 www/roster/views/iclas.html.rb  | 2 +-
 www/roster/views/nonpmc.html.rb | 2 +-
 www/roster/views/ppmc.html.rb   | 2 +-
 www/roster/views/ppmc_new.html.rb   | 2 +-
 www/secretary/workbench/Gemfile | 2 ++
 www/secretary/workbench/views/index.html.rb | 2 +-
 www/secretary/workbench/views/parts.html.rb | 2 +-
 12 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/www/roster/Gemfile b/www/roster/Gemfile
index 7b3bd898..c531d98f 100644
--- a/www/roster/Gemfile
+++ b/www/roster/Gemfile
@@ -25,3 +25,5 @@ group :development do
   gem 'passenger'
   gem 'listen'
 end
+
+gem 'net-smtp', require: false # for Ruby 3.1
diff --git a/www/roster/views/committee.html.rb 
b/www/roster/views/committee.html.rb
index 7719e058..2adf4da4 100644
--- a/www/roster/views/committee.html.rb
+++ b/www/roster/views/committee.html.rb
@@ -19,7 +19,7 @@ _html do
 end
 
 _script src: "app.js?#{appmtime}"
-_.render '#main' do
+_.render '#main', timeout: 1 do
   _PMC committee: @committee, auth: @auth
 end
   end
diff --git a/www/roster/views/committer.html.rb 
b/www/roster/views/committer.html.rb
index 22dd36fc..4e174751 100644
--- a/www/roster/views/committer.html.rb
+++ b/www/roster/views/committer.html.rb
@@ -18,7 +18,7 @@ _html do
 end
 
 _script src: "app.js?#{appmtime}"
-_.render '#main' do
+_.render '#main', timeout: 1 do
   _Person committer: @committer, auth: @auth
 end
   end
diff --git a/www/roster/views/committers.html.rb 
b/www/roster/views/committers.html.rb
index bb2bc113..6be0c119 100644
--- a/www/roster/views/committers.html.rb
+++ b/www/roster/views/committers.html.rb
@@ -22,7 +22,7 @@ _html do
   ) do
 _div_.main!
 _script src: "app.js?#{appmtime}"
-_.render '#main' do
+_.render '#main', timeout: 1 do
   _CommitterSearch notinavail: @notinavail,
# This ends with '/'
iclapath: @iclapath
diff --git a/www/roster/views/group.html.rb b/www/roster/views/group.html.rb
index 8f19..57b7029c 100644
--- a/www/roster/views/group.html.rb
+++ b/www/roster/views/group.html.rb
@@ -19,7 +19,7 @@ _html do
 end
 
 _script src: "app.js?#{appmtime}"
-_.render '#main' do
+_.render '#main', timeout: 1 do
   _Group group: @group, auth: @auth
 end
   end
diff --git a/www/roster/views/iclas.html.rb b/www/roster/views/iclas.html.rb
index 75e058e0..135db1ab 100644
--- a/www/roster/views/iclas.html.rb
+++ b/www/roster/views/iclas.html.rb
@@ -14,7 +14,7 @@ _html do
   ) do
 _div_.main!
 _script src: "app.js?#{appmtime}"
-_.render '#main' do
+_.render '#main', timeout: 1 do
   _IclaSearch iclapath: @iclapath
 end
   end
diff --git a/www/roster/views/nonpmc.html.rb b/www/roster/views/nonpmc.html.rb
index 5439afa4..34abf797 100644
--- a/www/roster/views/nonpmc.html.rb
+++ b/www/roster/views/nonpmc.html.rb
@@ -19,7 +19,7 @@ _html do
 end
 
 _script src: "app.js?#{appmtime}"
-_.render '#main' do
+_.render '#main', timeout: 1 do
   _NonPMC nonpmc: @nonpmc, auth: @auth
 end
   end
diff --git a/www/roster/views/ppmc.html.rb b/www/roster/views/ppmc.html.rb
index 5cae4941..234f0596 100644
--- a/www/roster/views/ppmc.html.rb
+++ b/www/roster/views/ppmc.html.rb
@@ -17,7 +17,7 @@ _html do
 ) do
   _div_.main!
   _script src: "app.js?#{appmtime}"
-  _.render '#main' do
+  _.render '#main', timeout: 1 do
 _PPMC ppmc: @ppmc, auth: @auth
   end
 end
diff --git a/www/roster/views/ppmc_new.html.rb 
b/www/roster/views/ppmc_new.html.rb
index e7050f3f..452d63f3 100644
--- a/www/roster/views/ppmc_new.html.rb
+++ b/www/roster/views/ppmc_new.html.rb
@@ -19,7 +19,7 @@ _html do
 end
 
 _script src: "app.js?#{appmtime}"
-_.render '#main' do
+_.render '#main', timeout: 1 do
   _PPMCNew auth: @auth, pmcsAndBoard: @pmcsAndBoard,
 officersAndMemers: @officersAndMembers, ipmc: @ipmc
 end
diff --git a/www/secretary/workbench/Gemfile b/www/secretary/workbench/Gemfile
index d245ff0e..c327a06d 10

[whimsy] branch master updated: support Ruby 3.1.1p18 and Node v17.9.0

2022-04-14 Thread rubys
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 3e4c18ba support Ruby 3.1.1p18 and Node v17.9.0
3e4c18ba is described below

commit 3e4c18ba96b91e954ca4cf3a794ef1e64601b8df
Author: Sam Ruby 
AuthorDate: Thu Apr 14 15:53:09 2022 -0400

support Ruby 3.1.1p18 and Node v17.9.0

Fixes https://issues.apache.org/jira/browse/WHIMSY-385

See 
https://github.com/rubys/wunderbar/commit/e60e20e0236f409c96a841e7bedc3f4be359f5d9
 for details
---
 www/board/agenda/Gemfile| 2 ++
 www/board/agenda/views/main.html.rb | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile
index 05e2451e..f4ade85c 100644
--- a/www/board/agenda/Gemfile
+++ b/www/board/agenda/Gemfile
@@ -42,3 +42,5 @@ end
 group :development do
   gem 'passenger'
 end
+
+gem 'net-smtp', require: false # for Ruby 3.1
diff --git a/www/board/agenda/views/main.html.rb 
b/www/board/agenda/views/main.html.rb
index ec08e528..0a763d37 100644
--- a/www/board/agenda/views/main.html.rb
+++ b/www/board/agenda/views/main.html.rb
@@ -13,7 +13,7 @@ _html do
 
   _script src: "../app.js?#{@appmtime}", lang: 'text/javascript'
 
-  _.render '#main' do
+  _.render '#main', timeout: 1 do
 _Main server: @server, page: @page
   end
 end



[whimsy] branch master updated: nope, fix count again

2022-04-06 Thread rubys
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 448fdbad nope, fix count again
448fdbad is described below

commit 448fdbad26c1893cdcb2026986600b862c558900
Author: Sam Ruby 
AuthorDate: Wed Apr 6 10:04:37 2022 -0400

nope, fix count again
---
 www/members/non-participants.cgi | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 2dc8545f..97e370dc 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -82,11 +82,11 @@ _html do
   matrix.each do |id, _name, first, missed|
 next unless id
 
-count += 1
-status = current_status[id]
-next if @status and status != @status
-
 if missed >= @meetingsMissed
+  count += 1
+  status = current_status[id]
+  next if @status and status != @status
+
   _tr_ do
 _td! {_a nameMap[id], href: "#{ROSTER}/#{id}"}
 _td dates[-first-1] || dates.first



[whimsy] branch master updated: fix count

2022-04-06 Thread rubys
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 40d211a1 fix count
40d211a1 is described below

commit 40d211a1d2f9a467a35db50b4cd266e199f9de6a
Author: Sam Ruby 
AuthorDate: Wed Apr 6 10:03:22 2022 -0400

fix count
---
 www/members/non-participants.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 6f8525e4..2dc8545f 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -82,6 +82,7 @@ _html do
   matrix.each do |id, _name, first, missed|
 next unless id
 
+count += 1
 status = current_status[id]
 next if @status and status != @status
 
@@ -99,7 +100,6 @@ _html do
   _td status
 end
   end
-  count += 1
 end
   end
 end



[whimsy] branch master updated: add ability to filter based on status

2022-04-06 Thread rubys
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 21d37638 add ability to filter based on status
21d37638 is described below

commit 21d3763810aaefa420027f1a1f273e21f7ac3864
Author: Sam Ruby 
AuthorDate: Wed Apr 6 09:58:35 2022 -0400

add ability to filter based on status
---
 www/members/non-participants.cgi | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 8cee803c..6f8525e4 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -82,6 +82,9 @@ _html do
   matrix.each do |id, _name, first, missed|
 next unless id
 
+status = current_status[id]
+next if @status and status != @status
+
 if missed >= @meetingsMissed
   _tr_ do
 _td! {_a nameMap[id], href: "#{ROSTER}/#{id}"}
@@ -93,7 +96,7 @@ _html do
 end
 
 if meeting > today
-  _td current_status[id]
+  _td status
 end
   end
   count += 1



[whimsy] branch master updated: see if sending the error to STDERR helps

2022-03-29 Thread rubys
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 f1825c4  see if sending the error to STDERR helps
f1825c4 is described below

commit f1825c4a4e4cdeae58e0c2ea6228a7b3b22b
Author: Sam Ruby 
AuthorDate: Tue Mar 29 11:19:07 2022 -0400

see if sending the error to STDERR helps
---
 www/board/agenda/spec/vue_server.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/spec/vue_server.rb 
b/www/board/agenda/spec/vue_server.rb
index b5a28ab..97bc2ef 100644
--- a/www/board/agenda/spec/vue_server.rb
+++ b/www/board/agenda/spec/vue_server.rb
@@ -133,7 +133,7 @@ class VueServer
   end
 
   request.on 'error' do |error|
-console.log "VueServer error: #{error.message}"
+console.error "VueServer error: #{error.message}"
   end
 
   request.on 'end' do


[whimsy] branch master updated: default meetings missed to 3 in dropdown too

2022-03-25 Thread rubys
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 8fede05  default meetings missed to 3 in dropdown too
8fede05 is described below

commit 8fede05e913861bf34dac019486ff1af01320847
Author: Sam Ruby 
AuthorDate: Fri Mar 25 11:58:31 2022 -0400

default meetings missed to 3 in dropdown too
---
 www/members/non-participants.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index a263069..8cee803 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -30,6 +30,7 @@ end
 
 # produce HTML
 _html do
+  @meetingsMissed = (@meetingsMissed || 3).to_i
   _body? do
 attendance, matrix, dates, nameMap = 
ASF::MeetingUtil.get_attend_matrices(MEETINGS)
 _whimsy_body(
@@ -65,7 +66,6 @@ _html do
 end
   }
 ) do
-@meetingsMissed = (@meetingsMissed || 3).to_i
 count = 0
 _table.table.table_hover do
   _thead do


[whimsy] branch master updated: add more info

2022-03-24 Thread rubys
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 d7841cf  add more info
d7841cf is described below

commit d7841cf0aeb315ba75a225ffa296863555c924b6
Author: Sam Ruby 
AuthorDate: Thu Mar 24 10:14:05 2022 -0400

add more info
---
 lib/whimsy/asf/meeting-util.rb | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb
index 08dd35c..0b898ca 100644
--- a/lib/whimsy/asf/meeting-util.rb
+++ b/lib/whimsy/asf/meeting-util.rb
@@ -202,14 +202,20 @@ module ASF
   cur_mtg_dir = MeetingUtil.get_latest(meetings)
   current_status = self.current_status(cur_mtg_dir)
 
-  _attendance, matrix, _dates, _nameMap = 
MeetingUtil.get_attend_matrices(meetings)
+  _attendance, matrix, dates, _nameMap = 
MeetingUtil.get_attend_matrices(meetings)
   inactive = matrix.select do |id, _name, _first, missed|
 id and missed >= meetingsMissed
   end
 
-  Hash[inactive.map {|id, name, _first, missed|
-[id, {'name' => name, 'missed' => missed, 'status' => 
current_status[id]}]
+  Hash[inactive.map {|id, name, first, missed|
+[id, {
+  'name' => name,
+  'missed' => missed,
+  'status' => current_status[id],
+  'since' => dates[-first-1] || dates.first,
+  'last' => dates[-missed-1]
 }]
+  }]
 end
   end
 end


[whimsy] branch master updated: constant may not have been defined

2022-03-23 Thread rubys
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 8a0e5ae  constant may not have been defined
8a0e5ae is described below

commit 8a0e5ae461b432088590d2dba0d32e1e7567d0c1
Author: Sam Ruby 
AuthorDate: Wed Mar 23 15:20:23 2022 -0400

constant may not have been defined
---
 lib/whimsy/asf/meeting-util.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb
index 3376875..08dd35c 100644
--- a/lib/whimsy/asf/meeting-util.rb
+++ b/lib/whimsy/asf/meeting-util.rb
@@ -198,10 +198,11 @@ module ASF
 
 # return the current status of all inactive members
 def self.tracker(meetingsMissed)
-  cur_mtg_dir = MeetingUtil.get_latest(ASF::SVN['Meetings'])
+  meetings = ASF::SVN['Meetings']
+  cur_mtg_dir = MeetingUtil.get_latest(meetings)
   current_status = self.current_status(cur_mtg_dir)
 
-  _attendance, matrix, _dates, _nameMap = 
MeetingUtil.get_attend_matrices(MEETINGS)
+  _attendance, matrix, _dates, _nameMap = 
MeetingUtil.get_attend_matrices(meetings)
   inactive = matrix.select do |id, _name, _first, missed|
 id and missed >= meetingsMissed
   end


[whimsy] branch master updated: move meeting-util to lib/whimsy

2022-03-23 Thread rubys
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 51136af  move meeting-util to lib/whimsy
51136af is described below

commit 51136af09f206a954692464b4c392771f57f2a79
Author: Sam Ruby 
AuthorDate: Wed Mar 23 15:07:44 2022 -0400

move meeting-util to lib/whimsy
---
 lib/whimsy/asf/meeting-util.rb| 223 ++
 www/members/board-nominations.cgi |   4 +-
 www/members/inactive.cgi  |  10 +-
 www/members/list-traffic.cgi  |   4 +-
 www/members/meeting-util.rb   | 221 -
 www/members/meeting.cgi   |  26 ++---
 www/members/nominations.cgi   |   4 +-
 www/members/non-participants.cgi  |  10 +-
 www/members/proxy.cgi |  10 +-
 9 files changed, 257 insertions(+), 255 deletions(-)

diff --git a/lib/whimsy/asf/meeting-util.rb b/lib/whimsy/asf/meeting-util.rb
new file mode 100644
index 000..3376875
--- /dev/null
+++ b/lib/whimsy/asf/meeting-util.rb
@@ -0,0 +1,223 @@
+#!/usr/bin/env ruby
+# Utility methods and structs related to Member's Meetings
+# NOTE: Assumes 21st century '2*'
+$LOAD_PATH.unshift '/srv/whimsy/lib' if __FILE__ == $PROGRAM_NAME
+require 'whimsy/asf'
+require 'json'
+
+module ASF
+  class MeetingUtil
+RECORDS = ASF::SVN.svnurl!('Meetings')
+MEETING_FILES = { # Filename in meeting dir, pathname to another deployed 
tool, or URL
+  'README.txt' => 'README For Meeting Process And Roll Call',
+  'nomination_of_board.txt' => 'How To Nominate Someone For Board',
+  'nomination_of_members.txt' => 'How To Nominate A New Member',
+  '/members/proxy.cgi' => 'How To Submit A Proxy/Check Your Proxies',
+  'https://www.apache.org/foundation/governance/meetings' => 'How Voting 
Via Email Works',
+  'agenda.txt' => 'Official Meeting Agenda',
+  'board_ballot.txt' => 'Official Board Candidate Ballots',
+  'nominated-members.txt' => 'Official New Member Nominees/Seconds',
+  'proxies' => 'Official List Of Meeting Proxies',
+  'record' => 'Official List Of Voting Members',
+  'attend' => 'Official List Of Meeting Attendees (afterwards)',
+  'voter-tally' => 'Official List Of Who Voted (afterwards)',
+  'raw_board_votes.txt' => 'Official List Of Votes For Board (afterwards)',
+  'raw-irc-log' => 'ASFBot logs all postings on #asfmembers during meeting'
+}
+
+# Calculate how many members required to attend first half for quorum
+def self.calculate_quorum(mtg_dir)
+  begin
+begin
+  num_members = File.read(File.join(mtg_dir, 'record')).each_line.count
+rescue
+  num_members = ASF::Member.list.length - ASF::Member.status.length
+end
+quorum_need = (num_members + 2) / 3
+num_proxies = Dir[File.join(mtg_dir, 'proxies-received', '*')].count
+attend_irc = quorum_need - num_proxies
+  rescue StandardError => e
+# Ensure we can't break rest of script
+puts "ERROR: #{e}"
+return 0, 0, 0, 0
+  end
+  return num_members, quorum_need, num_proxies, attend_irc
+end
+
+# get list of proxy volunteers
+def self.getVolunteers(mtg_dir)
+  lines = IO.read(File.join(mtg_dir, 'proxies'))
+  # split by  underlines, then by blank lines; pick second para and 
drop leading spaces
+  lines.split(/^---/)[1].split(/\n\n/)[1].scan(/^\ 
+(\S.*$)/).flatten
+end
+# Get info about current users's proxying
+# @return "help text", ["id | name (proxy)", ...] if they are a proxy for 
other(s)
+# @return "You have already submitted a proxy form" to someone else
+# @return nil otherwise
+def self.is_user_proxied(mtg_dir, id)
+  user = ASF::Person.find(id)
+  lines = IO.read(File.join(mtg_dir, 'proxies'))
+  proxylist = lines.scan(/\s\s(.{25})(.*?)\((.*?)\)/) # [["Shane Curcuru   
 ", "David Fisher ", "wave"], ...]
+  help = nil
+  copypasta = [] # theiravailid | Their Name in Rolls (proxy)
+  begin
+proxylist.each do |arr|
+  if user.cn == arr[0].strip
+copypasta << "#{arr[2].ljust(12)} | #{arr[1].strip} (proxy)"
+  elsif user.id == arr[2]
+help = "NOTE: You have already submitted a proxy form for 
#{arr[0].strip} to mark your attendance (be sure they know to mark you at Roll 
Call)! "
+  end
+end
+  rescue StandardError => e
+(help ||= "") << "ERROR, could not read LDAP, proxy data may not be 
correct: #{e.message}"
+  end
+  if copypasta.empty?
+return help
+  else
+(help ||= "") << "Dur

[whimsy] branch master updated: minor refactoring and cleanup of inactive helpblock

2022-03-23 Thread rubys
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 a128be7  minor refactoring and cleanup of inactive helpblock
a128be7 is described below

commit a128be788146006ca56d8405748e4d40c3b617c3
Author: Sam Ruby 
AuthorDate: Wed Mar 23 14:51:23 2022 -0400

minor refactoring and cleanup of inactive helpblock
---
 www/members/inactive.cgi | 28 
 www/members/meeting-util.rb  | 15 +++
 www/members/non-participants.cgi | 10 +-
 3 files changed, 24 insertions(+), 29 deletions(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index 3c9cd64..276c856 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -62,16 +62,7 @@ _html do
 begin
   tracker = JSON.parse(IO.read(File.join(latest, 'non-participants.json')))
 rescue Errno::ENOENT => err
-  meetingsMissed = @meetingsMissed
-  _attendance, matrix, _dates, _nameMap = 
MeetingUtil.get_attend_matrices(MEETINGS)
-  inactive = matrix.select do |id, _name, _first, missed|
-id and missed >= meetingsMissed
-  end
-
-  current_status = MeetingUtil.current_status(latest)
-  tracker = inactive.map {|id, name, _first, missed|
-[id, {'name' => name, 'missed' => missed, 'status' => 
current_status[id]}]
-  }.to_h
+  tracker = MeetingUtil.tracker(@meetingsMissed)
 end
 
 # determine user's name as found in members.txt
@@ -96,16 +87,13 @@ _html do
 MeetingUtil::RECORDS => 'Official Past Meeting Records'
   },
   helpblock: -> {
-_p do
-  _ "This page shows your personal attendance record at past Member's 
meetings, as of meeting #{latest}."
-  _ %{
-It is also a poll of members who have not participated in
-ASF Members Meetings or Elections in the past three years, and
-if you have been inactive, asks you if you wish to remain active 
or go emeritus.  Inactive members
-(only) will see a form below and can
-indicate their choice and provide feedback on meetings by pushing 
one of the buttons below.
-  }
-end
+_p "This page shows your personal attendance record at past Member's 
meetings, as of meeting #{latest}."
+_p %{
+  Inactive members (only) will see a button to request a proxy for the 
next meeting, and
+  a second button that they can use to request to go emeritus.  They 
also
+  will see the text of an issue that will be placed before the 
membership
+  for a vote should they not take either of these two options.
+}
   }
 ) do
 
diff --git a/www/members/meeting-util.rb b/www/members/meeting-util.rb
index 27c9690..da6eae5 100644
--- a/www/members/meeting-util.rb
+++ b/www/members/meeting-util.rb
@@ -194,6 +194,21 @@ class MeetingUtil
   end
 end
   end
+
+  # return the current status of all inactive members
+  def self.tracker(meetingsMissed)
+cur_mtg_dir = MeetingUtil.get_latest(ASF::SVN['Meetings'])
+current_status = self.current_status(cur_mtg_dir)
+
+_attendance, matrix, _dates, _nameMap = 
MeetingUtil.get_attend_matrices(MEETINGS)
+inactive = matrix.select do |id, _name, _first, missed|
+  id and missed >= meetingsMissed
+end
+  
+Hash[inactive.map {|id, name, _first, missed|
+  [id, {'name' => name, 'missed' => missed, 'status' => 
current_status[id]}]
+  }]
+  end
 end
 
 # ## ###  # ##
diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 3b53390..bec9235 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -126,13 +126,5 @@ _html do
 end
 
 _json do
-  meetingsMissed = (@meetingsMissed || 3).to_i
-  _attendance, matrix, _dates, _nameMap = 
MeetingUtil.get_attend_matrices(MEETINGS)
-  inactive = matrix.select do |id, _name, _first, missed|
-id and missed >= meetingsMissed
-  end
-
-  Hash[inactive.map {|id, name, _first, missed|
-[id, {name: name, missed: missed, status: current_status[id]}]
-}]
+  MeetingUtil.tracker((@meetingsMissed || 3).to_i)
 end


[whimsy] branch master updated: remove debug line

2022-03-22 Thread rubys
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 9245b12  remove debug line
9245b12 is described below

commit 9245b124dee442dffb0522b66e44daeaf37b99f8
Author: Sam Ruby 
AuthorDate: Tue Mar 22 18:03:07 2022 -0400

remove debug line
---
 www/members/non-participants.cgi | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 197d31c..3b53390 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -101,8 +101,6 @@ _html do
   end
 end
 
-_div matrix.compact.length
-
 _div.count "Count: #{count} members inactive for #{@meetingsMissed} 
meetings:"
 
 summary = matrix.
@@ -137,4 +135,4 @@ _json do
   Hash[inactive.map {|id, name, _first, missed|
 [id, {name: name, missed: missed, status: current_status[id]}]
 }]
-end
\ No newline at end of file
+end


[whimsy] branch master updated: require 'mail'

2022-03-22 Thread rubys
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 b0c9412  require 'mail'
b0c9412 is described below

commit b0c94120b24e651dd4d9385d73ad8eac5946efb6
Author: Sam Ruby 
AuthorDate: Tue Mar 22 17:27:34 2022 -0400

require 'mail'
---
 www/members/inactive.cgi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index 0f095c6..3c9cd64 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -37,6 +37,7 @@ _html do
 
 if _.post? and @status == 'go emeritus' and $USER == @user
   # stub out roster functions
+  require 'mail'
   class Committer; def self.serialize(*args); end; end
   def _committer(*args); end
   def env.user; $USER; end


[whimsy] branch master updated: *sigh* typos

2022-03-22 Thread rubys
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 df6ae98  *sigh* typos
df6ae98 is described below

commit df6ae98439cea38086ebe38e83002bee8229cb26
Author: Sam Ruby 
AuthorDate: Tue Mar 22 17:23:12 2022 -0400

*sigh* typos
---
 www/members/inactive.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index f81273e..0f095c6 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -39,8 +39,8 @@ _html do
   # stub out roster functions
   class Committer; def self.serialize(*args); end; end
   def _committer(*args); end
-  dev env.user; $USER; end
-  dev env.password; $PASSWORD; end
+  def env.user; $USER; end
+  def env.password; $PASSWORD; end
 
   # issue request
   @action = 'request_emeritus'


[whimsy] branch master updated: oops

2022-03-22 Thread rubys
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 737c84d  oops
737c84d is described below

commit 737c84db6da5e2b7b0c13cab1203afb9545c260a
Author: Sam Ruby 
AuthorDate: Tue Mar 22 17:21:11 2022 -0400

oops
---
 www/members/inactive.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index 695ae2e..f81273e 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -40,7 +40,7 @@ _html do
   class Committer; def self.serialize(*args); end; end
   def _committer(*args); end
   dev env.user; $USER; end
-  dev env.password; $USER; end
+  dev env.password; $PASSWORD; end
 
   # issue request
   @action = 'request_emeritus'


[whimsy] branch master updated: actually read the script to be evaluated

2022-03-22 Thread rubys
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 a76305f  actually read the script to be evaluated
a76305f is described below

commit a76305f572821f672839bf5882957ed36c00db4f
Author: Sam Ruby 
AuthorDate: Tue Mar 22 17:12:32 2022 -0400

actually read the script to be evaluated
---
 www/members/inactive.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index 6c48942..512842f 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -43,7 +43,7 @@ _html do
   # issue request
   @action = 'request_emeritus'
   @userid = $USER
-  eval File.expand_path('../roster/views/actions/memstat.json.rb', __dir__)
+  eval IO.read(File.expand_path('../roster/views/actions/memstat.json.rb', 
__dir__))
 
   # Provide visual feedback
   _div.alert do


[whimsy] branch master updated: implement emeritus button (untested at this point)

2022-03-22 Thread rubys
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 ceb772f  implement emeritus button (untested at this point)
ceb772f is described below

commit ceb772fb0091a819628089b85aab054a3ce17794
Author: Sam Ruby 
AuthorDate: Tue Mar 22 17:07:29 2022 -0400

implement emeritus button (untested at this point)
---
 www/members/inactive.cgi | 64 
 1 file changed, 27 insertions(+), 37 deletions(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index 2891794..6c48942 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -21,8 +21,10 @@ _html do
   .transcript pre {border: none; line-height: 0}
   pre._hilite {background-color: yellow}
   form p {margin-top: 1em}
+  form {display: inline-block}
   textarea {width: 100%; height: 8em}
   textarea:disabled {background-color: #EE}
+  div.alert {background-color: yellow; border: solid 2px red; padding-top: 
0}
 }
   end
   _body? do
@@ -33,6 +35,26 @@ _html do
 @user ||= $USER
 @meetingsMissed = (@meetingsMissed || 3).to_i
 
+if _.post? and @status == 'go emeritus' and $USER == @user
+  # stub out roster functions
+  class Committer; def self.serialize(*args); end; end
+  def _committer(*args); end
+
+  # issue request
+  @action = 'request_emeritus'
+  @userid = $USER
+  eval File.expand_path('../roster/views/actions/memstat.json.rb', __dir__)
+
+  # Provide visual feedback
+  _div.alert do
+_h3 'Emeritus request submitted'
+_ul do
+  _li 'Check your email for confirmation.'
+  _li 'Your status will be updated on Whimsy within 10 minutes.'
+end
+  end
+end
+
 # get static/dynamic tracker
 begin
   tracker = JSON.parse(IO.read(File.join(latest, 'non-participants.json')))
@@ -114,33 +136,6 @@ _html do
 _p.alert.alert_warning "Dear #{name}, You have missed the last " +
   tracker[@user]['missed'].to_s + " meetings."
 
-if _.post? and @status and $USER == @user
-  _h3_ 'Session Transcript'
-
-  # setup authentication
-  if $PASSWORD
-auth = {user: $USER, password: $PASSWORD}
-  else
-auth = {}
-  end
-
-  # apply and commit changes
-  Dir.mktmpdir do |dir|
-_div_.transcript do
-  work = ASF::SVN.getInfoItem(latest,'url')
-  ASF::SVN.svn_('checkout', [work, dir], _, {depth: 
'empty'}.merge(auth))
-  json = File.join(dir, 'non-participants.json')
-  ASF::SVN.svn_('update', json, _, auth)
-  tracker = JSON.parse(IO.read(json))
-  tracker[@user]['status'] = @status
-  tracker[@user]['status'] = @suggestions
-  IO.write(json, JSON.pretty_generate(tracker))
-  ASF::SVN.svn_('diff', json, _, {verbose: true, sysopts: {hilite: 
[/"status":/]}})
-  ASF::SVN.svn_('commit', json, _, {msg: @status}.merge(auth))
-end
-  end
-end
-
 _div.status do
 
   wrap = 80
@@ -159,21 +154,16 @@ _html do
 
   _pre.issue issue_text
 
-  _form method: 'post' do
-if false
-  _p %{
-Please let us know how the ASF could make it easier
-for you to participate in Member's Meetings:
-  }
+  _p 'Update your status (if you are inactive):'
 
-  _textarea name: 'suggestions', disabled: active
-end
-
-_p 'Update your status (if you are inactive):'
+  _form method: 'get', action: 'proxy' do
 _button.btn.btn_success 'Request a proxy',
   name: 'status', value: 'request proxy',
   disabled: $USER != @user ||
 tracker[@user]['status'] == 'Proxy received'
+  end
+
+  _form method: 'post' do
 _button.btn.btn_warning 'I would like to go emeritus',
   name: 'status', value: 'go emeritus',
   disabled: $USER != @user ||


[whimsy] branch master updated: default user correctly

2022-03-22 Thread rubys
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 74a76eb  default user correctly
74a76eb is described below

commit 74a76eb87cee0d9cc88a786f2d8181e3bd4c4781
Author: Sam Ruby 
AuthorDate: Tue Mar 22 14:51:04 2022 -0400

default user correctly
---
 www/members/inactive.cgi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index d71b6a1..2891794 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -9,8 +9,6 @@ require 'json'
 require 'tmpdir'
 require_relative 'meeting-util'
 
-@user ||= $USER
-
 # produce HTML
 _html do
   _head_ do
@@ -32,6 +30,7 @@ _html do
 attendance = MeetingUtil.get_attendance(MEETINGS)
 latest = MeetingUtil.get_latest(MEETINGS)
 
+@user ||= $USER
 @meetingsMissed = (@meetingsMissed || 3).to_i
 
 # get static/dynamic tracker


[whimsy] branch master updated: only show issue text and options if inactive

2022-03-22 Thread rubys
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 e1cf4c1  only show issue text and options if inactive
e1cf4c1 is described below

commit e1cf4c1e30ca7be471e2c8fb072b9324c6d640a8
Author: Sam Ruby 
AuthorDate: Tue Mar 22 14:43:17 2022 -0400

only show issue text and options if inactive
---
 www/members/inactive.cgi | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index ead01a1..d71b6a1 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -32,11 +32,13 @@ _html do
 attendance = MeetingUtil.get_attendance(MEETINGS)
 latest = MeetingUtil.get_latest(MEETINGS)
 
+@meetingsMissed = (@meetingsMissed || 3).to_i
+
 # get static/dynamic tracker
 begin
   tracker = JSON.parse(IO.read(File.join(latest, 'non-participants.json')))
 rescue Errno::ENOENT => err
-  meetingsMissed = (@meetingsMissed || 3).to_i
+  meetingsMissed = @meetingsMissed
   _attendance, matrix, _dates, _nameMap = 
MeetingUtil.get_attend_matrices(MEETINGS)
   inactive = matrix.select do |id, _name, _first, missed|
 id and missed >= meetingsMissed
@@ -57,7 +59,7 @@ _html do
   'missed' => 0,
   'status' => 'active - attended meetings recently'
 }
-active = (tracker[@user]['missed'] == 0) && (ENV['QUERY_STRING'] == '')
+active = (tracker[@user]['missed'] < @meetingsMissed)
 _whimsy_body(
   title: PAGETITLE,
   subtitle: active ? 'Your Attendance Status' : 'Poll Of Inactive Members',


[whimsy] branch master updated: show text that will be used to create an issue in STeVe

2022-03-22 Thread rubys
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 0059676  show text that will be used to create an issue in STeVe
0059676 is described below

commit 0059676878e066689806395ed75602df3d3d2161
Author: Sam Ruby 
AuthorDate: Tue Mar 22 13:59:17 2022 -0400

show text that will be used to create an issue in STeVe
---
 www/members/inactive.cgi | 68 
 1 file changed, 45 insertions(+), 23 deletions(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index b25a575..ead01a1 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -9,12 +9,14 @@ require 'json'
 require 'tmpdir'
 require_relative 'meeting-util'
 
+@user ||= $USER
+
 # produce HTML
 _html do
   _head_ do
 _style :system
 _style %{
-  div.status, .status form {margin-left: 16px}
+  div.status, .status form, pre.issue {margin-left: 16px}
   .btn {margin: 4px}
   form {margin-bottom: 1em}
   .transcript {margin: 0 16px}
@@ -42,20 +44,20 @@ _html do
 
   current_status = MeetingUtil.current_status(latest)
   tracker = inactive.map {|id, name, _first, missed|
-[id, {name: name, missed: missed, status: current_status[id]}]
+[id, {'name' => name, 'missed' => missed, 'status' => 
current_status[id]}]
   }.to_h
 end
 
 # determine user's name as found in members.txt
-name = ASF::Member.find_text_by_id($USER).to_s.split("\n").first
+name = ASF::Member.find_text_by_id(@user).to_s.split("\n").first
 matrix = attendance['matrix'][name]
 
 # defaults for active users
-tracker[$USER] ||= {
+tracker[@user] ||= {
   'missed' => 0,
   'status' => 'active - attended meetings recently'
 }
-active = (tracker[$USER]['missed'] == 0) && (ENV['QUERY_STRING'] == '')
+active = (tracker[@user]['missed'] == 0) && (ENV['QUERY_STRING'] == '')
 _whimsy_body(
   title: PAGETITLE,
   subtitle: active ? 'Your Attendance Status' : 'Poll Of Inactive Members',
@@ -83,7 +85,7 @@ _html do
 
   _p_ do
 _span "#{name}, your current meeting attendance status is: "
-_code tracker[$USER]['status']
+_code tracker[@user]['status']
   end
   if active
 att = miss = 0
@@ -109,9 +111,9 @@ _html do
 
   if not active
 _p.alert.alert_warning "Dear #{name}, You have missed the last " +
-  tracker[$USER]['missed'].to_s + " meetings."
+  tracker[@user]['missed'].to_s + " meetings."
 
-if _.post? and @status
+if _.post? and @status and $USER == @user
   _h3_ 'Session Transcript'
 
   # setup authentication
@@ -129,8 +131,8 @@ _html do
   json = File.join(dir, 'non-participants.json')
   ASF::SVN.svn_('update', json, _, auth)
   tracker = JSON.parse(IO.read(json))
-  tracker[$USER]['status'] = @status
-  tracker[$USER]['status'] = @suggestions
+  tracker[@user]['status'] = @status
+  tracker[@user]['status'] = @suggestions
   IO.write(json, JSON.pretty_generate(tracker))
   ASF::SVN.svn_('diff', json, _, {verbose: true, sysopts: {hilite: 
[/"status":/]}})
   ASF::SVN.svn_('commit', json, _, {msg: @status}.merge(auth))
@@ -139,36 +141,56 @@ _html do
 end
 
 _div.status do
-  _form method: 'post' do
+
+  wrap = 80
+  issue_text = `#{MEETINGS}/whimsy-tools/issue-description.py 
#{name.inspect} #{ASF::SVN['foundation']}`.
+gsub(/(.{1,#{wrap}})( +|$\n?)|(.{1,#{wrap}})/, "\\1\\3\n")
+
+  if Dir.exist? File.join(latest, 'issues')
+_p 'Based on this status, the following text has been placed 
before the membership as a vote'
+  else
 _p %{
-  Please let us know how the ASF could make it easier
-  for you to participate in Member's Meetings:
+  Based on this status, the following text will be placed before 
the membership as a vote
+  unless you either assign a proxy for the next meeting or 
voluntarily request a conversion
+  to emeritus status.
 }
+  end
+
+  _pre.issue issue_text
 
-_textarea name: 'suggestions', disabled: active
+  _form method: 'post' do
+if false
+  _p %{
+Please let us know how the ASF could make it easier
+for you to participate in Member's Meetings:
+  }
+
+  _textarea name: 'suggestions', disabled: active
+end
 
 _p 'Update your status (if you are inactive):

[whimsy] branch master updated: make the inactive page work (at least to the point of showing data)

2022-03-22 Thread rubys
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 5d05547  make the inactive page work (at least to the point of showing 
data)
5d05547 is described below

commit 5d05547470d685f0a45818b4741eae0fd48f7515
Author: Sam Ruby 
AuthorDate: Tue Mar 22 09:44:00 2022 -0400

make the inactive page work (at least to the point of showing data)
---
 www/members/inactive.cgi | 27 ++--
 www/members/meeting-util.rb  | 51 ++
 www/members/non-participants.cgi | 53 
 3 files changed, 76 insertions(+), 55 deletions(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index 6420b88..b25a575 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -29,16 +29,27 @@ _html do
 MEETINGS = ASF::SVN['Meetings']
 attendance = MeetingUtil.get_attendance(MEETINGS)
 latest = MeetingUtil.get_latest(MEETINGS)
-# determine user's name as found in members.txt
-name = ASF::Member.find_text_by_id($USER).to_s.split("\n").first
-matrix = attendance['matrix'][name]
+
+# get static/dynamic tracker
 begin
   tracker = JSON.parse(IO.read(File.join(latest, 'non-participants.json')))
 rescue Errno::ENOENT => err
-  # Fallback to reading previous meeting's data, and reset variable
-  latest = MeetingUtil.get_previous(MEETINGS)
-  tracker = JSON.parse(IO.read(File.join(latest, 'non-participants.json')))
+  meetingsMissed = (@meetingsMissed || 3).to_i
+  _attendance, matrix, _dates, _nameMap = 
MeetingUtil.get_attend_matrices(MEETINGS)
+  inactive = matrix.select do |id, _name, _first, missed|
+id and missed >= meetingsMissed
+  end
+
+  current_status = MeetingUtil.current_status(latest)
+  tracker = inactive.map {|id, name, _first, missed|
+[id, {name: name, missed: missed, status: current_status[id]}]
+  }.to_h
 end
+
+# determine user's name as found in members.txt
+name = ASF::Member.find_text_by_id($USER).to_s.split("\n").first
+matrix = attendance['matrix'][name]
+
 # defaults for active users
 tracker[$USER] ||= {
   'missed' => 0,
@@ -80,7 +91,7 @@ _html do
   matrix.each do |date, status|
 if %w(A V P).include? status
   att += 1
-else
+elsif date != 'active'
   miss += 1
 end
   end
@@ -170,6 +181,8 @@ _html do
   end
   matrix.sort.reverse.each do |date, status|
 next if status == ' '
+next if date == 'active'
+
 color = 'bg-danger'
 color = 'bg-warning' if %w(e).include? status
 color = 'bg-success' if %w(A V P).include? status
diff --git a/www/members/meeting-util.rb b/www/members/meeting-util.rb
index 5faaa08..27c9690 100644
--- a/www/members/meeting-util.rb
+++ b/www/members/meeting-util.rb
@@ -143,6 +143,57 @@ class MeetingUtil
   f.puts JSON.pretty_generate(attendance)
 end
   end
+
+  # Precompute matrix and dates from attendance
+  def self.get_attend_matrices(dir)
+attendance = MeetingUtil.get_attendance(dir)
+
+# extract and format dates
+dates = attendance['dates'].sort.
+  map {|date| Date.parse(date).strftime('%Y-%b')}
+
+# compute mappings of names to ids
+members = ASF::Member.list
+active = Hash[members.select {|_id, data| not data['status']}]
+nameMap = Hash[members.map {|id, data| [id, data[:name]]}]
+idMap = Hash[nameMap.to_a.map(&:reverse)]
+
+# analyze attendance
+matrix = attendance['matrix'].map do |name, meetings|
+  id = idMap[name]
+  next unless id and active[id]
+
+  # exclude 'active entry'
+  data = meetings.select {|key, value| key.start_with? '20'}.
+sort.reverse.map(&:last)
+
+  first = data.length
+  missed = (data.index {|datum| datum != '-'} || data.length)
+
+  [id, name, first, missed]
+end
+
+return attendance, matrix.compact, dates, nameMap
+  end
+
+  # return a function to determine the current status of a member by id
+  def self.current_status(cur_mtg_dir)
+proxies = Dir["#{cur_mtg_dir}/proxies-received/*"].
+  map {|file| File.basename(file, '.*')}
+
+_tag,emeritus = ASF::SVN.getlisting('emeritus-requests-received')
+emeritus.map! {|file| File.basename(file, '.*')}
+
+lambda do |id|
+  if emeritus.include? id
+'Emeritus request received'
+  elsif proxies.include? id
+'Proxy received'
+  else
+'No response'
+  end
+end
+  end
 end
 
 # ## ###  # ##
diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 78476b9..197d31c 100755
-

[whimsy] branch master updated: Fixes #138

2022-03-22 Thread rubys
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 14207ff  Fixes #138
14207ff is described below

commit 14207ff3a8ef24adce75ddfd911de06efa1376af
Author: Sam Ruby 
AuthorDate: Tue Mar 22 00:08:32 2022 -0400

Fixes #138
---
 www/members/proxy.cgi | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index cb94071..bc3bf30 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -217,9 +217,12 @@ def emit_post(cur_mtg_dir, meeting, _)
   Dir.chdir(tmpdir) do
 # write proxy form
 filename = "proxies-received/#$USER.txt"
+update_existing_form = File.exist? filename
 File.write(filename, proxyform)
-ASF::SVN.svn_('add', filename, _)
-ASF::SVN.svn_('propset', ['svn:mime-type', 'text/plain; 
charset=utf-8', filename], _)
+unless update_existing_form
+  ASF::SVN.svn_('add', filename, _)
+  ASF::SVN.svn_('propset', ['svn:mime-type', 'text/plain; 
charset=utf-8', filename], _)
+end
 
 # get a list of proxies
 list = Dir['proxies-received/*.txt'].map do |file|
@@ -247,6 +250,8 @@ def emit_post(cur_mtg_dir, meeting, _)
 existing = proxies.scan(/   \S.*\(\S+\).*$/)
 # extract the ids
 existing_ids = existing.map {|line| line[/\((\S+)\)/, 1] }
+# ensure this id is not treated as previously existing
+existing_ids.delete(user.id)
 # keep only new ids
 added = list.
   reject {|line| existing_ids.include? line[/\((\S+)\)$/, 1]}


[whimsy] branch master updated: remove the entry being replaced

2022-03-22 Thread rubys
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 9f5b97a  remove the entry being replaced
9f5b97a is described below

commit 9f5b97aeb367c073fb98cdd029a0a220a8e635f2
Author: Sam Ruby 
AuthorDate: Tue Mar 22 00:31:57 2022 -0400

remove the entry being replaced
---
 www/members/proxy.cgi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index bc3bf30..ec7e053 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -251,7 +251,9 @@ def emit_post(cur_mtg_dir, meeting, _)
 # extract the ids
 existing_ids = existing.map {|line| line[/\((\S+)\)/, 1] }
 # ensure this id is not treated as previously existing
-existing_ids.delete(user.id)
+if existing_ids.delete(user.id)
+  existing.reject! {|line| line[/\((\S+)\)$/, 1] == user.id}
+end
 # keep only new ids
 added = list.
   reject {|line| existing_ids.include? line[/\((\S+)\)$/, 1]}


[whimsy] branch master updated: remove the entry being replaced

2022-03-21 Thread rubys
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 9f5b97a  remove the entry being replaced
9f5b97a is described below

commit 9f5b97aeb367c073fb98cdd029a0a220a8e635f2
Author: Sam Ruby 
AuthorDate: Tue Mar 22 00:31:57 2022 -0400

remove the entry being replaced
---
 www/members/proxy.cgi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index bc3bf30..ec7e053 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -251,7 +251,9 @@ def emit_post(cur_mtg_dir, meeting, _)
 # extract the ids
 existing_ids = existing.map {|line| line[/\((\S+)\)/, 1] }
 # ensure this id is not treated as previously existing
-existing_ids.delete(user.id)
+if existing_ids.delete(user.id)
+  existing.reject! {|line| line[/\((\S+)\)$/, 1] == user.id}
+end
 # keep only new ids
 added = list.
   reject {|line| existing_ids.include? line[/\((\S+)\)$/, 1]}


[whimsy] branch master updated: Fixes #138

2022-03-21 Thread rubys
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 14207ff  Fixes #138
14207ff is described below

commit 14207ff3a8ef24adce75ddfd911de06efa1376af
Author: Sam Ruby 
AuthorDate: Tue Mar 22 00:08:32 2022 -0400

Fixes #138
---
 www/members/proxy.cgi | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index cb94071..bc3bf30 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -217,9 +217,12 @@ def emit_post(cur_mtg_dir, meeting, _)
   Dir.chdir(tmpdir) do
 # write proxy form
 filename = "proxies-received/#$USER.txt"
+update_existing_form = File.exist? filename
 File.write(filename, proxyform)
-ASF::SVN.svn_('add', filename, _)
-ASF::SVN.svn_('propset', ['svn:mime-type', 'text/plain; 
charset=utf-8', filename], _)
+unless update_existing_form
+  ASF::SVN.svn_('add', filename, _)
+  ASF::SVN.svn_('propset', ['svn:mime-type', 'text/plain; 
charset=utf-8', filename], _)
+end
 
 # get a list of proxies
 list = Dir['proxies-received/*.txt'].map do |file|
@@ -247,6 +250,8 @@ def emit_post(cur_mtg_dir, meeting, _)
 existing = proxies.scan(/   \S.*\(\S+\).*$/)
 # extract the ids
 existing_ids = existing.map {|line| line[/\((\S+)\)/, 1] }
+# ensure this id is not treated as previously existing
+existing_ids.delete(user.id)
 # keep only new ids
 added = list.
   reject {|line| existing_ids.include? line[/\((\S+)\)$/, 1]}


[whimsy] branch master updated: add summary

2022-03-18 Thread rubys
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 a18118c  add summary
a18118c is described below

commit a18118c43b777b41d5a31c6f2784fdd436e5243d
Author: Sam Ruby 
AuthorDate: Fri Mar 18 10:55:56 2022 -0400

add summary
---
 www/members/non-participants.cgi | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 4e688b8..78476b9 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -146,7 +146,15 @@ _html do
   end
 end
 
-_div.count "Count: #{count} members inactive for #{@meetingsMissed} 
meetings."
+_div.count "Count: #{count} members inactive for #{@meetingsMissed} 
meetings:"
+
+summary = matrix.
+  select {|id, _name, _first, missed| id && missed >= @meetingsMissed}.
+  map(&:first).group_by {|id| current_status[id]}.sort
+
+_ul summary do |status, list|
+  _li "#{status}: #{list.length}"
+end
 
 _script %{
   var table = $(".table").stupidtable();
@@ -172,4 +180,4 @@ _json do
   Hash[inactive.map {|id, name, _first, missed|
 [id, {name: name, missed: missed, status: current_status[id]}]
 }]
-end
+end
\ No newline at end of file


[whimsy] branch master updated: add a tracking column

2022-03-18 Thread rubys
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 23331f9  add a tracking column
23331f9 is described below

commit 23331f94a38c32dcce5841f0cd5108adb7de3d89
Author: Sam Ruby 
AuthorDate: Fri Mar 18 10:22:36 2022 -0400

add a tracking column
---
 www/members/non-participants.cgi | 41 +---
 1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 41ba669..4e688b8 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -9,10 +9,38 @@ require 'json'
 require 'wunderbar/jquery/stupidtable'
 require_relative 'meeting-util'
 
+# Find latest meeting and check if it's in the future yet
+MEETINGS = ASF::SVN['Meetings']
+cur_mtg_dir = MeetingUtil.get_latest(MEETINGS)
+meeting = File.basename(cur_mtg_dir)
+today = Date.today.strftime('%Y%m%d')
+
+# look for recent activity if there is an upcoming meeting
+if meeting > today
+  proxies = Dir["#{cur_mtg_dir}/proxies-received/*"].
+map {|file| File.basename(file, '.*')}
+
+  _tag,emeritus = ASF::SVN.getlisting('emeritus-requests-received')
+  emeritus.map! {|file| File.basename(file, '.*')}
+
+  current_status = lambda do |id|
+if emeritus.include? id
+  'Emeritus request received'
+elsif proxies.include? id
+  'Proxy received'
+else
+  'No response'
+end
+  end
+else
+  current_status = lambda {'No response'}
+end
+
 # separator / is added when link is generated
 ROSTER = "/roster/committer"
-MEETINGS = ASF::SVN['Meetings']
-ENV['HTTP_ACCEPT'] = 'application/json' if ENV['QUERY_STRING'].include? 'json'
+if not ENV['QUERY_STRING'] or ENV['QUERY_STRING'].include? 'json'
+  ENV['HTTP_ACCEPT'] = 'application/json' 
+end
 
 # Precompute matrix and dates from attendance
 def get_attend_matrices(dir)
@@ -90,6 +118,9 @@ _html do
   _th 'Name', data_sort: 'string'
   _th 'Membership start date', data_sort: 'string'
   _th 'Last participated', data_sort: 'string'
+  if meeting > today
+_th 'Current status', data_sort: 'string'
+  end
 end
   end
 
@@ -105,6 +136,10 @@ _html do
 else
   _td dates[-missed-1]
 end
+
+if meeting > today
+  _td current_status[id]
+end
   end
   count += 1
 end
@@ -135,6 +170,6 @@ _json do
   end
 
   Hash[inactive.map {|id, name, _first, missed|
-[id, {name: name, missed: missed, status: 'no response yet'}]
+[id, {name: name, missed: missed, status: current_status[id]}]
 }]
 end


[whimsy] branch master updated: prep for 20220615 special members meeting

2022-03-17 Thread rubys
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 d43d842  prep for 20220615 special members meeting
d43d842 is described below

commit d43d8429921124819b5298f98190507ef8bf6a56
Author: Sam Ruby 
AuthorDate: Thu Mar 17 19:18:38 2022 -0400

prep for 20220615 special members meeting
---
 www/members/meeting-util.rb |  7 ++-
 www/members/proxy.cgi   | 43 +--
 2 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/www/members/meeting-util.rb b/www/members/meeting-util.rb
index d61cb11..5faaa08 100644
--- a/www/members/meeting-util.rb
+++ b/www/members/meeting-util.rb
@@ -27,7 +27,11 @@ class MeetingUtil
   # Calculate how many members required to attend first half for quorum
   def self.calculate_quorum(mtg_dir)
 begin
-  num_members = File.read(File.join(mtg_dir, 'record')).each_line.count
+  begin
+num_members = File.read(File.join(mtg_dir, 'record')).each_line.count
+  rescue
+num_members = ASF::Member.list.length - ASF::Member.status.length
+  end
   quorum_need = (num_members + 2) / 3
   num_proxies = Dir[File.join(mtg_dir, 'proxies-received', '*')].count
   attend_irc = quorum_need - num_proxies
@@ -118,6 +122,7 @@ class MeetingUtil
 attendance['cohorts'] = {}
 attendance['unmatched'] = []
 attendance['members'].each do |date, ary|
+  next unless date.start_with? '20' # exclude 'active'
   ary.each do |nam|
 found = iclas.select{|i| i.icla.legal_name == nam}
 found = iclas.select{|i| i.icla.name == nam} if found.empty?
diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index c9b8414..cb94071 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -21,6 +21,7 @@ def emit_instructions(today, cur_mtg_dir, meeting)
 Data from the previous meeting on #{meeting} is shown below for 
debugging only.
   }
   end
+  if meeting != '20220615'
   _p %{
 This form allows you to assign a proxy for the upcoming
 Member's Meeting on #{meeting}. If there is any chance you might not be 
able
@@ -45,6 +46,28 @@ def emit_instructions(today, cur_mtg_dir, meeting)
 _code 'proxies'
 _ ' file.  The great majority of proxies assigned are for attendance only; 
not for voting.'
   end
+  else
+  _p do
+_ "This form allows you to assign a proxy for the upcoming"
+_ "Member's Meeting on #{meeting}. For this meeting, we encourage"
+_strong 'every'
+_ "ASF member to assign a proxy to the ASF Secretary."
+_ "Attendance to the meeting is completely optional, and you can revoke a"
+_ "proxy at any time."
+  end
+  _p %{
+If you submit a proxy, you will still be sent ballots by email,
+so you will still need to
+cast your votes by checking your mail and clicking the links.
+  }
+  _p do
+_ 'Note while the legal proxy form below states your proxy may have your 
voting rights, in practice '
+_strong 'you will still be emailed your ballots'
+_ ' unless you explicitly mark a \'*\' in the appropriate place in the '
+_code 'proxies'
+_ ' file.  The great majority of proxies assigned are for attendance only; 
not for voting.'
+  end
+  end
   num_members, quorum_need, num_proxies, attend_irc = 
MeetingUtil.calculate_quorum(cur_mtg_dir)
   if num_members
 _p do
@@ -57,7 +80,7 @@ def emit_instructions(today, cur_mtg_dir, meeting)
 end
 
 # Emit meeting data and form for user to select a proxy - GET
-def emit_form(cur_mtg_dir, _meeting, volunteers, disabled)
+def emit_form(cur_mtg_dir, meeting, volunteers, disabled)
   help, copypasta = MeetingUtil.is_user_proxied(cur_mtg_dir, $USER)
   user_is_proxy = help && copypasta
   _whimsy_panel(user_is_proxy ? "You Are Proxying For Others" : "Select A 
Proxy For Upcoming Meeting", style: 'panel-success') do
@@ -107,14 +130,18 @@ def emit_form(cur_mtg_dir, _meeting, volunteers, disabled)
   map {|name| name[/(\w+)\.\w+$/, 1]}
 
 _select.combobox.input_large.form_control name: 'proxy' do
-  _option 'Select an ASF Member', :selected, value: ''
+  if meeting != '20220615'
+_option 'Select an ASF Member', :selected, value: ''
+  end
+
   ldap_members.sort_by(&:public_name).each do |member|
 next if member.id == $USER   # No self proxies
 next if exclude.include? member.id   # Not attending
 next unless members_txt[member.id]   # Non-members
 next if members_txt[member.id]['status'] # Emeritus/Deceased
 # Display the availid to users to match volunteers array above
-_option &qu

[whimsy] branch master updated: disable proxy submission until a meeting has been announced

2022-03-08 Thread rubys
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 ffefd01  disable proxy submission until a meeting has been announced
ffefd01 is described below

commit ffefd0126bc66d704a82ac207a3ab3d05e7939d8
Author: Sam Ruby 
AuthorDate: Tue Mar 8 16:34:07 2022 -0600

disable proxy submission until a meeting has been announced
---
 www/members/proxy.cgi | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index 5e63ca9..c9b8414 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -57,7 +57,7 @@ def emit_instructions(today, cur_mtg_dir, meeting)
 end
 
 # Emit meeting data and form for user to select a proxy - GET
-def emit_form(cur_mtg_dir, _meeting, volunteers)
+def emit_form(cur_mtg_dir, _meeting, volunteers, disabled)
   help, copypasta = MeetingUtil.is_user_proxied(cur_mtg_dir, $USER)
   user_is_proxy = help && copypasta
   _whimsy_panel(user_is_proxy ? "You Are Proxying For Others" : "Select A 
Proxy For Upcoming Meeting", style: 'panel-success') do
@@ -124,7 +124,7 @@ def emit_form(cur_mtg_dir, _meeting, volunteers)
   _a 'Read full procedures for Member Meeting', href: 
'https://www.apache.org/foundation/governance/members.html#meetings'
 end
 _div.button_group.text_center do
-  _button.btn.btn_primary 'Submit'
+  _button.btn.btn_primary 'Submit', disabled: disabled
 end
   end
 end
@@ -259,6 +259,7 @@ _html do
 today = Date.today.strftime('%Y%m%d')
 _whimsy_body(
   title: PAGETITLE,
+  style: (today > meeting ? 'panel-danger' : 'panel-info'),
   subtitle: today > meeting ? "ERROR: Next Meeting Data Not Available" : 
"How To Assign A Proxy For Upcoming Meeting",
   related: {
 '/members/meeting' => 'How-To / FAQ for Member Meetings',
@@ -271,7 +272,7 @@ _html do
   }
 ) do
   if _.get?
-emit_form(cur_mtg_dir, meeting, 
MeetingUtil::getVolunteers(cur_mtg_dir))
+emit_form(cur_mtg_dir, meeting, 
MeetingUtil::getVolunteers(cur_mtg_dir), today > meeting)
   else # POST
 emit_post(cur_mtg_dir, meeting, _)
   end


[whimsy] branch master updated: Add link to attendance report

2022-03-08 Thread rubys
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 36c3dd9  Add link to attendance report
36c3dd9 is described below

commit 36c3dd95c0f7e486a9cc757d861e0398fe3e7fc7
Author: Sam Ruby 
AuthorDate: Tue Mar 8 04:37:52 2022 -0500

Add link to attendance report
---
 www/members/non-participants.cgi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index de0e1a6..41ba669 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -52,7 +52,9 @@ _html do
 _whimsy_body(
   title: PAGETITLE,
   subtitle: 'Select A Date:',
+  relatedtitle: 'Related Links',
   related: {
+
'https://svn.apache.org/repos/private/foundation/Meetings/attend-report.txt' => 
'Attendance Report',
 '/members/meeting' => 'Members Meeting How-To Guide',
 '/members/attendance-xcheck' => 'Members Meeting Attendance 
Crosscheck',
 '/members/inactive' => 'Inactive Member Feedback Form',


[whimsy] branch master updated: attempt to fix WHIMSY-383

2022-03-08 Thread rubys
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 6ac5277  attempt to fix WHIMSY-383
6ac5277 is described below

commit 6ac5277a7288df9cfb0dc73669f786bb2847bed3
Author: Sam Ruby 
AuthorDate: Tue Mar 8 04:00:57 2022 -0500

attempt to fix WHIMSY-383
---
 www/roster/models/committer.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index b0dc16b..23283b7 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -131,8 +131,8 @@ class Committer
 
 if auth[:member] # i.e. member karma
 
-  if person.icla and person.icla.claRef and auth[:secretary] # Not all 
people have iclas (only check if secretary role)
-file = ASF::ICLAFiles.match_claRef(person.icla.claRef)  # must be 
secretary
+  if person.icla and person.icla.claRef and (auth[:secretary] or 
auth[:root]) # Not all people have iclas (only check if secretary or root role)
+file = ASF::ICLAFiles.match_claRef(person.icla.claRef)  # must be 
secretary or root
 if file
   url =ASF::SVN.svnurl('iclas')
   response[:forms][:icla] = "#{url}/#{file}"


[whimsy] branch master updated: get non-participants.cgi working again

2022-03-08 Thread rubys
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 68d4cce  get non-participants.cgi working again
68d4cce is described below

commit 68d4cce59b19dd29686dc570fda431c902febf2e
Author: Sam Ruby 
AuthorDate: Tue Mar 8 03:50:55 2022 -0500

get non-participants.cgi working again
---
 www/members/non-participants.cgi | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/www/members/non-participants.cgi b/www/members/non-participants.cgi
index 63c3b85..de0e1a6 100755
--- a/www/members/non-participants.cgi
+++ b/www/members/non-participants.cgi
@@ -32,7 +32,11 @@ def get_attend_matrices(dir)
   matrix = attendance['matrix'].map do |name, meetings|
 id = idMap[name]
 next unless id and active[id]
-data = meetings.sort.reverse.map(&:last)
+
+# exclude 'active entry'
+data = meetings.select {|key, value| key.start_with? '20'}.
+  sort.reverse.map(&:last)
+
 first = data.length
 missed = (data.index {|datum| datum != '-'} || data.length)
 


[whimsy] branch master updated: default initials to userid

2022-03-05 Thread rubys
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 f3876ba  default initials to userid
f3876ba is described below

commit f3876bac2dd3684e9d139b5224b419ba65206bd8
Author: Sam Ruby 
AuthorDate: Sat Mar 5 11:37:05 2022 -0500

default initials to userid
---
 www/board/agenda/views/models/user.js.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/views/models/user.js.rb 
b/www/board/agenda/views/models/user.js.rb
index 8ec7cf0..9fd0f23 100644
--- a/www/board/agenda/views/models/user.js.rb
+++ b/www/board/agenda/views/models/user.js.rb
@@ -9,7 +9,7 @@ class User
   end
 
   def self.initials
-Server.pending.initials || Server.initials
+Server.pending.initials || Server.userid
   end
 
   def self.firstname


[whimsy] branch master updated: more classes need to be permitted

2022-01-16 Thread rubys
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 9138faa  more classes need to be permitted
9138faa is described below

commit 9138faa637f75c28d13a9da11d605808e72fee5b
Author: Sam Ruby 
AuthorDate: Sun Jan 16 15:48:51 2022 -0500

more classes need to be permitted
---
 www/board/agenda/models/agenda.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/models/agenda.rb 
b/www/board/agenda/models/agenda.rb
index 56be0b1..0de17b5 100755
--- a/www/board/agenda/models/agenda.rb
+++ b/www/board/agenda/models/agenda.rb
@@ -36,7 +36,7 @@ class Agenda
 if File.exist?(path) and File.mtime(path) != data[:mtime]
   File.open(path) do |fh|
 fh.flock(File::LOCK_SH)
-data = YAML.load(fh.read)
+data = YAML.safe_load(fh.read, permitted_classes: [Symbol, Time])
   end
   @@cache[file] = data
 end


[whimsy] branch master updated: remove workaround

2021-12-16 Thread rubys
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 a7893c1  remove workaround
a7893c1 is described below

commit a7893c1f8655627cb6c4cf60eb32950cb72bb7ac
Author: Sam Ruby 
AuthorDate: Thu Dec 16 22:52:34 2021 -0500

remove workaround
---
 www/board/agenda/spec/actions_spec.rb | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/www/board/agenda/spec/actions_spec.rb 
b/www/board/agenda/spec/actions_spec.rb
index bd34d82..c06c424 100644
--- a/www/board/agenda/spec/actions_spec.rb
+++ b/www/board/agenda/spec/actions_spec.rb
@@ -3,9 +3,6 @@
 # to a form action.
 #
 
-# workround for Travis error:
-# uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState
-require "active_support/isolated_execution_state"
 require_relative 'spec_helper'
 require_relative '../models/pending'
 require 'shellwords'


[whimsy] branch master updated: attempt to fix test failure with rails 7's active support

2021-12-16 Thread rubys
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 f4c6a3f  attempt to fix test failure with rails 7's active support
f4c6a3f is described below

commit f4c6a3fcfee701ff98e0964c8fc834ce8de4061f
Author: Sam Ruby 
AuthorDate: Thu Dec 16 22:42:12 2021 -0500

attempt to fix test failure with rails 7's active support
---
 lib/whimsy/asf/agenda.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/whimsy/asf/agenda.rb b/lib/whimsy/asf/agenda.rb
index b6f7e42..b128d21 100644
--- a/lib/whimsy/asf/agenda.rb
+++ b/lib/whimsy/asf/agenda.rb
@@ -1,6 +1,7 @@
 require_relative '../asf'
 
 require 'time'
+require 'active_support'
 require 'active_support/time'
 require 'digest/md5'
 


[whimsy] branch master updated: add header

2021-10-13 Thread rubys
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 21c3dc8  add header
21c3dc8 is described below

commit 21c3dc87a4e2b8edcac47af391f5dc78a44ec869
Author: Sam Ruby 
AuthorDate: Wed Oct 13 10:03:09 2021 -0400

add header
---
 config/whimsy.conf | 4 
 tools/mkconf.rb| 7 +++
 2 files changed, 11 insertions(+)

diff --git a/config/whimsy.conf b/config/whimsy.conf
index 329473b..bbff78e 100644
--- a/config/whimsy.conf
+++ b/config/whimsy.conf
@@ -1,3 +1,7 @@
+# generated by https://github.com/apache/whimsy/blob/master/tools/mkconf.rb
+# do not edit directly.  Based on definitions found in
+# https://github.com/apache/infrastructure-p6
+#
 # 
 # Vhost template in module puppetlabs-apache
 # Managed by Puppet
diff --git a/tools/mkconf.rb b/tools/mkconf.rb
index fb8404b..eae9fe3 100755
--- a/tools/mkconf.rb
+++ b/tools/mkconf.rb
@@ -15,6 +15,13 @@ else
   conf = STDIN.read
 end
 
+conf = <<-EOF + conf
+# generated by https://github.com/apache/whimsy/blob/master/tools/mkconf.rb
+# do not edit directly.  Based on definitions found in
+# https://github.com/apache/infrastructure-p6
+#
+EOF
+
 conf.sub! 'VirtualHost *:443', 'VirtualHost *:80'
 conf.sub! /ServerName whimsy(.*?)\.apache\.org/, 'ServerName whimsy.local'
 


[whimsy] branch master updated: resync config/whimsy.conf

2021-10-12 Thread rubys
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 d3cd998  resync config/whimsy.conf
d3cd998 is described below

commit d3cd998e133b164da6638fa3ab78aab6acf465e5
Author: Sam Ruby 
AuthorDate: Tue Oct 12 18:51:03 2021 -0400

resync config/whimsy.conf
---
 config/whimsy.conf | 95 +++---
 tools/mkconf.rb|  2 +-
 2 files changed, 27 insertions(+), 70 deletions(-)

diff --git a/config/whimsy.conf b/config/whimsy.conf
index a601cec..329473b 100644
--- a/config/whimsy.conf
+++ b/config/whimsy.conf
@@ -2,7 +2,7 @@
 # Vhost template in module puppetlabs-apache
 # Managed by Puppet
 # 
-
+# 
 
   ServerName whimsy.local
 
@@ -23,19 +23,15 @@
   CustomLog "/var/log/apache2/whimsy_access.log" combined 
 
   ## Server aliases
-  ## ServerAlias whimsy-test.apache.org
-  ## ServerAlias whimsy4.apache.org
-  ## ServerAlias whimsy-vm4.apache.org
+  ## ServerAlias whimsy6.apache.org
+  ## ServerAlias whimsy.apache.org
 
   ## Custom fragment
 
-SetEnv PATH /usr/local/bin:${PATH}
+## Needed? SetEnv PATH /usr/local/rvm/wrappers/ruby-2.7:${PATH}
 
 PassengerFriendlyErrorPages on
 
-PassengerUser www-data
-PassengerGroup www-data
-
 AddCharset UTF-8 .json
 
 ExpiresActive On
@@ -52,6 +48,10 @@ ExpiresActive On
   
 
 
+
+  Require all granted
+
+
 
   Header add Access-Control-Allow-Origin "*"
   Options +Indexes
@@ -80,6 +80,7 @@ RedirectMatch permanent ^/officers/public_names 
/secretary/public-names
 
 # redirect obsolete mailing list request form to replacement application
 RedirectMatch permanent ^/officers/mlreq https://selfserve.apache.org/mail.html
+
 ProxyPass "/board/agenda/websocket/"  "ws://localhost:34234/"
 
 # We now have local custom error pages
@@ -141,10 +142,9 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public
   AuthType Basic
   AuthName "ASF Committers"
   AuthBasicProvider ldap
-  AuthLDAPUrl "ldaps://ldap-us-ro.apache.org:636 
ldap-eu-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
+  AuthLDAPUrl 
"ldaps://ldap-us-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
   AuthLDAPGroupAttribute member
   AuthLDAPGroupAttributeIsDN on
-  AuthLDAPMaxSubGroupDepth 0
   Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org
 
 
@@ -152,10 +152,9 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public
   AuthType Basic
   AuthName "ASF Committers"
   AuthBasicProvider ldap
-  AuthLDAPUrl "ldaps://ldap-us-ro.apache.org:636 
ldap-eu-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
+  AuthLDAPUrl 
"ldaps://ldap-us-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
   AuthLDAPGroupAttribute member
   AuthLDAPGroupAttributeIsDN on
-  AuthLDAPMaxSubGroupDepth 0
   Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org
 
 
@@ -163,10 +162,9 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public
   AuthType Basic
   AuthName "ASF Committers"
   AuthBasicProvider ldap
-  AuthLDAPUrl "ldaps://ldap-us-ro.apache.org:636 
ldap-eu-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
+  AuthLDAPUrl 
"ldaps://ldap-us-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
   AuthLDAPGroupAttribute member
   AuthLDAPGroupAttributeIsDN on
-  AuthLDAPMaxSubGroupDepth 0
   Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org
 
 
@@ -174,10 +172,9 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public
   AuthType Basic
   AuthName "ASF Committers"
   AuthBasicProvider ldap
-  AuthLDAPUrl "ldaps://ldap-us-ro.apache.org:636 
ldap-eu-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
+  AuthLDAPUrl 
"ldaps://ldap-us-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
   AuthLDAPGroupAttribute member
   AuthLDAPGroupAttributeIsDN on
-  AuthLDAPMaxSubGroupDepth 0
   Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org
 
 
@@ -185,10 +182,9 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public
   AuthType Basic
   AuthName "ASF Committers"
   AuthBasicProvider ldap
-  AuthLDAPUrl "ldaps://ldap-us-ro.apache.org:636 
ldap-eu-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
+  AuthLDAPUrl 
"ldaps://ldap-us-ro.apache.org:636/ou=people,dc=apache,dc=org?uid"
   AuthLDAPGroupAttribute member
   AuthLDAPGroupAttributeIsDN on
-  AuthLDAPMaxSubGroupDepth 0
   Require ldap-group cn=committers,ou=role,ou=groups,dc=apache,dc=org
 
 
@@ -196,10 +192,9 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public
   AuthType Basic
   AuthName "ASF Members and Incubator PMC"
   AuthBasicProvider ldap
-  AuthLDAPUrl "ldaps://ldap-us-ro.apache.org:636 
ldap-eu-ro.apache.org:636/ou=people,dc=apache,d

[whimsy] branch master updated: nokogumbo => nokogiri

2021-10-02 Thread rubys
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 18dcaaa  nokogumbo => nokogiri
18dcaaa is described below

commit 18dc57b92c43d0a82327bba2544bac5a401d
Author: Sam Ruby 
AuthorDate: Sat Oct 2 15:44:27 2021 -0400

nokogumbo => nokogiri
---
 www/board/agenda/Gemfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile
index 2c15597..5d35062 100644
--- a/www/board/agenda/Gemfile
+++ b/www/board/agenda/Gemfile
@@ -15,7 +15,7 @@ gem 'rake'
 gem 'wunderbar'
 gem 'ruby2js'
 gem 'sinatra', '~> 2.0'
-gem 'nokogumbo'
+gem 'nokogiri'
 gem 'execjs'
 gem 'listen'
 gem 'activesupport'


[whimsy] branch master updated: update node version for travis testing

2021-08-19 Thread rubys
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 fc07972  update node version for travis testing
fc07972 is described below

commit fc079723225e69646070bfaad11e4de1e66150eb
Author: Sam Ruby 
AuthorDate: Thu Aug 19 15:16:03 2021 -0400

update node version for travis testing

point to travis.com instead of travis.org
---
 .travis.yml | 2 +-
 README.md   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 66c0fef..8823ac0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,7 +39,7 @@ addons:
 
 # install recent Node.js
 before_install:
-  - nvm install 12
+  - nvm install 14
 
 # configure ASF LDAP
 sudo: required
diff --git a/README.md b/README.md
index 4281337..5aba020 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ ASF data are restricted to committers, Members, or Officers 
of the ASF.
 Every commit pushed to master is deployed within minutes to 
https://whimsy.apache.org/ using 
 [GitPubSub](https://www.apache.org/dev/gitpubsub.html).
 
-[![Build 
Status](https://travis-ci.org/apache/whimsy.svg)](https://travis-ci.org/apache/whimsy)
+[![Build 
Status](https://travis-ci.com/apache/whimsy.svg)](https://travis-ci.com/apache/whimsy)
 
 How Tos and Get The Code
 ===


[whimsy] branch master updated: update board/agenda to es2020 for all visitors

2021-08-19 Thread rubys
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 b30f834  update board/agenda to es2020 for all visitors
b30f834 is described below

commit b30f8348f038e92c5d75d52e5edf8dade1e9a703
Author: Sam Ruby 
AuthorDate: Thu Aug 19 10:29:24 2021 -0400

update board/agenda to es2020 for all visitors
---
 www/board/agenda/main.rb| 2 +-
 www/board/agenda/views/main.html.rb | 6 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/www/board/agenda/main.rb b/www/board/agenda/main.rb
index c6f6901..8308690 100755
--- a/www/board/agenda/main.rb
+++ b/www/board/agenda/main.rb
@@ -10,7 +10,7 @@ require 'whimsy/asf/board'
 require 'wunderbar/sinatra'
 require 'wunderbar/vue'
 require 'wunderbar/bootstrap/theme'
-require 'ruby2js/es2017'
+require 'ruby2js/es2020'
 require 'ruby2js/strict'
 require 'ruby2js/filter/functions'
 require 'ruby2js/filter/require'
diff --git a/www/board/agenda/views/main.html.rb 
b/www/board/agenda/views/main.html.rb
index f2ac92d..ec08e52 100644
--- a/www/board/agenda/views/main.html.rb
+++ b/www/board/agenda/views/main.html.rb
@@ -11,11 +11,7 @@ _html do
 
   _div_.main!
 
-  # force es5 for non-test visitors.  Visitors using browsers that support
-  # ServiceWorkers will receive es2017 versions of the script via
-  # views/bootstrap.html.erb.
-  app = (ENV['RACK_ENV'] == 'test' ? 'app' : 'app-es5')
-  _script src: "../#{app}.js?#{@appmtime}", lang: 'text/javascript'
+  _script src: "../app.js?#{@appmtime}", lang: 'text/javascript'
 
   _.render '#main' do
 _Main server: @server, page: @page


[whimsy] branch master updated: upgrade to ruby2js 4.1.5

2021-08-14 Thread rubys
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 0666ba7  upgrade to ruby2js 4.1.5
0666ba7 is described below

commit 0666ba7668646c5c4cd5285cc70f8d8e74c60bae
Author: Sam Ruby 
AuthorDate: Sat Aug 14 10:37:33 2021 -0400

upgrade to ruby2js 4.1.5
---
 www/board/agenda/Gemfile | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile
index 5fdfeae..2c15597 100644
--- a/www/board/agenda/Gemfile
+++ b/www/board/agenda/Gemfile
@@ -13,14 +13,7 @@ end
 
 gem 'rake'
 gem 'wunderbar'
-# ruby2js 4.1.1+ are broken:
-#   Events.broadcast(function(, ) {
-# ^
-# SyntaxError: Unexpected token ','
-# at new Script (vm.js:88:7)
-# Looks like 4.1.0 also breaks on live system
-# Previous major release
-gem 'ruby2js', '3.6.1'
+gem 'ruby2js'
 gem 'sinatra', '~> 2.0'
 gem 'nokogumbo'
 gem 'execjs'


[whimsy] branch master updated: missed two and a typo

2021-08-11 Thread rubys
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 efe01cb  missed two and a typo
efe01cb is described below

commit efe01cbc2758e3c0ffe957e46eca4957c27c651f
Author: Sam Ruby 
AuthorDate: Wed Aug 11 15:46:09 2021 -0400

missed two and a typo
---
 www/board/agenda/views/models/agenda.js.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/views/models/agenda.js.rb 
b/www/board/agenda/views/models/agenda.js.rb
index 0bca246..b1ca250 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -387,7 +387,7 @@ class Agenda
   if
 item.shepherd and
 firstname.start_with? item.shepherd.downcase() and
-(not shepherd or item.shepherd.length < shepherd.lenth)
+(not _shepherd or item.shepherd.length < _shepherd.length)
   then
 _shepherd = item.shepherd
   end


[whimsy] branch master updated (11e3739 -> cce314e)

2021-08-06 Thread rubys
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 11e3739  Docco
 add fda2740  Update Gemfile
 new cce314e  Merge pull request #121 from 
apache/remove-puma-gem-from-configuration

The 1 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/secretary/workbench/Gemfile | 4 
 1 file changed, 4 deletions(-)


[whimsy] 01/01: Merge pull request #121 from apache/remove-puma-gem-from-configuration

2021-08-06 Thread rubys
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 cce314e7b33c4ed13900ab129246c76a33092ff4
Merge: 11e3739 fda2740
Author: Sam Ruby 
AuthorDate: Fri Aug 6 18:39:09 2021 -0400

Merge pull request #121 from apache/remove-puma-gem-from-configuration

Update Gemfile

 www/secretary/workbench/Gemfile | 4 
 1 file changed, 4 deletions(-)


[whimsy] branch master updated: avoid name collisions

2021-08-05 Thread rubys
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 14bf617  avoid name collisions
14bf617 is described below

commit 14bf6171929261eb88528ccdefc46f2132488c65
Author: Sam Ruby 
AuthorDate: Thu Aug 5 11:32:35 2021 -0400

avoid name collisions
---
 www/board/agenda/views/models/agenda.js.rb | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/board/agenda/views/models/agenda.js.rb 
b/www/board/agenda/views/models/agenda.js.rb
index a517f42..0bca246 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -149,12 +149,12 @@ class Agenda
   end
 
   # provide read-only access to a number of properties
-  attr_reader :attach, :title, :owner, :shepherd, :timestamp, :digest, :mtime
+  attr_reader :attach, :title, :owner, :timestamp, :digest, :mtime
   attr_reader :approved, :roster, :prior_reports, :stats, :people, :notes
   attr_reader :chair_email, :mail_list, :warnings, :flagged_by
 
   # provide read/write access to other properties
-  attr_accessor :index
+  attr_accessor :index, :shepherd
   attr_writer :color
 
   def fulltitle
@@ -380,7 +380,7 @@ class Agenda
 
   # find the shortest match for shepherd name (example: Rich)
   def self.shepherd
-shepherd = nil
+_shepherd = nil
 
 firstname = User.firstname.downcase()
 Agenda.index.each do |item|
@@ -389,11 +389,11 @@ class Agenda
 firstname.start_with? item.shepherd.downcase() and
 (not shepherd or item.shepherd.length < shepherd.lenth)
   then
-shepherd = item.shepherd
+_shepherd = item.shepherd
   end
 end
 
-return shepherd
+return _shepherd
   end
 
   # summary


[whimsy] branch master updated: make post.js parseable with latest version of Ruby parser

2021-08-05 Thread rubys
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 d8be3c8  make post.js parseable with latest version of Ruby parser
d8be3c8 is described below

commit d8be3c8527a0ad94bde056890f72a0914fcae974
Author: Sam Ruby 
AuthorDate: Thu Aug 5 11:18:25 2021 -0400

make post.js parseable with latest version of Ruby parser

fixes 32 out of 44 failures, 12 to go.
---
 www/board/agenda/views/buttons/post.js.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/views/buttons/post.js.rb 
b/www/board/agenda/views/buttons/post.js.rb
index e60f81a..c563e54 100644
--- a/www/board/agenda/views/buttons/post.js.rb
+++ b/www/board/agenda/views/buttons/post.js.rb
@@ -164,7 +164,7 @@ class Post < Vue
   search.all? {|part|
 person.id.include? part or
 person.name.downcase().include? part
-  }
+  } \
 and
   not @pmc.include? person
 then


[whimsy] branch master updated: support same day posting of next board report

2021-05-19 Thread rubys
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 4e71f12  support same day posting of next board report
4e71f12 is described below

commit 4e71f1282ef97c5201bfdcd258ad4e3433ec7dfd
Author: Sam Ruby 
AuthorDate: Wed May 19 19:34:45 2021 -0400

support same day posting of next board report
---
 www/board/agenda/views/actions/potential-actions.json.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/potential-actions.json.rb 
b/www/board/agenda/views/actions/potential-actions.json.rb
index 8b896f1..48e4a8b 100644
--- a/www/board/agenda/views/actions/potential-actions.json.rb
+++ b/www/board/agenda/views/actions/potential-actions.json.rb
@@ -8,7 +8,7 @@ if ENV['RACK_ENV'] == 'test'
 else
   today = Date.today.strftime("#{FOUNDATION_BOARD}/board_agenda_%Y_%m_%d.txt")
   base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].
-   select {|file| file < today}.sort.last
+   select {|file| file <= today}.sort.last
 end
 
 parsed = ASF::Board::Agenda.parse(IO.read(base), true)


[whimsy] branch master updated: * www/board/agenda/routes.rb Change meeting duration to 1 hour

2021-05-18 Thread rubys
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 f65329a  * www/board/agenda/routes.rb   Change meeting duration to 1 
hour
 new 293d25d  Merge pull request #118 from sstriker/agenda-adjournment
f65329a is described below

commit f65329a160c8aa1f0eed7c98228aedb3ee5242f5
Author: Sander Striker 
AuthorDate: Tue May 18 16:00:36 2021 +0200

* www/board/agenda/routes.rb
  Change meeting duration to 1 hour
---
 www/board/agenda/routes.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 8e26a80..d967467 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -525,7 +525,8 @@ get '/new' do
   @tzlink = ASF::Board.tzlink(localtime)
   zone = ASF::Board::TIMEZONE.name
   @start_time = localtime.strftime('%H:%M') + ' ' + zone
-  @adjournment = (localtime + 2.hours).strftime('%H:%M') + ' ' + zone
+  duration = 1.hours
+  @adjournment = (localtime + duration).strftime('%H:%M') + ' ' + zone
   @prev_month = @meeting.to_date.prev_month.strftime('%B')
 
   # retrieve latest committee info


[whimsy] branch master updated: warn if discussion item is missing a body

2021-05-12 Thread rubys
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 ea0dbc4  warn if discussion item is missing a body
ea0dbc4 is described below

commit ea0dbc46f47527c4032109507006837300a4
Author: Sam Ruby 
AuthorDate: Wed May 12 18:36:31 2021 -0400

warn if discussion item is missing a body
---
 lib/whimsy/asf/agenda/discussion.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/whimsy/asf/agenda/discussion.rb 
b/lib/whimsy/asf/agenda/discussion.rb
index bdbedf5..cb29d1c 100644
--- a/lib/whimsy/asf/agenda/discussion.rb
+++ b/lib/whimsy/asf/agenda/discussion.rb
@@ -36,6 +36,7 @@ class ASF::Board::Agenda
 
   scan discussion, pattern do |attrs|
 attrs['section'] = '8' + attrs['section']
+attrs['warnings'] = ['Body is missing'] if attrs['text'].strip.empty?
   end
 end
   end


[whimsy] branch master updated: handle case where board meeting crosses a date boundary

2021-05-07 Thread rubys
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 026ace7  handle case where board meeting crosses a date boundary
026ace7 is described below

commit 026ace7b5d31a0db818410fa038c9a6e044829eb
Author: Sam Ruby 
AuthorDate: Fri May 7 09:04:28 2021 -0400

handle case where board meeting crosses a date boundary
---
 lib/whimsy/asf/agenda.rb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/lib/whimsy/asf/agenda.rb b/lib/whimsy/asf/agenda.rb
index 1b619cb..b6f7e42 100644
--- a/lib/whimsy/asf/agenda.rb
+++ b/lib/whimsy/asf/agenda.rb
@@ -166,6 +166,11 @@ class ASF::Board::Agenda
   end
 end
 
+# handle case where board meeting crosses a date boundary
+if @sections.values.first['timestamp'] > @sections.values.last['timestamp']
+  @sections.values.last['timestamp'] += 86_400_000 # add one day
+end
+
 @sections.values
   end
 


[whimsy] branch master updated: fix test regressions

2021-04-22 Thread rubys
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 15d4259  fix test regressions
15d4259 is described below

commit 15d4259921b15f32b61594b0751d5b0692da0032
Author: Sam Ruby 
AuthorDate: Thu Apr 22 22:28:01 2021 -0400

fix test regressions
---
 www/board/agenda/views/actions/potential-actions.json.rb | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/www/board/agenda/views/actions/potential-actions.json.rb 
b/www/board/agenda/views/actions/potential-actions.json.rb
index 41a429e..8b896f1 100644
--- a/www/board/agenda/views/actions/potential-actions.json.rb
+++ b/www/board/agenda/views/actions/potential-actions.json.rb
@@ -3,9 +3,14 @@
 #
 
 # get posted action items from previous report
-today = Date.today.strftime("#{FOUNDATION_BOARD}/board_agenda_%Y_%m_%d.txt")
-base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].
- select {|file| file < today}.sort.last
+if ENV['RACK_ENV'] == 'test'
+  base = "#{FOUNDATION_BOARD}/board_agenda_2015_01_21.txt"
+else
+  today = Date.today.strftime("#{FOUNDATION_BOARD}/board_agenda_%Y_%m_%d.txt")
+  base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].
+   select {|file| file < today}.sort.last
+end
+
 parsed = ASF::Board::Agenda.parse(IO.read(base), true)
 actions = parsed.find {|item| item['title'] == 'Action Items'}['actions']
 


[whimsy] branch master updated: fix potential actions

2021-04-22 Thread rubys
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 c71ad0d  fix potential actions
c71ad0d is described below

commit c71ad0dae9e2b79b7ad75bc2faf9a7691e02ab34
Author: Sam Ruby 
AuthorDate: Thu Apr 22 19:19:02 2021 -0400

fix potential actions
---
 www/board/agenda/views/actions/potential-actions.json.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/potential-actions.json.rb 
b/www/board/agenda/views/actions/potential-actions.json.rb
index d709fe1..41a429e 100644
--- a/www/board/agenda/views/actions/potential-actions.json.rb
+++ b/www/board/agenda/views/actions/potential-actions.json.rb
@@ -3,7 +3,7 @@
 #
 
 # get posted action items from previous report
-today = Date.today.strftime('board_agenda_%Y_%m_%d.txt')
+today = Date.today.strftime("#{FOUNDATION_BOARD}/board_agenda_%Y_%m_%d.txt")
 base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].
  select {|file| file < today}.sort.last
 parsed = ASF::Board::Agenda.parse(IO.read(base), true)


[whimsy] branch master updated: handle there only being one agenda in the directory

2021-04-22 Thread rubys
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 9a65fff  handle there only being one agenda in the directory
9a65fff is described below

commit 9a65fff1d549da06e3961bcd70446eede0e5c207
Author: Sam Ruby 
AuthorDate: Thu Apr 22 09:12:36 2021 -0400

handle there only being one agenda in the directory
---
 www/board/agenda/views/actions/potential-actions.json.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/potential-actions.json.rb 
b/www/board/agenda/views/actions/potential-actions.json.rb
index 61bcb78..d709fe1 100644
--- a/www/board/agenda/views/actions/potential-actions.json.rb
+++ b/www/board/agenda/views/actions/potential-actions.json.rb
@@ -3,7 +3,9 @@
 #
 
 # get posted action items from previous report
-base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].sort[-2]
+today = Date.today.strftime('board_agenda_%Y_%m_%d.txt')
+base = Dir["#{FOUNDATION_BOARD}/board_agenda_*.txt"].
+ select {|file| file < today}.sort.last
 parsed = ASF::Board::Agenda.parse(IO.read(base), true)
 actions = parsed.find {|item| item['title'] == 'Action Items'}['actions']
 


[whimsy] branch master updated: have the shepherd be sticky when there is an open AI

2021-04-21 Thread rubys
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 c16e18b  have the shepherd be sticky when there is an open AI
c16e18b is described below

commit c16e18bd71804f50cca585a8583af23f57898180
Author: Sam Ruby 
AuthorDate: Wed Apr 21 14:08:05 2021 -0400

have the shepherd be sticky when there is an open AI

See 
https://lists.apache.org/thread.html/r632d3465d876e86b59e35cbc9cfa5b00bd9b4e1e7952020b25ecf8cc%40%3Cboard.apache.org%3E
---
 lib/whimsy/asf/board.rb| 11 ---
 www/board/agenda/routes.rb |  7 ++-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/lib/whimsy/asf/board.rb b/lib/whimsy/asf/board.rb
index 5d1f1be..1f0af39 100644
--- a/lib/whimsy/asf/board.rb
+++ b/lib/whimsy/asf/board.rb
@@ -107,10 +107,11 @@ module ASF
 # source for shepherd information, yields a stream of director names
 # in random order
 class ShepherdStream < Enumerator
-  def initialize
+  def initialize(actions)
+@actions = (actions || []).reverse
 @directors = ASF::Service['board'].members
 
-super do |generator|
+super() do |generator|
   list = []
   loop do
 list = @directors.shuffle if list.empty?
@@ -126,7 +127,11 @@ module ASF
 chair = pmc.chair
 raise "no chair found for #{pmc.name}" unless chair
 
-if @directors.include? chair
+action = @actions.find {|action| action[:pmc] == pmc.display_name}
+
+if action
+  "#{chair.public_name} / #{action[:owner]}"
+elsif @directors.include? chair
   chair.public_name
 else
   "#{chair.public_name} / #{self.next}"
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 40bfcc5..8e26a80 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -539,10 +539,15 @@ get '/new' do
   next_month = contents[/Next month.*?\n\n/m].chomp
   @next_month = next_month[/(.*#.*\n)+/] || ''
 
+  # get potential actions
+  actions = JSON.parse(Wunderbar::JsonBuilder.new({}).instance_eval(
+File.read("#{settings.views}/actions/potential-actions.json.rb"),
+  ).target!, symbolize_names: true)[:actions]
+
   # Get directors, list of pmcs due to report, and shepherds
   @directors = ASF::Board.directors
   @pmcs = ASF::Board.reporting(@meeting)
-  @owner = ASF::Board::ShepherdStream.new
+  @owner = ASF::Board::ShepherdStream.new(actions)
 
   # Get list of unpublished and unapproved minutes
   draft = YAML.load_file(Dir["#{AGENDA_WORK}/board_minutes*.yml"].max)


[whimsy] branch master updated: ignore notes check in text environment

2021-03-18 Thread rubys
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 8aea2cd  ignore notes check in text environment
8aea2cd is described below

commit 8aea2cdd5d307aeb8306086448d6b35d4ac23bd2
Author: Sam Ruby 
AuthorDate: Thu Mar 18 18:05:16 2021 -0400

ignore notes check in text environment

committee-info.txt isn't mocked
---
 www/board/agenda/views/models/agenda.js.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/views/models/agenda.js.rb 
b/www/board/agenda/views/models/agenda.js.rb
index bdbf58e..a517f42 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -576,7 +576,7 @@ class Agenda
 
 if self.missing and Agenda.meeting_day
   return true if @to == 'president'
-  return true unless @notes
+  return true unless @notes or Server.userid == 'test'
   return false
 end
 


[whimsy] branch master updated: skip over missing reports on meeting day unless either flagged or the report appears in the "next month" section of committee-info.txt

2021-03-18 Thread rubys
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 4d7b978  skip over missing reports on meeting day unless either 
flagged or the report appears in the "next month" section of committee-info.txt
4d7b978 is described below

commit 4d7b9789177631e5f40713279afc589e38c9b9d5
Author: Sam Ruby 
AuthorDate: Thu Mar 18 17:39:12 2021 -0400

skip over missing reports on meeting day unless either flagged or the report
appears in the "next month" section of committee-info.txt
---
 www/board/agenda/views/models/agenda.js.rb | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/models/agenda.js.rb 
b/www/board/agenda/views/models/agenda.js.rb
index cfe6e48..bdbf58e 100644
--- a/www/board/agenda/views/models/agenda.js.rb
+++ b/www/board/agenda/views/models/agenda.js.rb
@@ -573,7 +573,13 @@ class Agenda
   # determine if this report can be skipped during the course of the meeting
   def skippable
 return false if self.flagged
-return (@to == 'president') if self.missing and Agenda.meeting_day
+
+if self.missing and Agenda.meeting_day
+  return true if @to == 'president'
+  return true unless @notes
+  return false
+end
+
 return false if @approved and @approved.length < 5 and Agenda.meeting_day
 return true
   end


[whimsy] branch master updated: fix link

2021-02-27 Thread rubys
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 97eb886  fix link
97eb886 is described below

commit 97eb8868e15eb1c7555cdc86e6344dec79a4f914
Author: Sam Ruby 
AuthorDate: Sat Feb 27 17:11:44 2021 -0500

fix link
---
 www/members/board-nominations.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/board-nominations.cgi 
b/www/members/board-nominations.cgi
index 703a2e6..0c2e982 100755
--- a/www/members/board-nominations.cgi
+++ b/www/members/board-nominations.cgi
@@ -67,7 +67,7 @@ _html do
 _whimsy_body(
   title: PAGETITLE,
   related: {
-'-nominations' => 'New Member nominations cross-check',
+'nominations' => 'New Member nominations cross-check',
 ASF::SVN.svnpath!('Meetings') => 'Official Meeting Agenda Directory'
   },
   helpblock: -> {



[whimsy] branch master updated: link board nominations to related pages

2021-02-27 Thread rubys
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 ec2fa01  link board nominations to related pages
ec2fa01 is described below

commit ec2fa013d35c68e374deca879b64e702d649a663
Author: Sam Ruby 
AuthorDate: Sat Feb 27 17:10:39 2021 -0500

link board nominations to related pages
---
 www/members/board-nominations.cgi | 1 +
 www/members/index.cgi | 3 ++-
 www/members/nominations.cgi   | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/members/board-nominations.cgi 
b/www/members/board-nominations.cgi
index c6f5919..703a2e6 100755
--- a/www/members/board-nominations.cgi
+++ b/www/members/board-nominations.cgi
@@ -67,6 +67,7 @@ _html do
 _whimsy_body(
   title: PAGETITLE,
   related: {
+'-nominations' => 'New Member nominations cross-check',
 ASF::SVN.svnpath!('Meetings') => 'Official Meeting Agenda Directory'
   },
   helpblock: -> {
diff --git a/www/members/index.cgi b/www/members/index.cgi
index 67f9527..f89dadf 100755
--- a/www/members/index.cgi
+++ b/www/members/index.cgi
@@ -12,7 +12,8 @@ MEETING = {
   'proxy.cgi' => "Assign a proxy for the (current) Member's meeting",
   'watch.cgi' => "Potential Member Watch List - tracking candidates for future 
nominations",
   'memberless-pmcs.cgi' => "Crosscheck PMCs with few/no ASF Members, for 
future nominations",
-  'nominations.cgi' => "Member's Meeting nominations cross-check - ensuring 
nominations get on the ballot, etc.",
+  'nominations.cgi' => "Member's nominations cross-check - ensuring 
nominations get on the ballot, etc.",
+  'board-nominations.cgi' => "Board nominations cross-check - ensuring 
nominations get on the ballot, etc.",
   'attendance-xcheck.cgi' => "Member's Meeting Attendance cross-check - who 
attended when",
   'non-participants.cgi' => "Active Members not participating in recent 
meetings (to send a poll to)",
   'inactive.cgi' => "Poll of Inactive Members - tool to query 
non-participating members why",
diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
index 78d130d..1ab8f69 100755
--- a/www/members/nominations.cgi
+++ b/www/members/nominations.cgi
@@ -69,6 +69,7 @@ _html do
   related: {
 '/members/memberless-pmcs' => 'PMCs with no/few ASF Members',
 '/members/watch' => 'Watch list for potential Member candidates',
+'board-nominations' => 'Board nominations cross-check',
 ASF::SVN.svnpath!('Meetings') => 'Official Meeting Agenda Directory'
   },
   helpblock: -> {



[whimsy] branch master updated: add require for active_support

2020-12-19 Thread rubys
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 bd06508  add require for active_support
bd06508 is described below

commit bd065082c05d164c271843b22f6a1136d715dc18
Author: Sam Ruby 
AuthorDate: Sat Dec 19 09:34:11 2020 -0500

add require for active_support

fixes #109
---
 www/board/agenda/main.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/board/agenda/main.rb b/www/board/agenda/main.rb
index 4537f53..c6f6901 100755
--- a/www/board/agenda/main.rb
+++ b/www/board/agenda/main.rb
@@ -23,6 +23,7 @@ require 'mail'
 require 'open-uri'
 require 'erubis'
 require 'tzinfo'
+require 'active_support'
 require 'active_support/time'
 require 'mustache'
 



[whimsy] branch master updated: add back in super, explicitly passing in no block

2020-11-22 Thread rubys
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 55cc6ca  add back in super, explicitly passing in no block
55cc6ca is described below

commit 55cc6cae9f60a907a301eefbe20134970e35f7a1
Author: Sam Ruby 
AuthorDate: Sun Nov 22 22:43:22 2020 -0500

add back in super, explicitly passing in no block
---
 lib/whimsy/asf/ldap.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index f25e41c..cac792a 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -530,6 +530,7 @@ module ASF
   class LazyHash < Hash
 # capture an initializer to be called only if necessary.
 def initialize()
+  super() {}
   @initializer = initializer
 end
 



[whimsy] branch master updated: remove super entirely

2020-11-22 Thread rubys
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 fd23229  remove super entirely
fd23229 is described below

commit fd2322936cbdfec9ea4f5b4e8381df531751b134
Author: Sam Ruby 
AuthorDate: Sun Nov 22 22:37:38 2020 -0500

remove super entirely
---
 lib/whimsy/asf/ldap.rb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index e4c93df..f25e41c 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -530,7 +530,6 @@ module ASF
   class LazyHash < Hash
 # capture an initializer to be called only if necessary.
 def initialize()
-  super()
   @initializer = initializer
 end
 



[whimsy] branch travis-debug+ldap updated: remove stray 'e'

2020-11-22 Thread rubys
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch travis-debug+ldap
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/travis-debug+ldap by this push:
 new df9bffe  remove stray 'e'
df9bffe is described below

commit df9bffe11afde296161733a5e01b7697a48ec9e5
Author: Sam Ruby 
AuthorDate: Sun Nov 22 22:23:12 2020 -0500

remove stray 'e'
---
 lib/whimsy/asf/ldap.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 382d4a6..0eecf4b 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1,4 +1,4 @@
-e
+#
 # Encapsulate access to LDAP, caching results for performance.  For best
 # performance in applications that access large number of objects, make use
 # of the preload methods to pre-fetch multiple objects in a single LDAP



[whimsy] branch travis-debug+ldap created (now 5a6137e)

2020-11-22 Thread rubys
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a change to branch travis-debug+ldap
in repository https://gitbox.apache.org/repos/asf/whimsy.git.


  at 5a6137e  add in ONLY the tidied ldap

This branch includes the following new commits:

 new 5a6137e  add in ONLY the tidied ldap

The 1 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.




[whimsy] 01/01: add in ONLY the tidied ldap

2020-11-22 Thread rubys
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch travis-debug+ldap
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit 5a6137eeea04269dd93339edb7f69b8386b2e9c0
Author: Sam Ruby 
AuthorDate: Sun Nov 22 21:54:32 2020 -0500

add in ONLY the tidied ldap
---
 lib/whimsy/asf/ldap.rb | 72 +-
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 22c4e1f..ca10493 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -189,7 +189,7 @@ module ASF
   hosts = ASF::LDAP::RO_HOSTS if hosts.empty?
 
   hosts.shuffle!
-  #Wunderbar.debug "Hosts:\n#{hosts.join(' ')}"
+  # Wunderbar.debug "Hosts:\n#{hosts.join(' ')}"
   @hosts = hosts
 end
 
@@ -210,7 +210,7 @@ module ASF
   cert = Dir["#{ETCLDAP}/asf*-ldap-client.pem"].first
 
   # verify/obtain/write the cert
-  if not cert
+  unless cert
 cert = "#{ETCLDAP}/asf-ldap-client.pem"
 File.write cert, ASF::LDAP.puppet_cert || self.extract_cert
   end
@@ -451,25 +451,25 @@ module ASF
 # return the collection of instances of this class, as a hash.  Note the
 # values are weak references, so may have already been reclaimed.
 def self.collection
-  @collection ||= Hash.new
+  @collection ||= {}
 end
 
 # Find an instance of this class, given a name
-def self.[] name
+def self.[](name)
   new(name)
 end
 
 # Find an instance of this class, given a name
-def self.find name
+def self.find(name)
   new(name)
 end
 
 # Create an instance of this class, given a name.  Note: if an instance
 # already exists, it will return a handle to the existing object.
-def self.new name
+def self.new(name)
   begin
 object = collection[name]
-return object.reference if object and object.weakref_alive?
+return object.reference if object&.weakref_alive?
   rescue
   end
 
@@ -479,7 +479,7 @@ module ASF
 # create an instance of this class, returning a weak reference to the
 # object for reuse.  Note: self.new will check for such a reference and
 # return it in favor of allocating a new object.
-def initialize name
+def initialize(name)
   self.class.collection[name] = WeakRef.new(self)
   @name = name
 end
@@ -530,6 +530,7 @@ module ASF
   class LazyHash < Hash
 # capture an initializer to be called only if necessary.
 def initialize()
+  super
   @initializer = initializer
 end
 
@@ -553,15 +554,15 @@ module ASF
 @base = 'ou=role,ou=groups,dc=apache,dc=org'
 
 # get a list of committers
-def self.list()
+def self.list
   ASF.search_one(base, 'cn=committers', 'member').flatten.
-map {|uid| Person.find uid[/uid=(.*?),/,1]}
+map {|uid| Person.find uid[/uid=(.*?),/, 1]}
 end
 
 # get a list of committers (ids only)
-def self.listids()
+def self.listids
   ASF.search_one(base, 'cn=committers', 'member').flatten.
-map {|uid| uid[/uid=(.*?),/,1]}
+map {|uid| uid[/uid=(.*?),/, 1]}
 end
 
 # create a new person and add as a new committer to LDAP.
@@ -625,7 +626,7 @@ module ASF
   ASF::Group['committers'].remove(person) rescue nil
 
   # remove person from 'new' committers list, ignoring exceptions
-  ASF::LDAP.modify("cn=committers,#@base",
+  ASF::LDAP.modify("cn=committers,#{@base}",
 [ASF::Base.mod_delete('member', [person.dn])]) rescue nil
 
   # remove person from LDAP (should almost never be done)
@@ -641,7 +642,7 @@ module ASF
   end
 
   # add person to 'new' committers list
-  ASF::LDAP.modify("cn=committers,#@base",
+  ASF::LDAP.modify("cn=committers,#{@base}",
 [ASF::Base.mod_add('member', [person.dn])])
 
   # add person to 'legacy' committers list
@@ -660,7 +661,7 @@ module ASF
   ASF::Group['committers'].remove(person)
 
   # remove person from 'new' committers list
-  ASF::LDAP.modify("cn=committers,#@base",
+  ASF::LDAP.modify("cn=committers,#{@base}",
 [ASF::Base.mod_delete('member', [person.dn])])
 end
 
@@ -697,7 +698,7 @@ module ASF
 filter = "(|#{people.map {|person| "(uid=#{person.name})"}.join})"
   end
 
-  zero = Hash[attributes.map {|attribute| [attribute,nil]}]
+  zero = Hash[attributes.map {|attribute| [attribute, nil]}]
 
   data = ASF.search_one(base, filter, attributes + ['uid'])
   data = Hash[data.map! {|hash| [list[hash['uid'].first], hash]}]
@@ -713,7 +714,7 @@ module ASF
 end
 
 # return person only if it actually exits
-def self.[] id
+def self.[](id)
   person = super
   person.attrs['dn'] ? person : nil
 end

[whimsy] branch master updated: update passenger.conf when --user is toggled

2020-11-15 Thread rubys
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 7d59daf  update passenger.conf when --user is toggled
7d59daf is described below

commit 7d59daf9e3810c451dde1e455702dc044acaee87
Author: Sam Ruby 
AuthorDate: Sun Nov 15 15:28:45 2020 -0500

update passenger.conf when --user is toggled
---
 config/setupmymac | 36 ++--
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/config/setupmymac b/config/setupmymac
index 2bab58c..2b1686d 100755
--- a/config/setupmymac
+++ b/config/setupmymac
@@ -356,27 +356,27 @@ end
 ### Configure passenger
 
 passenger_conf = '/etc/apache2/other/passenger.conf'
-if force[:passenger] or not File.exist? passenger_conf
-  if Process.uid == 0
-instructions = `su $SUDO_USER -c "brew info passenger"`
-  else
-instructions = `brew info passenger`
-  end
-  section = instructions[/To activate Phusion Passenger for 
Apache.*(\n\n|\z)/m]
-  snippet = section.scan(/^ .*/).join("\n") + "\n"
-  snippet[/Passenger\w*Ruby\s+(.*)/, 1] = RbConfig.ruby
 
-  if option != :user
-snippet += "PassengerUser #{user}\nPassengerGroup #{group}\n"
-  end
+if Process.uid == 0
+  instructions = `su $SUDO_USER -c "brew info passenger"`
+else
+  instructions = `brew info passenger`
+end
 
-  if not File.exists?(passenger_conf) or File.read(passenger_conf) != snippet
-sudo do
-  color "$ sudo edit #{passenger_conf}"
-  File.write passenger_conf, snippet unless $dry_run
+section = instructions[/To activate Phusion Passenger for Apache.*(\n\n|\z)/m]
+snippet = section.scan(/^ .*/).join("\n") + "\n"
+snippet[/Passenger\w*Ruby\s+(.*)/, 1] = RbConfig.ruby
 
-  restart_apache = true
-end
+if option != :user
+  snippet += "PassengerUser #{user}\nPassengerGroup #{group}\n"
+end
+
+if not File.exists?(passenger_conf) or File.read(passenger_conf) != snippet
+  sudo do
+color "$ sudo edit #{passenger_conf}"
+File.write passenger_conf, snippet unless $dry_run
+
+restart_apache = true
   end
 end
 



[whimsy] branch master updated: another reject! => reject

2020-11-01 Thread rubys
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 de43e25  another reject! => reject
de43e25 is described below

commit de43e250e33ab58bd151ddeacabed8a4a5f5398b
Author: Sam Ruby 
AuthorDate: Sun Nov 1 11:59:49 2020 -0500

another reject! => reject
---
 www/board/agenda/daemon/channel.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/daemon/channel.rb 
b/www/board/agenda/daemon/channel.rb
index 52712d2..3b609ad 100644
--- a/www/board/agenda/daemon/channel.rb
+++ b/www/board/agenda/daemon/channel.rb
@@ -82,7 +82,7 @@ class Channel
   fh.truncate(fh.pos)
 end
 
-users.reject! {|name| name =~ /^board_agenda_[_\d]+$/}
+users.reject {|name| name =~ /^board_agenda_[_\d]+$/}
   end
 
   # close all open sockets



[whimsy] branch master updated: reject! returns nil if no items were deleted

2020-10-31 Thread rubys
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 02257f8  reject! returns nil if no items were deleted
02257f8 is described below

commit 02257f8c36d78bd3f9a7db009626dbe914ae72dc
Author: Sam Ruby 
AuthorDate: Sat Oct 31 20:13:48 2020 -0400

reject! returns nil if no items were deleted
---
 www/board/agenda/routes.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 319fd32..0d51230 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -221,7 +221,7 @@ def server
   if File.exist?(file) and File.mtime(file) != @present_mtime
 @present_mtime = File.mtime(file)
 @present = YAML.load_file(file).
-  reject! {|name| name =~ /^board_agenda_[_\d]+$/}
+  reject {|name| name =~ /^board_agenda_[_\d]+$/}
   end
 
   if env['SERVER_NAME'] == 'localhost'



[whimsy] branch master updated: fix broken link

2020-10-27 Thread rubys
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 e32b543  fix broken link
e32b543 is described below

commit e32b543fd5807325c6bea635b4b88d036ca2ae1c
Author: Sam Ruby 
AuthorDate: Tue Oct 27 19:23:27 2020 -0400

fix broken link


https://lists.apache.org/thread.html/r16146aaf5f10c7ffbcc73b895dc4c0902ea63d631bc32e6340edec6d%40%3Cdev.whimsical.apache.org%3E
---
 www/committers/tools.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/committers/tools.cgi b/www/committers/tools.cgi
index 6518543..27c1a85 100755
--- a/www/committers/tools.cgi
+++ b/www/committers/tools.cgi
@@ -25,7 +25,7 @@ _html do
   title: PAGETITLE,
   related: {
 "https://projects.apache.org/; => "Apache Project Listing",
-"https://cwiki.apache.org/confluence/display/INFRA/Reference; => 
"Infra Reference Pages",
+"https://infra.apache.org/services.html; => "Infra Reference Pages",
 
"https://github.com/apache/whimsy/blob/master/www/committers/tools.cgi; => "See 
This Code",
 "mailto:d...@whimsical.apache.org?subject=[FEEDBACK] committers/tools 
idea" => "Email Feedback To dev@whimsical"
   },



[whimsy] branch master updated: safety checks

2020-10-24 Thread rubys
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 de9b1a7  safety checks
de9b1a7 is described below

commit de9b1a7151583358e82ced99154665c2200fb261
Author: Sam Ruby 
AuthorDate: Sat Oct 24 19:51:08 2020 -0400

safety checks
---
 www/board/agenda/daemon/session.rb | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/daemon/session.rb 
b/www/board/agenda/daemon/session.rb
index c415c4a..216e57d 100644
--- a/www/board/agenda/daemon/session.rb
+++ b/www/board/agenda/daemon/session.rb
@@ -87,9 +87,13 @@ class Session
 secret = File.basename(file)
 session = @@sessions[secret]
 
-if File.exist? file
+if File.exist?(file) and File.writable?(file)
   if File.mtime(file) < Time.now - 2 * DAY
-File.delete file
+begin
+  File.delete file
+rescue RuntimeError => error
+  STDERR.puts "Error deleting #{file}: #{error}"
+end
   else
 # update class variables if the file changed
 mtime = File.mtime(file)



[whimsy] branch master updated: typo, better default for port, try a different way to bypass certificate verification

2020-10-24 Thread rubys
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 eece912  typo, better default for port, try a different way to bypass 
certificate verification
eece912 is described below

commit eece9124d40a4f8fa86c0e2f1b2d3d536a0f2249
Author: Sam Ruby 
AuthorDate: Sat Oct 24 15:17:15 2020 -0400

typo, better default for port, try a different way to bypass certificate
verification
---
 www/board/agenda/daemon/wsc.rb | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/www/board/agenda/daemon/wsc.rb b/www/board/agenda/daemon/wsc.rb
index 5b49e73..b54e0a7 100644
--- a/www/board/agenda/daemon/wsc.rb
+++ b/www/board/agenda/daemon/wsc.rb
@@ -24,7 +24,7 @@ options.host = 'whimsy.local'
 options.path = '/board/agenda/websocket/'
 options.user = Etc.getlogin
 options.restart = false
-options.verfify = true
+options.verify = true
 
 opt_parser = OptionParser.new do |opts|
   opts.banner = "Usage: #{File.basename(__FILE__)} [options]"
@@ -60,8 +60,9 @@ end
 
 opt_parser.parse!(ARGV)
 
-options.port ||= (options.host.include?('whimsy') ? 80 : 34234)
 options.protocol ||= (options.host.include?('local') ? 'ws' : 'wss')
+options.port ||= 34234 if options.path=='/'
+options.port ||= (options.protocol == 'ws' ? 80 : 443)
 
 
 # Connect to WebSocket #
@@ -94,12 +95,13 @@ EM.run do
   path = File.expand_path('../session.json', options.path)
   request = Net::HTTP::Get.new(path)
   request.basic_auth options.user, password
-  ssl = {use_ssl: options.protocol == 'wss'}
 
-  response = Net::HTTP.start(options.host, options.port, ssl) do |http|
+  http = Net::HTTP.new(options.host, options.port)
+  if options.protocol == 'wss'
+http.use_ssl = true
 http.verify_mode = OpenSSL::SSL::VERIFY_NONE unless options.verify
-http.request(request)
   end
+  response = http.request(request)
 
   if Net::HTTPOK === response
 session = JSON.parse(response.body)['session']



[whimsy] branch master updated: oops, got that backwards

2020-10-24 Thread rubys
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 9bb2df5  oops, got that backwards
9bb2df5 is described below

commit 9bb2df560247d795240095954eb74e0fb4a948ae
Author: Sam Ruby 
AuthorDate: Sat Oct 24 15:03:20 2020 -0400

oops, got that backwards
---
 www/board/agenda/daemon/wsc.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/daemon/wsc.rb b/www/board/agenda/daemon/wsc.rb
index b3fd22e..5b49e73 100644
--- a/www/board/agenda/daemon/wsc.rb
+++ b/www/board/agenda/daemon/wsc.rb
@@ -97,7 +97,7 @@ EM.run do
   ssl = {use_ssl: options.protocol == 'wss'}
 
   response = Net::HTTP.start(options.host, options.port, ssl) do |http|
-http.verify_mode = OpenSSL::SSL::VERIFY_NONE if options.verify
+http.verify_mode = OpenSSL::SSL::VERIFY_NONE unless options.verify
 http.request(request)
   end
 



[whimsy] branch master updated: add a no-verify option

2020-10-24 Thread rubys
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 f9c54d4  add a no-verify option
f9c54d4 is described below

commit f9c54d4f46265ac7311a6360235396bdb1835628
Author: Sam Ruby 
AuthorDate: Sat Oct 24 15:00:41 2020 -0400

add a no-verify option
---
 www/board/agenda/daemon/wsc.rb | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/www/board/agenda/daemon/wsc.rb b/www/board/agenda/daemon/wsc.rb
index c7f09b7..b3fd22e 100644
--- a/www/board/agenda/daemon/wsc.rb
+++ b/www/board/agenda/daemon/wsc.rb
@@ -24,6 +24,7 @@ options.host = 'whimsy.local'
 options.path = '/board/agenda/websocket/'
 options.user = Etc.getlogin
 options.restart = false
+options.verfify = true
 
 opt_parser = OptionParser.new do |opts|
   opts.banner = "Usage: #{File.basename(__FILE__)} [options]"
@@ -44,6 +45,10 @@ opt_parser = OptionParser.new do |opts|
 options.protocol = 'wss'
   end
 
+  opts.on "--noverify", 'Bypass SSL certificate verification' do
+options.verify = false
+  end
+
   opts.on "--user USER", 'User to log in as' do |user|
 options.user = user
   end
@@ -92,6 +97,7 @@ EM.run do
   ssl = {use_ssl: options.protocol == 'wss'}
 
   response = Net::HTTP.start(options.host, options.port, ssl) do |http|
+http.verify_mode = OpenSSL::SSL::VERIFY_NONE if options.verify
 http.request(request)
   end
 



[whimsy] branch master updated: wsc: support remote authentication

2020-10-24 Thread rubys
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 aa1bde1  wsc: support remote authentication
aa1bde1 is described below

commit aa1bde1728cf4cbb490172fd2803a274f5fce9ff
Author: Sam Ruby 
AuthorDate: Sat Oct 24 14:37:58 2020 -0400

wsc: support remote authentication

* Change to websocket-client-simple as it is actively maintained
* Enable the specification of the path to the websocket/session
* If not running locally, fetch session using HTTP basic auth
---
 www/board/agenda/Gemfile   |  2 +-
 www/board/agenda/daemon/wsc.rb | 98 --
 www/board/agenda/main.rb   |  2 -
 3 files changed, 66 insertions(+), 36 deletions(-)

diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile
index 83cfa0a..f39f3f8 100644
--- a/www/board/agenda/Gemfile
+++ b/www/board/agenda/Gemfile
@@ -25,7 +25,7 @@ gem 'erubis'
 gem 'mustache'
 
 gem 'websocket-eventmachine-server'
-gem 'websocket-client-simple'
+gem 'websocket-eventmachine-client'
 gem 'concurrent-ruby'
 
 gem 'rubyXL'
diff --git a/www/board/agenda/daemon/wsc.rb b/www/board/agenda/daemon/wsc.rb
index 5cda25a..c7f09b7 100644
--- a/www/board/agenda/daemon/wsc.rb
+++ b/www/board/agenda/daemon/wsc.rb
@@ -1,29 +1,27 @@
 #!/usr/bin/env ruby
 
+# Web socket client:
+#  - securely connects and authenticates with the web socket
+#  - outputs the messages received
+
 $LOAD_PATH.unshift '/srv/whimsy/lib'
 
-require 'websocket-client-simple'
+require 'websocket-eventmachine-client'
 require 'optparse'
 require 'ostruct'
 require 'etc'
+require 'net/http'
+require 'json'
 
 require_relative './session'
 
-# monkey patch for https://github.com/shokai/websocket-client-simple/issues/24
-class WebSocket::Client::Simple::Client
-  def sleep(*args)
-close
-  end
-end
-
 
 # Parse argument list  #
 
 
 options = OpenStruct.new
-options.host = 'localhost'
-options.port = 34234
-options.protocol = 'ws'
+options.host = 'whimsy.local'
+options.path = '/board/agenda/websocket/'
 options.user = Etc.getlogin
 options.restart = false
 
@@ -34,10 +32,14 @@ opt_parser = OptionParser.new do |opts|
 options.host = host
   end
 
-  opts.on "-p", "--port PORT", 'Port to connect to' do |port|
+  opts.on "--port PORT", 'Port to connect to' do |port|
 options.port = port
   end
 
+  opts.on "--path PORT", 'Path to connect to' do |path|
+options.path = path
+  end
+
   opts.on "--secure", 'Use secure web sockets (wss)' do
 options.protocol = 'wss'
   end
@@ -53,38 +55,68 @@ end
 
 opt_parser.parse!(ARGV)
 
+options.port ||= (options.host.include?('whimsy') ? 80 : 34234)
+options.protocol ||= (options.host.include?('local') ? 'ws' : 'wss')
+
 
 # Connect to WebSocket #
 
 
-url ="#{options.protocol}://#{options.host}:#{options.port}"
-ws = WebSocket::Client::Simple.connect url
+EM.run do
+  url = "#{options.protocol}://#{options.host}:#{options.port}#{options.path}"
+  puts "coonnecting to #{url}..."
+  ws = WebSocket::EventMachine::Client.connect uri: url
 
-ws.on :message do |msg|
-  puts msg.data
-end
+  ws.onmessage do |msg, type|
+puts msg
+  end
+
+  ws.onopen do
+session = nil
+
+# see if there is a local session we can use
+if options.host.include? 'local'
+  Dir["#{Session::WORKDIR}/*"].find do |file|
+session = File.basename(file) if File.read(file) == options.user
+  end
+end
+
+# fetch remote session
+while not session
+  require 'io/console'
+  password = $stdin.getpass("password for #{options.user}: ")
 
-ws.on :open do
-  Dir["#{Session::WORKDIR}/*"].find do |file|
-if File.read(file) == options.user
+  path = File.expand_path('../session.json', options.path)
+  request = Net::HTTP::Get.new(path)
+  request.basic_auth options.user, password
+  ssl = {use_ssl: options.protocol == 'wss'}
+
+  response = Net::HTTP.start(options.host, options.port, ssl) do |http|
+http.request(request)
+  end
+
+  if Net::HTTPOK === response
+session = JSON.parse(response.body)['session']
+  else
+p response
+  end
+end
+
+if session
   if options.restart
-ws.send "session: #{File.basename(file)}\nrestart: true\n\n"
+ws.send "session: #{session}\nrestart: true\n\n"
   else

[whimsy] branch master updated: make showseen work again

2020-10-21 Thread rubys
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 36efddb  make showseen work again
36efddb is described below

commit 36efddba5603329bc33147df96434d0845e16acc
Author: Sam Ruby 
AuthorDate: Wed Oct 21 10:37:11 2020 -0400

make showseen work again
---
 www/board/agenda/views/buttons/showseen.js.rb | 2 +-
 www/board/agenda/views/pages/comments.js.rb   | 8 
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/buttons/showseen.js.rb 
b/www/board/agenda/views/buttons/showseen.js.rb
index 664dac5..db5c563 100644
--- a/www/board/agenda/views/buttons/showseen.js.rb
+++ b/www/board/agenda/views/buttons/showseen.js.rb
@@ -15,7 +15,7 @@ class ShowSeen < Vue
   end
 
   def click(event)
-Main.view.toggleseen()
+EventBus.emit :toggleseen
 self.changeLabel()
   end
 
diff --git a/www/board/agenda/views/pages/comments.js.rb 
b/www/board/agenda/views/pages/comments.js.rb
index 7f461b1..3533e6d 100644
--- a/www/board/agenda/views/pages/comments.js.rb
+++ b/www/board/agenda/views/pages/comments.js.rb
@@ -25,6 +25,14 @@ class Comments < Vue
 @showseen = false
   end
 
+  def mounted
+EventBus.on :toggleseen, self.toggleseen
+  end
+
+  def beforeDestroy()
+EventBus.off :toggleseen, self.toggleseen
+  end
+
   def toggleseen()
 @showseen = ! @showseen
   end



[whimsy] branch master updated: Partial fix for WHIMSY-347

2020-10-21 Thread rubys
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 0571587  Partial fix for WHIMSY-347
0571587 is described below

commit 05715879073ccc3e5453cba7f51af3d3481c1308
Author: Sam Ruby 
AuthorDate: Wed Oct 21 09:42:46 2020 -0400

Partial fix for WHIMSY-347

https://issues.apache.org/jira/browse/WHIMSY-347
---
 www/board/agenda/views/actions/markseen.json.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/views/actions/markseen.json.rb 
b/www/board/agenda/views/actions/markseen.json.rb
index 3270e9a..5976937 100644
--- a/www/board/agenda/views/actions/markseen.json.rb
+++ b/www/board/agenda/views/actions/markseen.json.rb
@@ -3,5 +3,5 @@
 #
 
 Pending.update(env.user, @agenda) do |pending|
-  pending['seen'] = @seen
+  pending['seen'] = @seen.to_h
 end



[whimsy] branch master updated: fix regression by avoiding broken versions of ruby2js

2020-10-07 Thread rubys
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 1800878  fix regression by avoiding broken versions of ruby2js
1800878 is described below

commit 1800878b2b1345c5ae02d2bd2c55289a05786cfe
Author: Sam Ruby 
AuthorDate: Wed Oct 7 13:57:03 2020 -0400

fix regression by avoiding broken versions of ruby2js
---
 www/board/agenda/Gemfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/board/agenda/Gemfile b/www/board/agenda/Gemfile
index 08b47fb..83cfa0a 100644
--- a/www/board/agenda/Gemfile
+++ b/www/board/agenda/Gemfile
@@ -14,7 +14,7 @@ end
 gem 'rake'
 wunderbar_version = File.read(File.expand_path("#{root}/wunderbar.version", 
__FILE__)).chomp
 gem 'wunderbar', wunderbar_version
-gem 'ruby2js', '>=3.3.1'
+gem 'ruby2js', '>=3.3.6'
 gem 'sinatra', '~> 2.0'
 gem 'nokogumbo'
 gem 'execjs'



[whimsy] branch master updated: upgrade to node 12

2020-10-01 Thread rubys
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 cb0526e  upgrade to node 12
cb0526e is described below

commit cb0526ef88c519fe9003da9d8a2cdd9e9748d4c9
Author: Sam Ruby 
AuthorDate: Thu Oct 1 19:34:54 2020 -0400

upgrade to node 12
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 75242cd..b83ea40 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,7 +31,7 @@ addons:
 
 # install recent Node.js
 before_install:
-  - nvm install 7
+  - nvm install 12
 
 # configure ASF LDAP
 sudo: required



[whimsy] branch master updated: upgrade to node 12

2020-10-01 Thread rubys
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 cb0526e  upgrade to node 12
cb0526e is described below

commit cb0526ef88c519fe9003da9d8a2cdd9e9748d4c9
Author: Sam Ruby 
AuthorDate: Thu Oct 1 19:34:54 2020 -0400

upgrade to node 12
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 75242cd..b83ea40 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,7 +31,7 @@ addons:
 
 # install recent Node.js
 before_install:
-  - nvm install 7
+  - nvm install 12
 
 # configure ASF LDAP
 sudo: required



[whimsy] branch master updated: upgrade to node 12

2020-10-01 Thread rubys
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 cb0526e  upgrade to node 12
cb0526e is described below

commit cb0526ef88c519fe9003da9d8a2cdd9e9748d4c9
Author: Sam Ruby 
AuthorDate: Thu Oct 1 19:34:54 2020 -0400

upgrade to node 12
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 75242cd..b83ea40 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,7 +31,7 @@ addons:
 
 # install recent Node.js
 before_install:
-  - nvm install 7
+  - nvm install 12
 
 # configure ASF LDAP
 sudo: required



[whimsy] branch master updated: upgrade to node 12

2020-10-01 Thread rubys
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 cb0526e  upgrade to node 12
cb0526e is described below

commit cb0526ef88c519fe9003da9d8a2cdd9e9748d4c9
Author: Sam Ruby 
AuthorDate: Thu Oct 1 19:34:54 2020 -0400

upgrade to node 12
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 75242cd..b83ea40 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,7 +31,7 @@ addons:
 
 # install recent Node.js
 before_install:
-  - nvm install 7
+  - nvm install 12
 
 # configure ASF LDAP
 sudo: required



[whimsy] branch master updated: upgrade to node 12

2020-10-01 Thread rubys
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 cb0526e  upgrade to node 12
cb0526e is described below

commit cb0526ef88c519fe9003da9d8a2cdd9e9748d4c9
Author: Sam Ruby 
AuthorDate: Thu Oct 1 19:34:54 2020 -0400

upgrade to node 12
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 75242cd..b83ea40 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,7 +31,7 @@ addons:
 
 # install recent Node.js
 before_install:
-  - nvm install 7
+  - nvm install 12
 
 # configure ASF LDAP
 sudo: required



[whimsy] branch master updated: possible fix for WHIMSY-338

2020-07-29 Thread rubys
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 ab3d53c  possible fix for WHIMSY-338
ab3d53c is described below

commit ab3d53cd9c77fdf7fe6860e8d6873b244e7d7901
Author: Sam Ruby 
AuthorDate: Wed Jul 29 17:54:42 2020 -0400

possible fix for WHIMSY-338
---
 www/secretary/workbench/views/actions/icla.json.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/secretary/workbench/views/actions/icla.json.rb 
b/www/secretary/workbench/views/actions/icla.json.rb
index c2a4057..7a02c0a 100644
--- a/www/secretary/workbench/views/actions/icla.json.rb
+++ b/www/secretary/workbench/views/actions/icla.json.rb
@@ -191,8 +191,8 @@ if @valid_user and @pmc and not @votelink.empty?
 
   rc = ASF::SVN.update(ASF::SVN.svnpath!('acreq', 'new-account-reqs.txt'),
 "#{@user} account request by #{env.user} for #{@pmc.name}",
-env, _, {diff: true}) do |input|
-  input +  + @acreq + "\n"
+env, _, {diff: true}) do |tmpdir, contents|
+  contents + @acreq + "\n"
   end
   raise RuntimeError.new("exit code: #{rc}") if rc != 0
 



[whimsy] branch master updated: possible fix for WHIMSY-338

2020-07-29 Thread rubys
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 ab3d53c  possible fix for WHIMSY-338
ab3d53c is described below

commit ab3d53cd9c77fdf7fe6860e8d6873b244e7d7901
Author: Sam Ruby 
AuthorDate: Wed Jul 29 17:54:42 2020 -0400

possible fix for WHIMSY-338
---
 www/secretary/workbench/views/actions/icla.json.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/secretary/workbench/views/actions/icla.json.rb 
b/www/secretary/workbench/views/actions/icla.json.rb
index c2a4057..7a02c0a 100644
--- a/www/secretary/workbench/views/actions/icla.json.rb
+++ b/www/secretary/workbench/views/actions/icla.json.rb
@@ -191,8 +191,8 @@ if @valid_user and @pmc and not @votelink.empty?
 
   rc = ASF::SVN.update(ASF::SVN.svnpath!('acreq', 'new-account-reqs.txt'),
 "#{@user} account request by #{env.user} for #{@pmc.name}",
-env, _, {diff: true}) do |input|
-  input +  + @acreq + "\n"
+env, _, {diff: true}) do |tmpdir, contents|
+  contents + @acreq + "\n"
   end
   raise RuntimeError.new("exit code: #{rc}") if rc != 0
 



[whimsy] branch master updated: extract depth before use

2020-07-25 Thread rubys
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 66470a6  extract depth before use
66470a6 is described below

commit 66470a63f066a1347a441b29f52a0da2294b7442
Author: Sam Ruby 
AuthorDate: Sat Jul 25 15:49:50 2020 -0400

extract depth before use
---
 Rakefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Rakefile b/Rakefile
index 81d385e..8023b15 100644
--- a/Rakefile
+++ b/Rakefile
@@ -330,6 +330,8 @@ namespace :git do
   system('git', 'reset', '--hard', "origin/#{branch || 'master'}")
 end
   else
+depth = description['depth']
+
 # fresh checkout
 if depth
   system('git', 'clone', '--depth', depth.to_s, (base + 
description['url']).to_s, name)



[whimsy] branch master updated (8c66840 -> 433b6bd)

2020-07-17 Thread rubys
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 8c66840  More possible tainted strings
 add 433b6bd  extend setup to include secretary workbench

No new revisions were added by this update.

Summary of changes:
 config/setupmymac| 2 ++
 www/secretary/workbench/Rakefile | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)



[whimsy] branch master updated: change agenda minuted adjournment time to UTC

2020-07-16 Thread rubys
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 1ced49f  change agenda minuted adjournment time to UTC
 new a1ef69d  Merge pull request #103 from royfielding/fielding-01
1ced49f is described below

commit 1ced49f0e4e650bc739555fd72818f04924d491b
Author: Roy T. Fielding 
AuthorDate: Thu Jul 16 15:40:47 2020 -0700

change agenda minuted adjournment time to UTC
---
 www/board/agenda/models/minutes.rb  | 10 ++
 www/board/agenda/spec/secretary_spec.rb |  2 +-
 www/board/agenda/test/data/board_minutes_2015_01_21.txt |  2 +-
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/www/board/agenda/models/minutes.rb 
b/www/board/agenda/models/minutes.rb
index c3ebf8e..d134b91 100755
--- a/www/board/agenda/models/minutes.rb
+++ b/www/board/agenda/models/minutes.rb
@@ -134,18 +134,12 @@ class Minutes
 if title =~ /Action Items/
   comments = notes.gsub(/\r\n/,"\n").gsub(/^/,'')
 elsif title == 'Adjournment'
-  if notes =~ /^1[01]:\d\d/
-comments = "\nAdjourned at #{notes} a.m. (Pacific)\n"
-  elsif notes =~ /^\d\d:\d\d/
-comments = "\nAdjourned at #{notes} p.m. (Pacific)\n"
-  else
-comments += "\n" + notes.to_s.reflow(4,68) + "\n"
-  end
+  comments = "\nAdjourned at #{notes} UTC\n"
 else
   comments += "\n" + notes.to_s.reflow(4,68) + "\n"
 end
   elsif title == 'Adjournment'
-comments = "\nAdjourned at ??:?? a.m. (Pacific)\n"
+comments = "\nAdjourned at ??:?? UTC\n"
   end
   [attach, title, comments]
 end
diff --git a/www/board/agenda/spec/secretary_spec.rb 
b/www/board/agenda/spec/secretary_spec.rb
index 0e9c0b1..9ffb344 100644
--- a/www/board/agenda/spec/secretary_spec.rb
+++ b/www/board/agenda/spec/secretary_spec.rb
@@ -83,7 +83,7 @@ feature 'report' do
   expect(draft).to include('@Sam: Is anyone on the PMC looking at the 
reminders?')
   expect(draft).to include('No report was submitted.')
   expect(draft).to include('was approved by Unanimous Vote of the 
directors present.')
-  expect(draft).to match(/Adjourned at \d+:\d\d [ap]\.m\. \(Pacific\)/)
+  expect(draft).to match(/Adjourned at \d+:\d\d UTC/)
 
   @agenda = 'board_agenda_2015_02_18.txt'
   @message = 'Draft minutes for 2015-02-18'
diff --git a/www/board/agenda/test/data/board_minutes_2015_01_21.txt 
b/www/board/agenda/test/data/board_minutes_2015_01_21.txt
index a549c20..df2ca9a 100644
--- a/www/board/agenda/test/data/board_minutes_2015_01_21.txt
+++ b/www/board/agenda/test/data/board_minutes_2015_01_21.txt
@@ -859,7 +859,7 @@
 
 13. Adjournment
 
-Adjourned at 11:34 a.m. (Pacific)
+Adjourned at 11:34 UTC
 
 
 ATTACHMENTS:



[whimsy] branch master updated: provide more helpful information when template is busted

2020-07-16 Thread rubys
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 ac6b728  provide more helpful information when template is busted
ac6b728 is described below

commit ac6b728123e866f660a673b50b0099c43beaccec
Author: Sam Ruby 
AuthorDate: Thu Jul 16 15:31:02 2020 -0400

provide more helpful information when template is busted
---
 lib/whimsy/asf/board.rb| 1 +
 www/board/agenda/routes.rb | 9 -
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/board.rb b/lib/whimsy/asf/board.rb
index d4bc5c7..90625a2 100644
--- a/lib/whimsy/asf/board.rb
+++ b/lib/whimsy/asf/board.rb
@@ -124,6 +124,7 @@ module ASF
 
   def for(pmc)
 chair = pmc.chair
+raise "no chair found for #{pmc.name}" if not chair
 
 if @directors.include? chair
   "#{chair.public_name}"
diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index d507c3d..4b49b0e 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -547,7 +547,14 @@ get '/new' do
   template = File.join(ASF::SVN['foundation_board'], 'templates', 
'board_agenda.erb')
   @disabled = dir("board_agenda_*.txt").
 include? @meeting.strftime("board_agenda_%Y_%m_%d.txt")
-  @agenda = Erubis::Eruby.new(IO.read(template)).result(binding)
+
+  begin
+@agenda = Erubis::Eruby.new(IO.read(template)).result(binding)
+  rescue => error
+status 500
+STDERR.puts error
+return "error in #{template} in: #{error}"
+  end
 
   @cssmtime = File.mtime('public/stylesheets/app.css').to_i
   _html :new



[whimsy] branch WHIMSY-334 created (now 56cb08b)

2020-07-14 Thread rubys
This is an automated email from the ASF dual-hosted git repository.

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


  at 56cb08b  don't process keystrokes if focus is in an INPUT or TEXTAREA

This branch includes the following new commits:

 new 56cb08b  don't process keystrokes if focus is in an INPUT or TEXTAREA

The 1 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.




[whimsy] branch master updated: explicitly iterate over worksheets

2020-07-13 Thread rubys
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 3ae12bd  explicitly iterate over worksheets
3ae12bd is described below

commit 3ae12bd539974a74a83495b4dc8851eb8fecd6a0
Author: Sam Ruby 
AuthorDate: Mon Jul 13 16:44:20 2020 -0400

explicitly iterate over worksheets
---
 www/board/agenda/views/actions/financials.json.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/views/actions/financials.json.rb 
b/www/board/agenda/views/actions/financials.json.rb
index 5d42b68..afdbb5f 100644
--- a/www/board/agenda/views/actions/financials.json.rb
+++ b/www/board/agenda/views/actions/financials.json.rb
@@ -15,7 +15,7 @@ require 'active_support/core_ext/numeric/conversions'
 # https://github.com/weshatheleopard/rubyXL/issues/235
 begin
   stdout, $stdout = $stdout, File.new("/dev/null", "w")
-  worksheet = RubyXL::Parser.parse_buffer(Base64.decode64(@spreadsheet))
+  workbook = RubyXL::Parser.parse_buffer(Base64.decode64(@spreadsheet))
 ensure
   $stdout = stdout
 end
@@ -23,7 +23,7 @@ end
 # extract data
 rows = []
 
-summary = worksheet.find do |sheet|
+summary = workbook.worksheets.find do |sheet|
   sheet.sheet_name.strip.downcase == 'board summary'
 end
 



[whimsy] branch master updated: simplify

2020-07-05 Thread rubys
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 08f34ae  simplify
08f34ae is described below

commit 08f34ae13647a0ec077d5bf6fb35daef7de5a6b1
Author: Sam Ruby 
AuthorDate: Sun Jul 5 17:01:04 2020 -0400

simplify
---
 tools/pubsub.rb | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/tools/pubsub.rb b/tools/pubsub.rb
index 6d4924f..eb144e9 100644
--- a/tools/pubsub.rb
+++ b/tools/pubsub.rb
@@ -232,14 +232,7 @@ end
 if restartable
   STDERR.puts 'restarting'
 
-  # reconstruct path to Ruby executable
-  require 'rbconfig'
-  ruby = File.join(
-RbConfig::CONFIG["bindir"],
-RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
-  )
-
   # relaunch script after a one second delay
   sleep 1
-  exec ruby, __FILE__, *ARGV 
+  exec RbConfig.ruby, __FILE__, *ARGV
 end



[whimsy] branch master updated: quick exit if puppet is not in path

2020-07-04 Thread rubys
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 843b00a  quick exit if puppet is not in path
843b00a is described below

commit 843b00aad0ae5a835a504643b9696f9bf01cd7c6
Author: Sam Ruby 
AuthorDate: Sat Jul 4 21:11:28 2020 -0400

quick exit if puppet is not in path
---
 tools/pubsub.rb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/tools/pubsub.rb b/tools/pubsub.rb
index 2bb7c24..d983583 100644
--- a/tools/pubsub.rb
+++ b/tools/pubsub.rb
@@ -70,6 +70,11 @@ end
 
 optionparser.parse!
 
+if options.puppet and `which puppet 2>/dev/null`.empty?
+  STDERR.puts 'puppet not found in path; exiting'
+  exit 1
+end
+
 #
 ### process management
 #



[whimsy] branch master updated: get icla path from server; only say href once

2020-07-04 Thread rubys
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 8f97901  get icla path from server; only say href once
8f97901 is described below

commit 8f979012532c34b82d885a3928797962a1020470
Author: Sam Ruby 
AuthorDate: Sat Jul 4 14:18:33 2020 -0400

get icla path from server; only say href once
---
 www/roster/views/iclaSearch.js.rb | 3 +--
 www/roster/views/iclas.html.rb| 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/www/roster/views/iclaSearch.js.rb 
b/www/roster/views/iclaSearch.js.rb
index 03b6650..281a712 100644
--- a/www/roster/views/iclaSearch.js.rb
+++ b/www/roster/views/iclaSearch.js.rb
@@ -90,8 +90,7 @@ class IclaSearch < Vue
 _tr do
   _td icla.name
   _td icla.mail
-  # Cannot use whimsy gem code here
-  _td { _a icla.claRef, href: href: 
"https://svn.apache.org/repos/private/documents/iclas/#{icla.iclaFile}; }
+  _td { _a icla.claRef, href: "#{@@iclapath}/#{icla.iclaFile}" 
}
 end
   end
 
diff --git a/www/roster/views/iclas.html.rb b/www/roster/views/iclas.html.rb
index e46089e..c5c7e61 100644
--- a/www/roster/views/iclas.html.rb
+++ b/www/roster/views/iclas.html.rb
@@ -15,7 +15,7 @@ _html do
 _div_.main!
 _script src: "app.js?#{appmtime}"
 _.render '#main' do
-  _IclaSearch
+  _IclaSearch iclapath: `ASF::SVN.svnpath!('iclas').inspect`
 end
   end
 end



  1   2   3   4   5   6   7   8   9   10   >