[whimsy] branch master updated: Detab
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 9187b9a Detab 9187b9a is described below commit 9187b9a00b4c899700502a920cfbd0bad0ece79d Author: Sebb AuthorDate: Tue Sep 22 20:11:05 2020 +0100 Detab --- lib/whimsy/asf/svn.rb | 2 +- tools/collate_minutes.rb| 10 +- tools/ponyapi.rb| 4 ++-- www/committers/config_info.cgi | 2 +- www/roster/models/committer.rb | 16 www/secretary/workbench/views/actions/icla2.json.rb | 6 +++--- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb index 3d1fba0..e0824e0 100644 --- a/lib/whimsy/asf/svn.rb +++ b/lib/whimsy/asf/svn.rb @@ -141,7 +141,7 @@ module ASF end # fetch a repository URL by name - abort if not found - # Includes aliases +# Includes aliases def self.svnurl!(name) entry = self.svnurl(name) unless entry diff --git a/tools/collate_minutes.rb b/tools/collate_minutes.rb index f4e2349..5a86751 100755 --- a/tools/collate_minutes.rb +++ b/tools/collate_minutes.rb @@ -488,10 +488,10 @@ seen={} (?=\n\s{3,5}\d?[0-9A-Z]\.\s|\z) # next section /mx).each do |attach,title,text| if title.include? "\n" and title.length > 120 - title = title.split("\n") - text = title[1..-1].join("\n") + "\n" + text - title = title[0] - end + title = title.split("\n") + text = title[1..-1].join("\n") + "\n" + text + title = title[0] +end report = OpenStruct.new report.title = title.gsub(/\s+/, ' ') @@ -516,7 +516,7 @@ seen={} report.attach = '.' + pmc end end - end +end pending[title] = report end diff --git a/tools/ponyapi.rb b/tools/ponyapi.rb index 5810ffa..889e30e 100755 --- a/tools/ponyapi.rb +++ b/tools/ponyapi.rb @@ -34,11 +34,11 @@ module PonyAPI # no real point sorting unless writing the file if sort_list if recurse_sort -lists.each do |k,v| +lists.each do |k, v| lists[k] = Hash[v.sort] end end - lists = Hash[lists.sort] + lists = Hash[lists.sort] end openfile(dir, 'lists.json') do |f| begin diff --git a/www/committers/config_info.cgi b/www/committers/config_info.cgi index 577f317..b841a9e 100755 --- a/www/committers/config_info.cgi +++ b/www/committers/config_info.cgi @@ -11,5 +11,5 @@ cfg = ASF::Config.instance_variable_get(:@config) cfg.each do |k,v| - puts "%s: %s" % [k,v] + puts "%s: %s" % [k,v] end \ No newline at end of file diff --git a/www/roster/models/committer.rb b/www/roster/models/committer.rb index d20f76b..e211915 100644 --- a/www/roster/models/committer.rb +++ b/www/roster/models/committer.rb @@ -221,16 +221,16 @@ class Committer end end - response[:pmcs] = [] - response[:nonpmcs] = [] +response[:pmcs] = [] +response[:nonpmcs] = [] - pmcs.each do |pmc| - response[:pmcs] << pmc.name if pmc.roster.include?(person.id) - response[:chairOf] << pmc.name if pmc.chairs.map{|ch| ch[:id]}.include?(person.id) - end - response[:pmcs].sort! +pmcs.each do |pmc| + response[:pmcs] << pmc.name if pmc.roster.include?(person.id) + response[:chairOf] << pmc.name if pmc.chairs.map{|ch| ch[:id]}.include?(person.id) +end +response[:pmcs].sort! - response[:nonPMCchairOf] = [] # use separate list to avoid missing pmc-chair warnings +response[:nonPMCchairOf] = [] # use separate list to avoid missing pmc-chair warnings nonpmcs = ASF::Committee.nonpmcs nonpmcs.each do |nonpmc| response[:nonpmcs] << nonpmc.name if nonpmc.roster.include?(person.id) diff --git a/www/secretary/workbench/views/actions/icla2.json.rb b/www/secretary/workbench/views/actions/icla2.json.rb index 3facafa..3ee713d 100644 --- a/www/secretary/workbench/views/actions/icla2.json.rb +++ b/www/secretary/workbench/views/actions/icla2.json.rb @@ -218,15 +218,15 @@ if @id != 'notinavail' ldap = ASF.init_ldap(true) ldap.bind("uid=#{env.user.untaint},ou=people,dc=apache,dc=org", - env.password.untaint) +env.password.untaint) ldap.modify person.dn, [ASF::Base.mod_replace('mail', @email.strip)] log = ["LDAP modify: #{ldap.err2string(ldap.err)} (#{ldap.err})"] if ldap.err == 0 - _transcript log +_transcript log else - _backtrace log +
[whimsy] branch master updated: Unused
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 ea293d1 Unused ea293d1 is described below commit ea293d157912d4e45ddc534eb65eb95a7c1be237 Author: Sebb AuthorDate: Tue Sep 22 19:42:43 2020 +0100 Unused --- lib/whimsy/asf/committee.rb | 6 +++--- www/board/agenda/views/sw.js.rb | 4 ++-- www/members/board-attend.cgi| 10 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb index 93613ec..b5415cc 100644 --- a/lib/whimsy/asf/committee.rb +++ b/lib/whimsy/asf/committee.rb @@ -62,7 +62,7 @@ module ASF # mapping of committee names to canonical names (generally from ldap) # See also www/roster/committee.cgi -@@aliases = Hash.new {|hash, name| name.downcase} +@@aliases = Hash.new { |_hash, name| name.downcase} @@aliases.merge! \ 'c++ standard library' => 'stdcxx', 'community development' => 'comdev', @@ -214,8 +214,8 @@ module ASF end # sort and concatenate committees - committees = committees.sort_by {|name, chair| name.downcase}. -map {|name, chair| "#{name.ljust(23)} #{chair}"}. + committees = committees.sort_by { |name, _chair| name.downcase }. +map { |name, chair| "#{name.ljust(23)} #{chair}" }. join("\n") # replace committee info in the section, and then replace the diff --git a/www/board/agenda/views/sw.js.rb b/www/board/agenda/views/sw.js.rb index 369fb70..415881d 100644 --- a/www/board/agenda/views/sw.js.rb +++ b/www/board/agenda/views/sw.js.rb @@ -114,7 +114,7 @@ def latest(event) end if match - match.clone().text().then do |before| + match.clone().text().then do fulfill(match) request = Request.new(match.url, cache: "no-store") @@ -185,7 +185,7 @@ def bootstrap(event, request) # bad response: use cache instead replyFromCache(true) end - }.catch {|failure| + }.catch { |_failure| # no response: use cache instead replyFromCache(true) } diff --git a/www/members/board-attend.cgi b/www/members/board-attend.cgi index 74ad4e3..92e0cd5 100755 --- a/www/members/board-attend.cgi +++ b/www/members/board-attend.cgi @@ -68,7 +68,7 @@ end # If JSON requested, simply return the data hash _json do - summaries, errors = summarize_all + summaries, _errors = summarize_all summaries end @@ -87,7 +87,7 @@ _html do ) do datums = JSON.parse(File.read(File.join(BOARD, 'scripts', 'board-attend.json'))) months = Set.new() -datums.each do |id, data| +datums.each do |_id, data| data.each_key do |m| months << m end @@ -121,7 +121,7 @@ _html do datums.each do | id, data | totp = 0.0 tota = 0.0 - data.each do |k,v| + data.each do |_k, v| totp += v['preapps'] if v.has_key?('preapps') tota += v['actions'] if v.has_key?('actions') end @@ -134,10 +134,10 @@ _html do end end _td do - _ data.select{|k,v| v['present']}.length + _ data.select{ |_k, v| v['present']}.length end _td do - _ data.select{|k,v| !v['present']}.length + _ data.reject{ |_k, v| v['present']}.length end _td do _span.text_muted "#{((totp / data.length)*100).round(0)}%"
[whimsy] branch master updated: Simplify: keys.each => each_key
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 49624af Simplify: keys.each => each_key 49624af is described below commit 49624af4d07031e792b283f12e3f6eaf948d024c Author: Sebb AuthorDate: Tue Sep 22 19:27:36 2020 +0100 Simplify: keys.each => each_key --- lib/whimsy/logparser.rb | 2 +- lib/whimsy/sitewebsite.rb| 6 +++--- tools/pubsub2rake.rb | 2 +- tools/site-scan.rb | 2 +- www/apmail/mods.cgi | 2 +- www/board/agenda/daemon/channel.rb | 2 +- www/board/agenda/views/actions/todos.json.rb | 2 +- www/events/talks.cgi | 2 +- www/members/board-attend.cgi | 2 +- www/test/secretary/workbench/email.rb| 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/whimsy/logparser.rb b/lib/whimsy/logparser.rb index 3c9cc62..515adee 100755 --- a/lib/whimsy/logparser.rb +++ b/lib/whimsy/logparser.rb @@ -95,7 +95,7 @@ module LogParser def collate_whimsy_access(logs, apphash = WHIMSY_APPS) remainder = logs apps = {} -apphash.keys.each do |a| +apphash.each_key do |a| apps[a] = Hash.new{|h,k| h[k] = [] } apps[a][RUSER] = Hash.new{|h,k| h[k] = 0 } apps[a][REFERER] = Hash.new{|h,k| h[k] = 0 } diff --git a/lib/whimsy/sitewebsite.rb b/lib/whimsy/sitewebsite.rb index 110b0b1..b8e4a5f 100644 --- a/lib/whimsy/sitewebsite.rb +++ b/lib/whimsy/sitewebsite.rb @@ -38,7 +38,7 @@ def display_project(project, links, analysis, checks, tlp = true) end end _tbody do -checks.keys.each do |col| +checks.each_key do |col| cls = SiteStandards.label(analysis, links, col, project) _tr do _td do @@ -163,7 +163,7 @@ def display_overview(sites, analysis, checks, tlp = true) _thead do _tr do _th! "#{tlp ? 'Project' : 'Podling'}", data_sort: 'string-ins' - checks.keys.each do |col| + checks.each_key do |col| _th! data_sort: 'string' do _a col.capitalize, href: "check/#{col}" _br @@ -186,7 +186,7 @@ def display_overview(sites, analysis, checks, tlp = true) _td do _a "#{links['display_name']}", href: "project/#{n}" end -checks.keys.each do |c| +checks.each_key do |c| cls = SiteStandards.label(analysis, links, c, n) _td '', class: cls, data_sort_value: sort_order[cls] end diff --git a/tools/pubsub2rake.rb b/tools/pubsub2rake.rb index d914922..e167f71 100755 --- a/tools/pubsub2rake.rb +++ b/tools/pubsub2rake.rb @@ -125,7 +125,7 @@ if $0 == __FILE__ watching = WATCH[path] watching.each do |svn_prefix, svn_alias, files| changed = event['commit']['changed'] -changed.keys.each do |ck| +changed.each_key do |ck| if ck.start_with? svn_prefix # file matches target path if files && files.size > 0 # but does it match exactly? files.each do |file| diff --git a/tools/site-scan.rb b/tools/site-scan.rb index 4d5e84d..3d02123 100755 --- a/tools/site-scan.rb +++ b/tools/site-scan.rb @@ -43,7 +43,7 @@ end # @see SiteStandards for definitions of what we should scan for (in general) def parse(id, site, name) data = {} - SiteStandards::COMMON_CHECKS.keys.each do |k| + SiteStandards::COMMON_CHECKS.each_key do |k| data[k.to_sym] = nil end data[:display_name] = name diff --git a/www/apmail/mods.cgi b/www/apmail/mods.cgi index 3dadb60..7b1e88e 100755 --- a/www/apmail/mods.cgi +++ b/www/apmail/mods.cgi @@ -100,7 +100,7 @@ _html do _h2_ "Mailing Lists - #{$1}" _ul do -mods[$1].keys.each do |list| +mods[$1].each_key do |list| _li! { _a list, href: "#{list}/" } end end diff --git a/www/board/agenda/daemon/channel.rb b/www/board/agenda/daemon/channel.rb index 6dbd294..52712d2 100644 --- a/www/board/agenda/daemon/channel.rb +++ b/www/board/agenda/daemon/channel.rb @@ -87,7 +87,7 @@ class Channel # close all open sockets def self.close_all -@@sockets.keys.each do |client| +@@sockets.each_key do |client| client.close end end diff --git a/www/board/agenda/views/actions/todos.json.rb b/www/board/agenda/views/actions/todos.json.rb index b948c70..98e236d 100644 --- a/www/board/agenda/views/actions/todos.json.rb +++ b/www/board/agenda/views/actions/todos.json.rb @@ -235,7 +235,7 @@ parsed_agenda.each do |item| next unless item[:attach] =~ /^7\w$/ if item['title'] =~ /^Change (.*?) Chair$/ and item['people'] pmc = ASF::Committee.find($1).id -item['people'].keys.each do |person| +
[whimsy] branch master updated: Simplify
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 b4d7264 Simplify b4d7264 is described below commit b4d7264a9ade24309b8c989e0a739b7cf929d49d Author: Sebb AuthorDate: Tue Sep 22 18:49:22 2020 +0100 Simplify --- lib/whimsy/asf/documents.rb | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/whimsy/asf/documents.rb b/lib/whimsy/asf/documents.rb index b82f5ea..cb46c34 100644 --- a/lib/whimsy/asf/documents.rb +++ b/lib/whimsy/asf/documents.rb @@ -143,11 +143,9 @@ module ASF # or # nil, nil if not found def self.findpath(person) - path = file = nil - file = self.find(person) - if file -path = self.svnpath!(file) - end + path = nil + file = find(person) + path = svnpath!(file) if file [path, file] end @@ -157,17 +155,20 @@ module ASF # return the file name or nil if the file is not in the directory def self.extractfilenamefrom(rooturl, fileurl) return nil unless fileurl + # does the root match the file url? index = fileurl.index(rooturl) - if (index == 0) -# root matches, return file name (end of fileurl) -fileurl[rooturl.length..-1] - end + return nil unless index.zero? + + # root matches, return file name (end of fileurl) + fileurl[rooturl.length..-1] end + # Extract the file name if it is in emeritus directory # nil if it is not in this directory def self.extractfilename(fileurl) return nil unless fileurl + root_url = ASF::SVN.svnurl(@base) + '/' extractfilenamefrom(root_url, fileurl) end
[whimsy] branch master updated: Unused checks
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 765f09e Unused checks 765f09e is described below commit 765f09e42445c4effbfc33008a51e8c35826cc3d Author: Sebb AuthorDate: Tue Sep 22 18:38:45 2020 +0100 Unused checks --- lib/whimsy/asf/documents.rb | 4 ++-- www/apmail/mods.cgi | 10 -- www/secretary/workbench/tasks.rb| 2 +- www/secretary/workbench/views/forms/icla2.js.rb | 7 --- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/whimsy/asf/documents.rb b/lib/whimsy/asf/documents.rb index fce8ae5..b82f5ea 100644 --- a/lib/whimsy/asf/documents.rb +++ b/lib/whimsy/asf/documents.rb @@ -155,13 +155,13 @@ module ASF # param rooturl the svn url of the directory # param fileurl the svn url of the complete file # return the file name or nil if the file is not in the directory -def self.extractfilenamefrom(rooturl,fileurl) +def self.extractfilenamefrom(rooturl, fileurl) return nil unless fileurl # does the root match the file url? index = fileurl.index(rooturl) if (index == 0) # root matches, return file name (end of fileurl) -filename = fileurl[rooturl.length..-1] +fileurl[rooturl.length..-1] end end # Extract the file name if it is in emeritus directory diff --git a/www/apmail/mods.cgi b/www/apmail/mods.cgi index ed13d90..3dadb60 100755 --- a/www/apmail/mods.cgi +++ b/www/apmail/mods.cgi @@ -68,8 +68,8 @@ _html do _h2 "ASF Mailing List moderators" emails = [] - mods.each do |domain, lists| -lists.each do |list, moderators| + mods.each do |_domain, lists| +lists.each do |_list, moderators| emails += moderators.map(&:downcase) end end @@ -99,7 +99,6 @@ _html do elsif ENV['PATH_INFO'] =~ %r{^/([-.\w]*apache\w*\.\w+)/$} _h2_ "Mailing Lists - #{$1}" - stem = "#{$1}-" _ul do mods[$1].keys.each do |list| _li! { _a list, href: "#{list}/" } @@ -108,9 +107,8 @@ _html do elsif ENV['PATH_INFO'] =~ %r{^/([-.\w]*apache\w*\.\w+)/([-\w]+)/$} - domain, list = $1, $2 - - dir = "/home/apmail/lists/#{domain}/#{list}" + domain = $1 + list = $2 if _.post? and @email.to_s.include? '@' if %w(sub unsub).include? @op diff --git a/www/secretary/workbench/tasks.rb b/www/secretary/workbench/tasks.rb index 05a5010..c190db8 100644 --- a/www/secretary/workbench/tasks.rb +++ b/www/secretary/workbench/tasks.rb @@ -125,7 +125,7 @@ class Wunderbar::JsonBuilder extras << ['propset', 'svn:mime-type', content_type, outpath] end else -name, file, content_type = dest.flatten +_name, file, content_type = dest.flatten outpath = ASF::SVN.svnpath!(docdir,"#{outfilename}#{outfileext}") # TODO does it matter that the revision is not known? if ASF::SVN.exist?(outpath, nil, env) diff --git a/www/secretary/workbench/views/forms/icla2.js.rb b/www/secretary/workbench/views/forms/icla2.js.rb index 4677af1..1980ee2 100644 --- a/www/secretary/workbench/views/forms/icla2.js.rb +++ b/www/secretary/workbench/views/forms/icla2.js.rb @@ -152,7 +152,8 @@ class ICLA2 < Vue # input requirements. def updated() # ICLA file form -valid = %w(pubname email).all? do |name| +# TODO: why not used? +_valid = %w(pubname email).all? do |name| document.querySelector("input[name=#{name}]").validity.valid end @@ -176,7 +177,7 @@ class ICLA2 < Vue end # handle ICLA form submission - def file(event) + def file(_event) setTimeout 0 do @submitted = true @filed = true @@ -184,7 +185,7 @@ class ICLA2 < Vue end # when tasks complete (or are aborted) reset form - def status_update(event) + def status_update(_event) @submitted = false @filed = false end
[whimsy] branch master updated: Document unused variables
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 d795398 Document unused variables d795398 is described below commit d795398e5f508a1309310bb61e3f6d3bbe01592d Author: Sebb AuthorDate: Tue Sep 22 18:14:42 2020 +0100 Document unused variables --- lib/whimsy/asf/agenda.rb | 2 +- tools/download_check.rb| 14 +++--- tools/mboxhdr2csv.rb | 12 ++-- tools/ponyapi.rb | 16 www/board/agenda/views/actions/publish.json.rb | 2 +- www/board/agenda/views/pages/adjournment.js.rb | 1 - www/events/other.cgi | 8 www/members/meeting-util.rb| 3 +-- www/members/non-participants.cgi | 10 +- www/members/proxy.cgi | 2 +- www/officers/acreq.cgi | 14 +++--- www/officers/surveys.cgi | 4 ++-- www/secretary/public-names.cgi | 10 +- www/secretary/workbench/views/parts.js.rb | 12 ++-- 14 files changed, 54 insertions(+), 56 deletions(-) diff --git a/lib/whimsy/asf/agenda.rb b/lib/whimsy/asf/agenda.rb index 1c3b3f3..dc53d3c 100644 --- a/lib/whimsy/asf/agenda.rb +++ b/lib/whimsy/asf/agenda.rb @@ -160,7 +160,7 @@ class ASF::Board::Agenda end # look for missing titles -@sections.each do |section, hash| +@sections.each do |_section, hash| hash['title'] ||= "UNKNOWN" if hash['title'] == "UNKNOWN" diff --git a/tools/download_check.rb b/tools/download_check.rb index 4070a9f..741fe4e 100755 --- a/tools/download_check.rb +++ b/tools/download_check.rb @@ -239,11 +239,11 @@ end def get_links(body) doc = Nokogiri::HTML(body) nodeset = doc.css('a[href]')# Get anchors w href attribute via css - links = nodeset.map {|node| + nodeset.map { |node| href = node.attribute("href").to_s text = node.text.gsub(/[[:space:]]+/,' ') [href,text] - }.select{|x,y| x =~ %r{^(https?:)?//} } + }.select{|x, _y| x =~ %r{^(https?:)?//} } end VERIFY_TEXT = [ @@ -356,7 +356,7 @@ def _checkDownloadPage(path, tlp, version) # https://www.apache.org/dist/httpcomponents/httpclient/KEYS expurl = "https://[downloads.|www.]apache.org/[dist/][incubator/]#{tlp}/KEYS" expurlre = %r{^https://((www\.)?apache\.org/dist|downloads\.apache\.org)/(incubator/)?#{tlp}/KEYS$} - keys = links.select{|h,v| h =~ expurlre} + keys = links.select{|h, _v| h =~ expurlre} if keys.size >= 1 keyurl = keys.first.first keytext = keys.first[1] @@ -367,7 +367,7 @@ def _checkDownloadPage(path, tlp, version) end check_head(keyurl,:E, "200", false, true) else -keys = links.select{|h,v| v.strip == 'KEYS' || v == 'KEYS file' || v == '[KEYS]'} +keys = links.select{|_h, v| v.strip == 'KEYS' || v == 'KEYS file' || v == '[KEYS]'} if keys.size >= 1 I 'Found KEYS link' keyurl = keys.first.first @@ -485,7 +485,7 @@ def _checkDownloadPage(path, tlp, version) links.each do |h,t| if h =~ %r{\.(asc|sha256|sha512)$} - host, stem, ext = check_hash_loc(h,tlp) + host, _stem, _ext = check_hash_loc(h,tlp) if host == 'archive' if $ARCHIVE_CHECK check_head(h, :E, "200", true, true) @@ -514,7 +514,7 @@ def _checkDownloadPage(path, tlp, version) next end name = $1 - ext = $2 + _ext = $2 if h =~ %r{https?://archive\.apache\.org/} unless $ARCHIVE_CHECK I "Ignoring archive artifact #{h}" @@ -539,7 +539,7 @@ def _checkDownloadPage(path, tlp, version) bdy = check_page(h, :E, "200", false) if bdy lks = get_links(bdy) - lks.each do |l,t| + lks.each do |l, _t| # Don't want to match archive server (closer.cgi defaults to it if file is not found) if l.end_with?(name) and l !~ %r{//archive\.apache\.org/} path = l diff --git a/tools/mboxhdr2csv.rb b/tools/mboxhdr2csv.rb index b824b6e..abefe87 100644 --- a/tools/mboxhdr2csv.rb +++ b/tools/mboxhdr2csv.rb @@ -173,7 +173,7 @@ module MailUtils if File.file?(cache_json) begin return JSON.parse(File.read(cache_json)) - rescue StandardError => e + rescue StandardError => _e # No-op: fall through to attempt to re-create cache end end @@ -212,14 +212,14 @@ module MailUtils emails[TOOLS].each do |mail| emails[TOOLCOUNT][mail[TOOLS]] += 1 end -emails[TOOLCOUNT] = emails[TOOLCOUNT].sort_by { |k,v| -v}.to_h +emails[TOOLCOUNT] = emails[TOOLCOUNT].sort_by { |_k, v| -v}.to_h emails[MAILS].sort_by! { |email| email[DATE] } emails[MAILCOUNT] = Hash.new
[whimsy] branch master updated: Trailing spaces
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 6aa7e09 Trailing spaces 6aa7e09 is described below commit 6aa7e09ad75d740320ac7e38c4fbc6bedbd7fbe7 Author: Sebb AuthorDate: Tue Sep 22 17:26:59 2020 +0100 Trailing spaces --- lib/whimsy/asf/agenda.rb | 2 +- lib/whimsy/asf/agenda/discussion.rb| 2 +- lib/whimsy/asf/board.rb| 2 +- lib/whimsy/asf/committee.rb| 12 - lib/whimsy/asf/documents.rb| 4 +-- lib/whimsy/asf/forms.rb| 2 +- lib/whimsy/asf/forms2.rb | 2 +- lib/whimsy/asf/git.rb | 2 +- lib/whimsy/asf/ldap.rb | 10 +++ lib/whimsy/asf/mail.rb | 4 +-- lib/whimsy/asf/mlist.rb| 10 +++ lib/whimsy/asf/nominees.rb | 2 +- lib/whimsy/asf/orgchart.rb | 12 - lib/whimsy/asf/podling.rb | 4 +-- lib/whimsy/asf/svn.rb | 31 +++--- lib/whimsy/asf/themes.rb | 14 +- lib/whimsy/asf/watch.rb| 2 +- lib/whimsy/cache.rb| 4 +-- lib/whimsy/logparser.rb| 22 +++ lib/whimsy/sitestandards.rb| 16 +-- tools/collate_minutes.rb | 2 +- tools/comdevtalks.rb | 4 +-- tools/download_check.rb| 16 +-- tools/mboxhdr2csv.rb | 8 +++--- tools/namemap.rb | 22 +++ tools/ponyapi.rb | 8 +++--- tools/ponypoop.rb | 14 +- tools/pubsub2rake.rb | 4 +-- tools/site-scan.rb | 4 +-- www/apmail/mods.cgi| 4 +-- www/board/agenda/models/agenda.rb | 2 +- www/board/agenda/models/minutes.rb | 2 +- www/board/agenda/routes.rb | 4 +-- www/board/agenda/views/actions/commit.json.rb | 2 +- www/board/agenda/views/actions/feedback.json.rb| 2 +- www/board/agenda/views/actions/post-data.json.rb | 4 +-- www/board/agenda/views/actions/publish.json.rb | 2 +- www/board/agenda/views/buttons/post.js.rb | 14 +- .../agenda/views/buttons/publish-minutes.js.rb | 2 +- www/board/agenda/views/layout/footer.js.rb | 2 +- www/board/agenda/views/layout/main.js.rb | 2 +- www/board/agenda/views/models/agenda.js.rb | 2 +- www/board/agenda/views/models/chat.js.rb | 2 +- www/board/agenda/views/pages/adjournment.js.rb | 2 +- www/board/agenda/views/pages/fy23.js.rb| 2 +- www/board/agenda/views/pages/report.js.rb | 2 +- www/board/agenda/views/pages/secrets.js.rb | 2 +- www/board/calendar.cgi | 4 +-- www/brand/list.cgi | 2 +- www/brand/replyedit.cgi| 2 +- www/brand/replylist.cgi| 2 +- www/brand/replyui.cgi | 4 +-- www/committers/index.cgi | 2 +- www/committers/subscribe.cgi | 16 +-- www/committers/tm-report.cgi | 8 +++--- www/events/other.cgi | 4 +-- www/fundraising/invoice.cgi| 4 +-- www/incubator/graduated.cgi| 2 +- www/incubator/signoff.cgi | 16 +-- www/members/archivers.cgi | 10 +++ www/members/attendance-xcheck.cgi | 2 +- www/members/inactive.cgi | 2 +- www/members/index.cgi | 2 +- www/members/meeting-util.rb| 6 ++--- www/members/meeting.cgi| 14 +- www/members/memberless-pmcs.cgi| 2 +- www/members/mentor-update.cgi | 14 +- www/members/namediff.cgi | 8 +++--- www/members/nominations.cgi| 2 +- www/members/non-participants.cgi | 14 +- www/members/proxy.cgi | 20 +++--- www/members/repo-use.cgi | 4 +-- www/members/security-subs.cgi
[whimsy] branch master updated: Simplify using block
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 ba592c2 Simplify using block ba592c2 is described below commit ba592c2a6baef65fce3274c754c950f7c0b1517a Author: Sebb AuthorDate: Tue Sep 22 17:07:56 2020 +0100 Simplify using block --- lib/whimsy/asf/svn.rb | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb index 621d01f..dbc6c35 100644 --- a/lib/whimsy/asf/svn.rb +++ b/lib/whimsy/asf/svn.rb @@ -604,10 +604,10 @@ module ASF dir.untaint basename.untaint end - - tmpdir = Dir.mktmpdir.untaint - begin + rc = 0 + Dir.mktmpdir do |tmpdir| + # create an empty checkout self.svn_('checkout', [self.getInfoItem(dir,'url'), tmpdir], _, {depth: 'empty', env: env}) @@ -635,7 +635,7 @@ module ASF contents = yield tmpdir, '' previous_contents = File.read(tmpfile) if File.file? tmpfile end - + # create/update the temporary copy if contents and not contents.empty? File.write tmpfile, contents @@ -664,8 +664,7 @@ module ASF unless rc == 0 && out && out.empty? raise "svn failure #{rc} #{path.inspect} #{out}" end - ensure -FileUtils.rm_rf tmpdir + end rc # return last status end