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 <[email protected]>
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