This is an automated email from the ASF dual-hosted git repository.
sebb 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 4eb1dac WHIMSY-319 proxies.cgi should extract volunteers from proxies
4eb1dac is described below
commit 4eb1dac5cddaf1ac16c411c63581aa843598b4ae
Author: Sebb <[email protected]>
AuthorDate: Sun Apr 12 11:47:53 2020 +0100
WHIMSY-319 proxies.cgi should extract volunteers from proxies
---
www/members/meeting-util.rb | 7 +++++++
www/members/proxy.cgi | 14 +-------------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/www/members/meeting-util.rb b/www/members/meeting-util.rb
index dca4a6a..20e6bcb 100644
--- a/www/members/meeting-util.rb
+++ b/www/members/meeting-util.rb
@@ -39,6 +39,13 @@ class MeetingUtil
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
+ volunteers = 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
diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index 4229fb7..3eec727 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -10,18 +10,6 @@ require 'date'
require 'tmpdir'
require_relative 'meeting-util'
-# TODO: Read in proxies between Volunteers: and Assignments: lines
-volunteers = [
- "Shane Curcuru (curcuru)",
- "Craig L Russell (clr)",
- "Jim Jagielski (jim)",
- "Greg Stein (gstein)",
- "Daniel Ruggeri (druggeri)",
- "Matt Sicker (mattsicker)",
- "Michael Brohl (mbrohl)",
- "Daniel Gruno (humbedooh)"
-]
-
# Emit basic instructions and details on quorum
def emit_instructions(today, cur_mtg_dir, meeting)
if today > meeting
@@ -292,7 +280,7 @@ _html do
}
) do
if _.get?
- emit_form(cur_mtg_dir, meeting, volunteers)
+ emit_form(cur_mtg_dir, meeting,
MeetingUtil::getVolunteers(cur_mtg_dir))
else # POST
emit_post(cur_mtg_dir, meeting)
end