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 363a2dc Use shorthand id for accessing SVN
363a2dc is described below
commit 363a2dcda0195490f5f71193bdb0fde22ece10a9
Author: Sebb <[email protected]>
AuthorDate: Tue May 1 00:34:24 2018 +0100
Use shorthand id for accessing SVN
Also use File.join instead of '/'
---
www/board/agenda/daemon/channel.rb | 2 +-
www/roster/main.rb | 6 +++---
www/roster/models/committer.rb | 4 ++--
www/roster/models/orgchart.rb | 6 +++---
www/secretary/workbench/server.rb | 12 ++++++------
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/www/board/agenda/daemon/channel.rb
b/www/board/agenda/daemon/channel.rb
index 5df9b7c..8441897 100644
--- a/www/board/agenda/daemon/channel.rb
+++ b/www/board/agenda/daemon/channel.rb
@@ -16,7 +16,7 @@ class Channel
@@sockets = Concurrent::Map.new
@@users = Concurrent::Map.new {|map,key| map[key]=[]}
- FOUNDATION_BOARD = ASF::SVN['private/foundation/board']
+ FOUNDATION_BOARD = ASF::SVN['foundation_board']
# add a new socket/userid pair
def self.add(ws, id)
diff --git a/www/roster/main.rb b/www/roster/main.rb
index 0ecac4d..8eca40a 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -33,7 +33,7 @@ helpers do
end
def appmtime
# TODO can this/should this be cached?
- Wunderbar::Asset.convert("#{settings.views}/app.js.rb").mtime.to_i
+ Wunderbar::Asset.convert(File.join(settings.views, 'app.js.rb')).mtime.to_i
end
end
@@ -201,8 +201,8 @@ end
# complete podling list
get '/podlings' do
- attic = ASF::SVN['asf/attic/site/xdocs/projects']
- @attic = Dir["#{attic}/*.xml"].map {|file| File.basename(file, '.xml')}
+ attic = ASF::SVN['attic-xdocs']
+ @attic = Dir[File.join(attic, '*.xml')].map {|file| File.basename(file,
'.xml')}
@committees = ASF::Committee.list.map(&:id)
@podlings = ASF::Podling.list
diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb
index c8029ac..aeced1a 100644
--- a/www/roster/models/committer.rb
+++ b/www/roster/models/committer.rb
@@ -112,7 +112,7 @@ class Committer
response[:forms] = {}
if person.icla and person.icla.claRef # Not all people have iclas
- iclas = ASF::SVN['private/documents/iclas']
+ iclas = ASF::SVN['iclas']
claRef = person.icla.claRef.untaint
if File.exist? File.join(iclas, claRef + '.pdf')
response[:forms][:icla] = claRef + '.pdf'
@@ -126,7 +126,7 @@ class Committer
member[:info] = person.members_txt
if person.icla # not all members have iclas
- apps = ASF::SVN['private/documents/member_apps']
+ apps = ASF::SVN['member_apps']
[
person.icla.legal_name,
person.icla.name,
diff --git a/www/roster/models/orgchart.rb b/www/roster/models/orgchart.rb
index 4ac0597..32416c2 100644
--- a/www/roster/models/orgchart.rb
+++ b/www/roster/models/orgchart.rb
@@ -3,9 +3,9 @@ class OrgChart
@@desc = {}
def self.load
- @@source ||= ASF::SVN['private/foundation/officers/personnel-duties']
+ @@source ||= ASF::SVN['personnel-duties']
- Dir["#{@@source}/*.txt"].each do |file|
+ Dir[File.join(@@source, '*.txt')].each do |file|
name = file[/.*\/(.*?)\.txt/, 1]
next if @@duties[name] and @@duties[name]['mtime'] >
File.mtime(file).to_f
data = Hash[*File.read(file).split(/^\[(.*)\]\n/)[1..-1].map(&:strip)]
@@ -15,7 +15,7 @@ class OrgChart
@@duties[name] = data
end
- file = "#{@@source}/README"
+ file = File.join(@@source, 'README')
unless @@desc['mtime'] and @@desc['mtime'] > File.mtime(file).to_f
data = Hash[*File.read(file).split(/^\[(.*)\]\n/)[1..-1].map(&:strip)]
if data['info'] then
diff --git a/www/secretary/workbench/server.rb
b/www/secretary/workbench/server.rb
index 34feb99..e84c369 100644
--- a/www/secretary/workbench/server.rb
+++ b/www/secretary/workbench/server.rb
@@ -53,7 +53,7 @@ get '/' do
redirect to('/') if env['REQUEST_URI'] == env['SCRIPT_NAME']
# determine latest month for which there are messages
- archives = Dir["#{ARCHIVE}/*.yml"].select {|name| name =~ %r{/\d{6}\.yml$}}
+ archives = Dir[File.join(ARCHIVE, '*.yml')].select {|name| name =~
%r{/\d{6}\.yml$}}
@mbox = archives.empty? ? nil : File.basename(archives.sort.last, '.yml')
@mbox = [Date.today.strftime('%Y%m'), @mbox].min if @mbox
@messages = Mailbox.new(@mbox).client_headers.select do |message|
@@ -61,7 +61,7 @@ get '/' do
end
@cssmtime = File.mtime('public/secmail.css').to_i
- @appmtime =
Wunderbar::Asset.convert("#{settings.views}/app.js.rb").mtime.to_i
+ @appmtime = Wunderbar::Asset.convert(File.join(settings.views,
'app.js.rb')).mtime.to_i
_html :index
end
@@ -148,7 +148,7 @@ get %r{/(\d{6})/(\w+)/_index_} do |month, hash|
@headers = message.headers.dup
@headers.delete :attachments
@cssmtime = File.mtime('public/secmail.css').to_i
- @appmtime =
Wunderbar::Asset.convert("#{settings.views}/app.js.rb").mtime.to_i
+ @appmtime = Wunderbar::Asset.convert(File.join(settings.views,
'app.js.rb')).mtime.to_i
@projects = (ASF::Podling.current+ASF::Committee.pmcs).map(&:name).sort
_html :parts
end
@@ -157,7 +157,7 @@ end
get %r{/(\d{6})/(\w+)/_body_} do |month, hash|
@message = Mailbox.new(month).find(hash)
@cssmtime = File.mtime('public/secmail.css').to_i
- @appmtime =
Wunderbar::Asset.convert("#{settings.views}/app.js.rb").mtime.to_i
+ @appmtime = Wunderbar::Asset.convert(File.join(settings.views,
'app.js.rb')).mtime.to_i
pass unless @message
_html :body
end
@@ -228,8 +228,8 @@ end
# redirect to an icla
get %r{/icla/(.*)} do |filename|
checkout = 'https://svn.apache.org/repos/private/documents/iclas'
- iclas = ASF::SVN['private/documents/iclas']
- file = Dir["#{iclas}/#{filename}", "#{iclas}/#{filename}.*"].first
+ iclas = ASF::SVN['iclas']
+ file = Dir[File.join(iclas, filename), File.join(iclas,
"#{filename}.*")].first
pass unless file
redirect to(checkout + '/' + File.basename(file))
end
--
To stop receiving notification emails like this one, please contact
[email protected].