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 9b926fc Use shorthand id for accessing SVN
9b926fc is described below
commit 9b926fc3ecad5792fa9cc0287096204bda20fffd
Author: Sebb <[email protected]>
AuthorDate: Tue May 1 00:16:34 2018 +0100
Use shorthand id for accessing SVN
Also use File.join instead of '/'
---
lib/whimsy/asf/board.rb | 4 ++--
lib/whimsy/asf/committee.rb | 4 ++--
lib/whimsy/asf/icla.rb | 12 ++++++------
lib/whimsy/asf/mail.rb | 4 ++--
lib/whimsy/asf/member.rb | 12 ++++++------
lib/whimsy/asf/nominees.rb | 4 ++--
lib/whimsy/asf/orgchart.rb | 6 +++---
lib/whimsy/asf/podling.rb | 16 ++++++++--------
lib/whimsy/asf/site.rb | 6 +++---
lib/whimsy/asf/watch.rb | 4 ++--
tools/agenda_summary.rb | 2 +-
tools/iclasort.rb | 2 +-
tools/site-scan.rb | 4 ++--
www/roster/public_podlings.rb | 4 ++--
14 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/lib/whimsy/asf/board.rb b/lib/whimsy/asf/board.rb
index 7310220..7034ab4 100644
--- a/lib/whimsy/asf/board.rb
+++ b/lib/whimsy/asf/board.rb
@@ -15,8 +15,8 @@ module ASF
# list of board meeting times as listed in
# committers/board/calendar.txt
def self.calendar
- svn = ASF::SVN['private/committers/board']
- txt = File.read("#{svn}/calendar.txt")
+ svn = ASF::SVN['board']
+ txt = File.read(File.join(svn, 'calendar.txt'))
times = txt.scan(/^\s+\*\)\s(.*)/).flatten
times.map {|time| TIMEZONE.local_to_utc(Time.parse(time))}
end
diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 523bb37..03d50de 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -100,9 +100,9 @@ module ASF
parse_committee_info contents
else
- board = ASF::SVN.find('private/committers/board')
+ board = ASF::SVN.find('board')
return unless board
- file = "#{board}/committee-info.txt"
+ file = File.join(board, 'committee-info.txt')
return unless File.exist? file
if @committee_mtime and File.mtime(file) <= @committee_mtime
diff --git a/lib/whimsy/asf/icla.rb b/lib/whimsy/asf/icla.rb
index 0e1c114..6f752ce 100644
--- a/lib/whimsy/asf/icla.rb
+++ b/lib/whimsy/asf/icla.rb
@@ -32,10 +32,10 @@ module ASF
@@availids_reserved = nil
# location of a working copy of the officers directory in SVN
- OFFICERS = ASF::SVN.find('private/foundation/officers')
+ OFFICERS = ASF::SVN.find('officers')
# location of the iclas.txt file; may be <tt>nil</tt> if not found.
- SOURCE = OFFICERS ? "#{OFFICERS}/iclas.txt" : nil
+ SOURCE = OFFICERS ? File.join(OFFICERS, 'iclas.txt') : nil
# flush caches if source file changed
def self.refresh
@@ -175,8 +175,8 @@ module ASF
# list of reserved availids
def self.availids_reserved
return @@availids_reserved if @@availids_reserved
- archive = ASF::SVN['private/foundation/officers']
- reserved = File.read("#{archive}/reserved-ids.yml").scan(/^-
(\S+)/).flatten.uniq
+ archive = ASF::SVN['officers']
+ reserved = File.read(File.join(archive, 'reserved-ids.yml')).scan(/^-
(\S+)/).flatten.uniq
@@availids_reserved = reserved
end
@@ -218,8 +218,8 @@ module ASF
# but never submitted an ICLA (some of which are still ASF members or
# members of a PMC).
def self.search_archive_by_id(id)
- archive = ASF::SVN['private/foundation/officers/historic']
- name = JSON.parse(File.read("#{archive}/committers.json"))[id]
+ archive = ASF::SVN['officers_historic']
+ name = JSON.parse(File.read(File.join(archive, 'committers.json')))[id]
name = id if name and name.empty?
name
end
diff --git a/lib/whimsy/asf/mail.rb b/lib/whimsy/asf/mail.rb
index 350c119..b9289e7 100644
--- a/lib/whimsy/asf/mail.rb
+++ b/lib/whimsy/asf/mail.rb
@@ -42,7 +42,7 @@ module ASF
# Parse the .archives file to get the list names
def self._load_lists
- apmail_bin = ASF::SVN['infra/infrastructure/apmail/trunk/bin']
+ apmail_bin = ASF::SVN['apmail_bin']
file = File.join(apmail_bin, '.archives')
if not @lists or File.mtime(file) != @list_mtime
lists = Hash[File.read(file).scan(
@@ -66,7 +66,7 @@ module ASF
# list of mailing lists that aren't actively seeking new subscribers
def self.deprecated
- apmail_bin = ASF::SVN['infra/infrastructure/apmail/trunk/bin']
+ apmail_bin = ASF::SVN['apmail_bin']
YAML.load_file(File.join(apmail_bin, 'deprecated_mailing_lists.yml'))
end
diff --git a/lib/whimsy/asf/member.rb b/lib/whimsy/asf/member.rb
index 3f93ec6..e00762b 100644
--- a/lib/whimsy/asf/member.rb
+++ b/lib/whimsy/asf/member.rb
@@ -97,8 +97,8 @@ module ASF
# Return the Last Changed Date for <tt>members.txt</tt> in svn as
# a <tt>Time</tt> object.
def self.svn_change
- foundation = ASF::SVN['private/foundation']
- file = "#{foundation}/members.txt"
+ foundation = ASF::SVN['foundation']
+ file = File.join(foundation, 'members.txt')
return Time.parse(`svn info #{file}`[/Last Changed Date: (.*) \(/,
1]).gmtime
end
@@ -131,7 +131,7 @@ module ASF
# but rather to have a local copy that can be updated and used until
# the svn working copy catches up
def self.text
- foundation = ASF::SVN.find('private/foundation')
+ foundation = ASF::SVN.find('foundation')
return nil unless foundation
begin
@@ -140,9 +140,9 @@ module ASF
@@mtime = 0
end
- if File.mtime("#{foundation}/members.txt").to_i > @@mtime.to_i
- @@mtime = File.mtime("#{foundation}/members.txt")
- text = File.read("#{foundation}/members.txt")
+ if File.mtime(File.join(foundation, 'members.txt')).to_i > @@mtime.to_i
+ @@mtime = File.mtime(File.join(foundation, 'members.txt'))
+ text = File.read(File.join(foundation, 'members.txt'))
@@text = WeakRef.new(text)
end
diff --git a/lib/whimsy/asf/nominees.rb b/lib/whimsy/asf/nominees.rb
index bd81cb0..6b7cf12 100644
--- a/lib/whimsy/asf/nominees.rb
+++ b/lib/whimsy/asf/nominees.rb
@@ -12,8 +12,8 @@ module ASF
rescue
end
- meetings = ASF::SVN['private/foundation/Meetings']
- nominations =
Dir["#{meetings}/*/nominated-members.txt"].sort.last.untaint
+ meetings = ASF::SVN['Meetings']
+ nominations = Dir[File.join(meetings, '*',
'nominated-members.txt')].sort.last.untaint
nominations = File.read(nominations).split(/^\s*---+--\s*/)
nominations.shift(2)
diff --git a/lib/whimsy/asf/orgchart.rb b/lib/whimsy/asf/orgchart.rb
index 513bdf6..7577b60 100644
--- a/lib/whimsy/asf/orgchart.rb
+++ b/lib/whimsy/asf/orgchart.rb
@@ -12,9 +12,9 @@ module ASF # :nodoc:
# parse any changed YAML role files.
def self.load
- @@source ||= ASF::SVN['private/foundation/officers/personnel-duties']
+ @@source ||= ASF::SVN['personnel-duties']
@@source.untaint
- Dir["#{@@source}/*.txt"].each do |file|
+ Dir[File.join(@@source, '*.txt')].each do |file|
file.untaint # Since it's our own svn repo, trust it
name = file[/.*\/(.*?)\.txt/, 1]
next if @@duties[name] and @@duties[name]['mtime'] >
File.mtime(file).to_f
@@ -25,7 +25,7 @@ module ASF # :nodoc:
@@duties[name] = data
end
- file = "#{@@source}/README".untaint
+ file = File.join(@@source, 'README').untaint
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/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 493372a..bdfd200 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -137,14 +137,14 @@ module ASF
# list of all podlings, regardless of status
def self.list
- incubator_content = ASF::SVN['asf/incubator/public/trunk/content']
- podlings_xml = "#{incubator_content}/podlings.xml"
+ incubator_content = ASF::SVN['incubator-content']
+ podlings_xml = File.join(incubator_content, 'podlings.xml')
# see if there is a later version
cache = ASF::Config.get(:cache)
- if File.exist? "#{cache}/podlings.xml"
- if File.mtime("#{cache}/podlings.xml") > File.mtime(podlings_xml)
- podlings_xml = "#{cache}/podlings.xml"
+ if File.exist? File.join(cache, 'podlings.xml')
+ if File.mtime(File.join(cache, 'podlings.xml')) >
File.mtime(podlings_xml)
+ podlings_xml = File.join(cache, 'podlings.xml')
end
end
@@ -258,8 +258,8 @@ module ASF
def podlingStatus
# resource can contain '-'
@resource.untaint if @resource =~ /\A[-\w]+\z/
- incubator_content =
ASF::SVN['asf/incubator/public/trunk/content/podlings']
- resource_yml = "#{incubator_content}/#{@resource}.yml"
+ incubator_content = ASF::SVN['incubator-podlings']
+ resource_yml = File.join(incubator_content, "#{@resource}.yml")
if File.exist?(resource_yml)
rawYaml = Psych.load_file(resource_yml)
hash = { }
@@ -349,7 +349,7 @@ module ASF
# parse (and cache) names mentioned in podlingnamesearches
def self.namesearch
# cache JIRA response
- cache = "#{ASF::Config.get(:cache)}/pns.jira"
+ cache = File.join(ASF::Config.get(:cache), 'pns.jira')
if not File.exist?(cache) or File.mtime(cache) < Time.now - 300
query = 'https://issues.apache.org/jira/rest/api/2/search?' +
'maxResults=1000&' +
diff --git a/lib/whimsy/asf/site.rb b/lib/whimsy/asf/site.rb
index bc50017..869c4e4 100644
--- a/lib/whimsy/asf/site.rb
+++ b/lib/whimsy/asf/site.rb
@@ -55,10 +55,10 @@ module ASF
# a Hash of all sites. Keys are the committee names. Values are a hash
# with <tt>:link</tt>, and <tt>:text<tt> values.
def self.list
- templates = ASF::SVN['asf/infrastructure/site/trunk/content']
- file = "#{templates}/index.html"
+ templates = ASF::SVN['site-root']
+ file = File.join(templates, 'index.html')
if not File.exist?(file)
- Wunderbar.error "Unable to find 'infrastructure/site/trunk/content'"
+ Wunderbar.error "Unable to find
'infrastructure/site/trunk/content/index.html'"
return {}
end
return @@list if not @@list.empty? and File.mtime(file) == @@mtime
diff --git a/lib/whimsy/asf/watch.rb b/lib/whimsy/asf/watch.rb
index 337d8d1..c9ca771 100644
--- a/lib/whimsy/asf/watch.rb
+++ b/lib/whimsy/asf/watch.rb
@@ -8,8 +8,8 @@ module ASF
def self.member_watch_list
return @member_watch_list if @member_watch_list
- foundation = ASF::SVN['private/foundation']
- text = File.read "#{foundation}/potential-member-watch-list.txt"
+ foundation = ASF::SVN['foundation']
+ text = File.read File.join(foundation, 'potential-member-watch-list.txt')
nominations = text.scan(/^\s+\*\)\s+\w.*?\n\s*(?:---|\Z)/m)
diff --git a/tools/agenda_summary.rb b/tools/agenda_summary.rb
old mode 100644
new mode 100755
index 79ce240..f26b78f
--- a/tools/agenda_summary.rb
+++ b/tools/agenda_summary.rb
@@ -6,7 +6,7 @@ require 'whimsy/asf/agenda'
require 'json'
require 'set'
-BOARD = ASF::SVN['private/foundation/board']
+BOARD = ASF::SVN['foundation_board']
STATS_ROLLUP = 'stats'
# Create summary of statistics from 2007->up board minutes (includes private
data)
diff --git a/tools/iclasort.rb b/tools/iclasort.rb
index 11bcbab..6b2950d 100644
--- a/tools/iclasort.rb
+++ b/tools/iclasort.rb
@@ -1,7 +1,7 @@
$LOAD_PATH.unshift File.realpath(File.expand_path('../../lib', __FILE__))
require 'whimsy/asf'
-OFFICERS = ASF::SVN['private/foundation/officers']
+OFFICERS = ASF::SVN['officers']
Dir.chdir OFFICERS
diff --git a/tools/site-scan.rb b/tools/site-scan.rb
index 45946a1..7020228 100755
--- a/tools/site-scan.rb
+++ b/tools/site-scan.rb
@@ -22,7 +22,7 @@ end
#########################################################################
-IMAGE_DIR = ASF::SVN.find('asf/infrastructure/site/trunk/content/img')
+IMAGE_DIR = ASF::SVN.find('site-img')
def parse(id, site, name)
uri = URI.parse(site)
@@ -145,7 +145,7 @@ def parse(id, site, name)
# see if image has been uploaded
if IMAGE_DIR
- data[:image] = Dir["#{IMAGE_DIR}/#{id}.*"].
+ data[:image] = Dir[File.join(IMAGE_DIR, "#{id}.*")].
map {|path| File.basename(path)}.first
end
diff --git a/www/roster/public_podlings.rb b/www/roster/public_podlings.rb
index 809f0a2..d38af3d 100644
--- a/www/roster/public_podlings.rb
+++ b/www/roster/public_podlings.rb
@@ -70,8 +70,8 @@
require_relative 'public_json_common'
# figure out what to do to get svn updates, then uncomment this
-# incubatorContent = ASF::SVN.find('asf/incubator/public/trunk/content')
-# incubatorPodlings =
ASF::SVN.find('asf/incubator/public/trunk/content/podlings')
+# incubatorContent = ASF::SVN.find('incubator-content')
+# incubatorPodlings = ASF::SVN.find('incubator-podlings')
# ASF::SVN.updateSimple(incubatorContent);
# ASF::SVN.updateSimple(incubatorPodlings);
--
To stop receiving notification emails like this one, please contact
[email protected].