You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/08/05 01:31:48 UTC
[whimsy] branch master updated (396f735 -> 244d039)
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a change to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git.
from 396f735 cleanup
new e2fa702 better variable name
new 244d039 rough in commit from temporary directory
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
www/officers/acreq.cgi | 54 ++++++++++++++++++++++++++++----------------------
1 file changed, 30 insertions(+), 24 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].
[whimsy] 02/02: rough in commit from temporary directory
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
commit 244d03964d7ee5cb405d963f7c402a4c24503a7d
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu Aug 4 21:31:24 2016 -0400
rough in commit from temporary directory
(untested)
---
www/officers/acreq.cgi | 46 ++++++++++++++++++++++++++--------------------
1 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/www/officers/acreq.cgi b/www/officers/acreq.cgi
index dc4cdef..c031b50 100755
--- a/www/officers/acreq.cgi
+++ b/www/officers/acreq.cgi
@@ -20,6 +20,7 @@ require 'whimsy/asf/rack'
require 'mail'
require 'date'
require 'open3'
+require 'tmpdir'
user = ASF::Auth.decode(env = {})
unless user.asf_member? or ASF.pmc_chairs.include? user
@@ -316,27 +317,32 @@ _html do
end
unless tobe
- # Update the new-account-reqs file...
- File.open(REQUESTS, 'w') do |file|
- file.write("#{requests}#{line}\n")
- end
+ Dir.mktmpdir do |tmpdir|
+ # Checkout the ACREQ directory
+ `#{SVN} co #{ACREQ} #{tmpdir}`
+
+ # Update the new-account-reqs file...
+ File.open("#{tmpdir}/new-account-reqs.txt", 'a') do |file|
+ file.puts(line)
+ end
- # and commit the change ...
- command = "#{SVN} commit #{ACREQ}/new-account-reqs.txt -m " +
- "#{requestor} account request by #{user.id}".inspect
- _h2 'Commit messages'
- Open3.popen3(command) do |pin, pout, perr|
- [
- Thread.new do
- _p.stdout pout.readline.chomp until pout.eof?
- end,
- Thread.new do
- _p.stderr perr.readline.chomp until perr.eof?
- end,
- Thread.new do
- pin.close
- end
- ].each {|thread| thread.join}
+ # and commit the change ...
+ command = "#{SVN} commit #{tmpdir}/new-account-reqs.txt -m " +
+ "#{requestor} account request by #{user.id}".inspect
+ _h2 'Commit messages'
+ Open3.popen3(command) do |pin, pout, perr|
+ [
+ Thread.new do
+ _p.stdout pout.readline.chomp until pout.eof?
+ end,
+ Thread.new do
+ _p.stderr perr.readline.chomp until perr.eof?
+ end,
+ Thread.new do
+ pin.close
+ end
+ ].each {|thread| thread.join}
+ end
end
end
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.
[whimsy] 01/02: better variable name
Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
commit e2fa7028a39490c08051a005ba11a194614463ad
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu Aug 4 21:21:26 2016 -0400
better variable name
---
www/officers/acreq.cgi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/officers/acreq.cgi b/www/officers/acreq.cgi
index 98d0809..dc4cdef 100755
--- a/www/officers/acreq.cgi
+++ b/www/officers/acreq.cgi
@@ -47,7 +47,7 @@ APMAIL_BIN = ASF::SVN['infra/infrastructure/apmail/trunk/bin']
# get up to date data...
SVN = "/usr/bin/svn --username #{env.user} --password #{env.password}"
requests = `#{SVN} cat #{ACREQ}/new-account-reqs.txt`
-officers = `#{SVN} cat #{OFFICERS}/iclas.txt`
+iclas_txt = `#{SVN} cat #{OFFICERS}/iclas.txt`
# grab the current list of PMCs from ldap
pmcs = ASF::Committee.list.map(&:name).sort - NON_PMC_UNIX_GROUPS
@@ -61,9 +61,9 @@ query = CGI::parse ENV['QUERY_STRING']
iclas = Array(query['iclas']).last
email = Array(query['email']).last
if iclas == 'all'
- iclas = Hash[*officers.scan(/^notinavail:.*?:(.*?):(.*?):Signed CLA/).
+ iclas = Hash[*iclas_txt.scan(/^notinavail:.*?:(.*?):(.*?):Signed CLA/).
flatten.reverse]
-elsif iclas == '1' and email and officers =~ /^notinavail:.*?:(.*?):#{email}:/
+elsif iclas == '1' and email and iclas_txt =~ /^notinavail:.*?:(.*?):#{email}:/
iclas = {email => $1}
else
count = iclas ? iclas.to_i : 300 rescue 300
@@ -75,7 +75,7 @@ else
end
# grab the list of userids that have been assigned (for validation purposes)
-taken = officers.scan(/^(\w+?):/).flatten.sort.uniq
+taken = iclas_txt.scan(/^(\w+?):/).flatten.sort.uniq
# add the list of userids that are pending
taken += requests.scan(/^(\w.*?);/).flatten
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.