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 b53dbf0 Unnecessary interpolation
b53dbf0 is described below
commit b53dbf0abf8e8e1633715426d056a1f20ac704cb
Author: Sebb <[email protected]>
AuthorDate: Wed Oct 21 16:41:53 2020 +0100
Unnecessary interpolation
---
lib/whimsy/asf/board.rb | 2 +-
lib/whimsy/asf/forms.rb | 16 ++++----
lib/whimsy/asf/forms2.rb | 16 ++++----
lib/whimsy/asf/ldap.rb | 2 +-
lib/whimsy/asf/member.rb | 2 +-
lib/whimsy/asf/podling.rb | 2 +-
lib/whimsy/cache.rb | 2 +-
lib/whimsy/sitewebsite.rb | 6 +--
tools/mboxhdr2csv.rb | 4 +-
tools/ponypoop.rb | 4 +-
tools/proxyhelper.rb | 2 +-
tools/wwwdocs.rb | 10 ++---
www/board/agenda/views/actions/summary.json.rb | 2 +-
www/board/agenda/views/actions/todos.json.rb | 2 +-
www/committers/tm-report.cgi | 44 +++++++++++-----------
www/committers/tools.cgi | 10 ++---
www/events/past.cgi | 2 +-
www/events/talks.cgi | 10 ++---
www/fundraising/invoice.cgi | 2 +-
www/members/list-traffic.cgi | 12 +++---
www/members/logs.cgi | 2 +-
www/members/meeting.cgi | 2 +-
www/members/mentor-update.cgi | 26 ++++++-------
www/members/mentors.cgi | 4 +-
www/members/proxy.cgi | 2 +-
www/members/repo-use.cgi | 4 +-
www/members/watch.cgi | 2 +-
www/officers/coi.cgi | 10 ++---
www/officers/list-traffic.cgi | 6 +--
www/roster/views/actions/memstat.json.rb | 8 ++--
www/roster/views/duties.html.rb | 2 +-
www/roster/views/person/forms.js.rb | 12 +++---
www/secretary/iclaparser.rb | 2 +-
.../workbench/views/actions/grant.json.rb | 2 +-
www/secretary/workbench/views/index.js.rb | 4 +-
www/test/dataflow.cgi | 6 +--
www/test/example.cgi | 4 +-
37 files changed, 125 insertions(+), 125 deletions(-)
diff --git a/lib/whimsy/asf/board.rb b/lib/whimsy/asf/board.rb
index 95ef262..b5edef1 100644
--- a/lib/whimsy/asf/board.rb
+++ b/lib/whimsy/asf/board.rb
@@ -127,7 +127,7 @@ module ASF
raise "no chair found for #{pmc.name}" if not chair
if @directors.include? chair
- "#{chair.public_name}"
+ chair.public_name
else
"#{chair.public_name} / #{self.next}"
end
diff --git a/lib/whimsy/asf/forms.rb b/lib/whimsy/asf/forms.rb
index d8d853d..709e693 100644
--- a/lib/whimsy/asf/forms.rb
+++ b/lib/whimsy/asf/forms.rb
@@ -27,13 +27,13 @@ class Wunderbar::HtmlMarkup
def _whimsy_forms_iconlink(**args)
if args[:iconlink]
_div.input_group_btn do
- _a.btn.btn_default type: 'button', aria_label: "#{iconlabel}", href:
"#{args[:iconlink]}", target: 'whimsy_help' do
- _span.glyphicon class: "#{args[:icon]}", aria_label:
"#{args[:iconlabel]}"
+ _a.btn.btn_default type: 'button', aria_label: iconlabel, href:
args[:iconlink], target: 'whimsy_help' do
+ _span.glyphicon class: args[:icon], aria_label: args[:iconlabel]
end
end
elsif args[:icon]
_span.input_group_addon do
- _span.glyphicon class: "#{args[:icon]}", aria_label:
"#{args[:iconlabel]}"
+ _span.glyphicon class: args[:icon], aria_label: args[:iconlabel]
end
elsif ['radio', 'checkbox'].include?(args[:type])
# No-op: do not include blank addon for these controls
@@ -46,15 +46,15 @@ class Wunderbar::HtmlMarkup
# Note: passes :groupclass thru to input-group control for styling
def _whimsy_control_wrapper(**args)
_div.form_group do
- _label.control_label.col_sm_3 args[:label], for: "#{args[:name]}"
+ _label.control_label.col_sm_3 args[:label], for: args[:name]
_div.col_sm_9 do
_div! class: "input-group #{args[:groupclass]}" do
yield
_whimsy_forms_iconlink(args)
end
if args[:helptext]
- _span.help_block id: "#{args[:aria_describedby]}" do
- _markdown "#{args[:helptext]}"
+ _span.help_block id: args[:aria_describedby] do
+ _markdown args[:helptext]
end
end
end
@@ -109,7 +109,7 @@ class Wunderbar::HtmlMarkup
if ''.eql?(args[:placeholder])
_option '', value: '', selected: 'selected'
else
- _option "#{args[:placeholder]}", value: '', selected: 'selected',
disabled: 'disabled', hidden: 'hidden'
+ _option args[:placeholder], value: '', selected: 'selected',
disabled: 'disabled', hidden: 'hidden'
end
# Construct selectable list from values (first) then options
if args[:values].kind_of?(Array)
@@ -121,7 +121,7 @@ class Wunderbar::HtmlMarkup
_option disp, value: val, selected: true
end
elsif args[:values] # Fallback for simple case of single string value
- _option "#{args[:values]}", value: "#{args[:values]}", selected: true
+ _option args[:values], value: args[:values], selected: true
args[:values] = [args[:values]] # Ensure supports .include? for
options loop below
end
if args[:options].kind_of?(Array)
diff --git a/lib/whimsy/asf/forms2.rb b/lib/whimsy/asf/forms2.rb
index c0f6f3b..185e4f4 100644
--- a/lib/whimsy/asf/forms2.rb
+++ b/lib/whimsy/asf/forms2.rb
@@ -28,13 +28,13 @@ class Wunderbar::HtmlMarkup
def _whimsy_forms_iconlink(**args)
if args['iconlink']
_div.input_group_btn do
- _a.btn.btn_default type: 'button', aria_label: "#{iconlabel}", href:
"#{args['iconlink']}", target: 'whimsy_help' do
- _span.glyphicon class: "#{args['icon']}", aria_label:
"#{args['iconlabel']}"
+ _a.btn.btn_default type: 'button', aria_label: iconlabel, href:
args['iconlink'], target: 'whimsy_help' do
+ _span.glyphicon class: args['icon'], aria_label: args['iconlabel']
end
end
elsif args['icon']
_span.input_group_addon do
- _span.glyphicon class: "#{args['icon']}", aria_label:
"#{args['iconlabel']}"
+ _span.glyphicon class: args['icon'], aria_label: args['iconlabel']
end
end
end
@@ -42,15 +42,15 @@ class Wunderbar::HtmlMarkup
# Utility function for divs around form controls, including help
def _whimsy_control_wrapper(**args)
_div.form_group do
- _label.control_label.col_sm_3 args['label'], for: "#{args['name']}"
+ _label.control_label.col_sm_3 args['label'], for: args['name']
_div.col_sm_9 do
_div.input_group do
yield
_whimsy_forms_iconlink(args)
end
if args['helptext']
- _span.help_block id: "#{args['aria_describedby']}" do
- _markdown "#{args['helptext']}"
+ _span.help_block id: args['aria_describedby'] do
+ _markdown args['helptext']
end
end
end
@@ -104,7 +104,7 @@ class Wunderbar::HtmlMarkup
if ''.eql?(args['placeholder'])
_option '', value: '', selected: 'selected'
else
- _option "#{args['placeholder']}", value: '', selected: 'selected',
disabled: 'disabled', hidden: 'hidden'
+ _option args['placeholder'], value: '', selected: 'selected',
disabled: 'disabled', hidden: 'hidden'
end
# Construct selectable list from values (first) then options
if args['values'].kind_of?(Array)
@@ -116,7 +116,7 @@ class Wunderbar::HtmlMarkup
_option disp, value: val, selected: true
end
elsif args['values'] # Fallback for simple case of single string value
- _option "#{args['values']}", value: "#{args['values']}", selected:
true
+ _option args['values'], value: args['values'], selected: true
args['values'] = [args['values']] # Ensure supports .include? for
options loop below
end
if args['options'].kind_of?(Array)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index d627a95..944ad8d 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -315,7 +315,7 @@ module ASF
# Dummy command, used for logging purposes only
sname = %w(base one sub children)[scope] rescue scope
cmd = "ldapsearch -x -LLL -b #{base} -s #{sname} #{filter} " +
- "#{[attrs].flatten.join(' ')}"
+ [attrs].flatten.join(' ')
# try once per host, with a minimum of two tries
attempts_left = [ASF::LDAP.hosts.length, 2].max
diff --git a/lib/whimsy/asf/member.rb b/lib/whimsy/asf/member.rb
index 418ef41..4cb3770 100644
--- a/lib/whimsy/asf/member.rb
+++ b/lib/whimsy/asf/member.rb
@@ -210,7 +210,7 @@ module ASF
[
fullname, # will be prefixed by ' *) '
# Each line of address is indented
- ("#{address.gsub(/^/,' ').gsub(/\r/,'')}"),
+ (address.gsub(/^/,' ').gsub(/\r/,'')),
(" #{country}" unless country.empty?),
" Email: #{email}",
(" Tel: #{tele}" unless tele.empty?),
diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 6859c8c..3bd90a5 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -161,7 +161,7 @@ module ASF
@list = []
podlings = Nokogiri::XML(File.read(podlings_xml))
# check for errors as they adversely affect the generated output
- raise Exception.new("#{podlings.errors.inspect}") if
podlings.errors.size > 0
+ raise Exception.new(podlings.errors.inspect) if podlings.errors.size > 0
podlings.search('podling').map do |node|
@list << new(node)
end
diff --git a/lib/whimsy/cache.rb b/lib/whimsy/cache.rb
index 768b6bc..0c80e4a 100644
--- a/lib/whimsy/cache.rb
+++ b/lib/whimsy/cache.rb
@@ -161,7 +161,7 @@ class Cache
def makepath(uri)
name = Digest::MD5.hexdigest uri.to_s
- File.join @dir, "#{name}"
+ File.join @dir, name
end
end
diff --git a/lib/whimsy/sitewebsite.rb b/lib/whimsy/sitewebsite.rb
index b8e4a5f..48a4cde 100644
--- a/lib/whimsy/sitewebsite.rb
+++ b/lib/whimsy/sitewebsite.rb
@@ -110,7 +110,7 @@ def display_check(col, sites, analysis, checks, tlp = true)
_table.table.table_condensed.table_striped do
_thead do
_tr do
- _th! "#{tlp ? 'Project' : 'Podling'}", data_sort: 'string-ins'
+ _th! tlp ? 'Project' : 'Podling', data_sort: 'string-ins'
_th! data_sort: 'string' do
_ 'Check Results'
_br
@@ -162,7 +162,7 @@ def display_overview(sites, analysis, checks, tlp = true)
_table.table.table_condensed.table_striped do
_thead do
_tr do
- _th! "#{tlp ? 'Project' : 'Podling'}", data_sort: 'string-ins'
+ _th! tlp ? 'Project' : 'Podling', data_sort: 'string-ins'
checks.each_key do |col|
_th! data_sort: 'string' do
_a col.capitalize, href: "check/#{col}"
@@ -184,7 +184,7 @@ def display_overview(sites, analysis, checks, tlp = true)
sites.each do |n, links|
_tr do
_td do
- _a "#{links['display_name']}", href: "project/#{n}"
+ _a links['display_name'], href: "project/#{n}"
end
checks.each_key do |c|
cls = SiteStandards.label(analysis, links, c, n)
diff --git a/tools/mboxhdr2csv.rb b/tools/mboxhdr2csv.rb
index cd3bab5..61653f1 100644
--- a/tools/mboxhdr2csv.rb
+++ b/tools/mboxhdr2csv.rb
@@ -365,7 +365,7 @@ module MboxUtils
Dir["#{dir}/**/*#{ext}"].sort.each do |f|
mails, errs = mbox2stats(f)
File.open("#{f.chomp(ext)}.json", "w") do |fout|
- fout.puts JSON.pretty_generate(["#{VERSION}", mails, errs])
+ fout.puts JSON.pretty_generate([VERSION, mails, errs])
end
end
end
@@ -392,7 +392,7 @@ module MboxUtils
raise ArgumentError, "#{__method__} called with no valid mbox json files
in #{dir}" if jzons.length == 0
puts "#{__method__} processing #{jzons.length} mbox json files"
# Write out headers and the first array in new csv
- csvfile = File.join("#{dir}", outname)
+ csvfile = File.join(dir, outname)
csv = CSV.open(csvfile, "w", headers: %w( year month day weekday hour zone
listid who subject lines links committer messageid inreplyto ), write_headers:
true)
jzons.shift[0].each do |m|
csv << [ m['y'], m['m'], m['d'], m['w'], m['h'], m['z'], m['listid'],
m['who'], m['subject'], m['lines'], m['links'], m['committer'], m['messageid'],
m['inreplyto'] ]
diff --git a/tools/ponypoop.rb b/tools/ponypoop.rb
index e5eeccb..b027d8c 100755
--- a/tools/ponypoop.rb
+++ b/tools/ponypoop.rb
@@ -108,8 +108,8 @@ def run_analyze_stats(dir, list, subject_regex)
results = []
errors = []
subjects = []
- output = File.join("#{dir}", "output-#{list}")
- Dir[File.join("#{dir}", "#{list}*.json")].each do |fname|
+ output = File.join(dir, "output-#{list}")
+ Dir[File.join(dir, "#{list}*.json")].each do |fname|
subjects = analyze_stats(fname, results, subject_regex, errors)
if subjects
responses = subjects.select {|subj| subj =~ /Re:/i }.size
diff --git a/tools/proxyhelper.rb b/tools/proxyhelper.rb
index d0b353c..2740cc9 100644
--- a/tools/proxyhelper.rb
+++ b/tools/proxyhelper.rb
@@ -28,7 +28,7 @@ def reminder_lines(meeting =
File.basename(Dir[File.join(MEETINGS, '2*')].max))
if user.length == 1 # Copy to new array with their email instead of cn
reminders[user[0].mail[0]] = ["#{user[0].id.ljust(12)} | #{user[0].cn}"]
proxies.each do |l|
- reminders[user[0].mail[0]] << "#{l}"
+ reminders[user[0].mail[0]] << l
end
else
# "Bogus: ASF::Person.list(#{nam}) not found, skipped!"
diff --git a/tools/wwwdocs.rb b/tools/wwwdocs.rb
index 341b7b4..9bbdb3e 100755
--- a/tools/wwwdocs.rb
+++ b/tools/wwwdocs.rb
@@ -29,13 +29,13 @@ WHIMSY_CONF = File.join(HTTPD_SITES, '*-whimsy-vm-443.*')
def emit_authmap
_ul do
_li do
- _span.glyphicon :aria_hidden, :class => "#{AUTHPUBLIC}"
+ _span.glyphicon :aria_hidden, :class => AUTHPUBLIC
_ 'Publicly available'
end
AUTHMAP.each do |realm, style|
_li do
- _span.glyphicon.glyphicon_lock :aria_hidden, :class => "#{style}",
aria_label: "#{realm}"
- _ "#{realm}"
+ _span.glyphicon.glyphicon_lock :aria_hidden, :class => style,
aria_label: realm
+ _ realm
end
end
end
@@ -44,11 +44,11 @@ end
# Output a span with the auth level
def emit_auth_level(level)
if level
- _span :class => level, aria_label: "#{AUTHMAP.key(level)}" do
+ _span :class => level, aria_label: AUTHMAP.key(level) do
_span.glyphicon.glyphicon_lock :aria_hidden
end
else
- _span.glyphicon :aria_hidden, :class => "#{AUTHPUBLIC}"
+ _span.glyphicon :aria_hidden, :class => AUTHPUBLIC
end
end
diff --git a/www/board/agenda/views/actions/summary.json.rb
b/www/board/agenda/views/actions/summary.json.rb
index 3b07496..5f06a48 100644
--- a/www/board/agenda/views/actions/summary.json.rb
+++ b/www/board/agenda/views/actions/summary.json.rb
@@ -4,7 +4,7 @@ validate_board_file(@agenda)
# fetch minutes
@minutes = @agenda.sub('_agenda_', '_minutes_')
-minutes_file = File.join(AGENDA_WORK, "#{@minutes.sub('.txt', '.yml')}")
+minutes_file = File.join(AGENDA_WORK, @minutes.sub('.txt', '.yml'))
if File.exist? minutes_file
minutes = YAML.load_file(minutes_file) || {}
diff --git a/www/board/agenda/views/actions/todos.json.rb
b/www/board/agenda/views/actions/todos.json.rb
index 3c34042..af6fbf9 100644
--- a/www/board/agenda/views/actions/todos.json.rb
+++ b/www/board/agenda/views/actions/todos.json.rb
@@ -201,7 +201,7 @@ if (@change || @establish) and env.password
body "Dear new PMC chairs,\n\nCongratulations on your new role at " +
"Apache. I've changed your LDAP privileges to reflect your new " +
"status.\n\nPlease read this and update the foundation records:\n" +
- "#{ASF::SVN.svnpath!('officers', 'advice-for-new-pmc-chairs.txt')}" +
+ ASF::SVN.svnpath!('officers', 'advice-for-new-pmc-chairs.txt') +
"\n\nWarm regards,\n\n#{sender.public_name}"
end
diff --git a/www/committers/tm-report.cgi b/www/committers/tm-report.cgi
index 54faac0..f4eda2a 100755
--- a/www/committers/tm-report.cgi
+++ b/www/committers/tm-report.cgi
@@ -64,33 +64,33 @@ def emit_input(
tagname = 'textarea' if rows
aria_describedby = "#{name}_help" if helptext
_div.form_group do
- _label.control_label.col_sm_3 label, for: "#{name}"
+ _label.control_label.col_sm_3 label, for: name
_div.col_sm_9 do
_div.input_group do
if pattern
- _.tag! tagname, class: 'form-control', name: "#{name}", id:
"#{name}",
- type: "#{type}", pattern: "#{pattern}", placeholder:
"#{placeholder}", value: value,
- aria_describedby: "#{aria_describedby}", required: required,
readonly: readonly
+ _.tag! tagname, class: 'form-control', name: name, id: name,
+ type: type, pattern: pattern, placeholder: placeholder, value: value,
+ aria_describedby: aria_describedby, required: required, readonly:
readonly
else
- _.tag! tagname, class: 'form-control', name: "#{name}", id:
"#{name}",
- type: "#{type}", placeholder: "#{placeholder}", value: value,
- aria_describedby: "#{aria_describedby}", required: required,
readonly: readonly
+ _.tag! tagname, class: 'form-control', name: name, id: name,
+ type: type, placeholder: placeholder, value: value,
+ aria_describedby: aria_describedby, required: required, readonly:
readonly
end
if iconlink
_div.input_group_btn do
- _a.btn.btn_default type: 'button', aria_label: "#{iconlabel}",
href: "#{iconlink}", target: 'whimsy_help' do
- _span.glyphicon class: "#{icon}", aria_label: "#{iconlabel}"
+ _a.btn.btn_default type: 'button', aria_label: iconlabel, href:
iconlink, target: 'whimsy_help' do
+ _span.glyphicon class: icon, aria_label: iconlabel
end
end
elsif icon
_span.input_group_addon do
- _span.glyphicon class: "#{icon}", aria_label: "#{iconlabel}"
+ _span.glyphicon class: icon, aria_label: iconlabel
end
end
end
if helptext
- _span.help_block id: "#{aria_describedby}" do
- _ "#{helptext}"
+ _span.help_block id: aria_describedby do
+ _ helptext
end
end
end
@@ -139,7 +139,7 @@ def emit_form()
_select.form_control name: 'type', id: 'type', required: true do
_option value: ''
MISUSE_TYPES.each do |val, desc|
- _option "#{desc}", value: val
+ _option desc, value: val
end
end
end
@@ -150,7 +150,7 @@ def emit_form()
_select.form_control name: 'effect', id: 'effect' do
_option value: ''
MISUSE_EFFECT.each do |val, desc|
- _option "#{desc}", value: val
+ _option desc, value: val
end
end
end
@@ -174,7 +174,7 @@ def emit_form()
end
end
emit_input(label: 'Committer ID of Reporter', name: 'reporter',
readonly: true,
- value: "#{user.id}", icon: 'glyphicon-user', iconlabel: 'Committer ID')
+ value: user.id, icon: 'glyphicon-user', iconlabel: 'Committer ID')
emit_input(label: 'Committer Email of Reporter', name: 'reporteremail',
readonly: true,
value: "#{user.public_name} (whimsy) <#{user.id}@apache.org>", icon:
'glyphicon-user', iconlabel: 'Committer Email')
@@ -263,13 +263,13 @@ _html do
# Display data to the user, depending if we're GET (new form) or POST
(show results)
if _.post?
submission = {
- 'project' => "#{@project}",
- 'url' => "#{@url}",
- 'phrase' => "#{@phrase}",
- 'type' => "#{@type}",
- 'description' => "#{@description}",
- 'reporter' => "#{@reporter}",
- 'reporteremail' => "#{@reporteremail}"
+ 'project' => @project,
+ 'url' => @url,
+ 'phrase' => @phrase,
+ 'type' => @type,
+ 'description' => @description,
+ 'reporter' => @reporter,
+ 'reporteremail' => @reporteremail
}
if validate_form(formdata: submission)
send_form(formdata: submission)
diff --git a/www/committers/tools.cgi b/www/committers/tools.cgi
index 400153a..6518543 100755
--- a/www/committers/tools.cgi
+++ b/www/committers/tools.cgi
@@ -46,7 +46,7 @@ _html do
_ul.list_inline do
scan_by.sort.each do |cat, l|
_li do
- _a "#{cat.capitalize}", href: "##{cat}"
+ _a cat.capitalize, href: "##{cat}"
end
end
end
@@ -58,16 +58,16 @@ _html do
links.sort_by{|k,v| v}.each do |l, desc|
_li.list_group_item do
if 2 == desc.length
- _span.glyphicon :aria_hidden, class: "#{AUTHPUBLIC}"
+ _span.glyphicon :aria_hidden, class: AUTHPUBLIC
else
- _span class: desc[2], aria_label: "#{AUTHMAP.key(desc[2])}",
title: "#{AUTHMAP.key(desc[2])}" do
+ _span class: desc[2], aria_label: AUTHMAP.key(desc[2]), title:
AUTHMAP.key(desc[2]) do
_span.glyphicon.glyphicon_lock :aria_hidden
end
end
- _a "#{desc[0]}", href: l
+ _a desc[0], href: l
_ ' - '
_code! do
- _a "#{l}", href: l
+ _a l, href: l
end
end
end
diff --git a/www/events/past.cgi b/www/events/past.cgi
index 0a21ae7..d6344ce 100755
--- a/www/events/past.cgi
+++ b/www/events/past.cgi
@@ -48,7 +48,7 @@ _html do
if r[fn] then
_li do
_a! href: r[fn] do
- _span!.glyphicon class: "#{g[0]}"
+ _span!.glyphicon class: g[0]
_! ' ' + g[1]
end
end
diff --git a/www/events/talks.cgi b/www/events/talks.cgi
index c85688a..2afc0bc 100755
--- a/www/events/talks.cgi
+++ b/www/events/talks.cgi
@@ -41,7 +41,7 @@ def _talk(talk, submitters, parent, n)
_thead do
_tr do
_th do
- _ "#{submitter['name']}"
+ _ submitter['name']
end
end
end
@@ -57,7 +57,7 @@ def _talk(talk, submitters, parent, n)
if talk['slides']
_tr do
_td do
- _a! href: "#{talk['slides']}" do
+ _a! href: talk['slides'] do
_span!.glyphicon class: 'glyphicon-file'
_! ' Session Slides'
end
@@ -67,7 +67,7 @@ def _talk(talk, submitters, parent, n)
if talk['video']
_tr do
_td do
- _a! href: "#{talk['video']}" do
+ _a! href: talk['video'] do
_span!.glyphicon class: 'glyphicon-facetime-video'
_! ' Watch The Video'
end
@@ -81,7 +81,7 @@ def _talk(talk, submitters, parent, n)
_span.glyphicon class: 'glyphicon-user'
_ ' Speaker Bio'
end
- _ "#{submitter['bio']}"
+ _ submitter['bio']
end
end
end
@@ -124,7 +124,7 @@ _html do
_p do
_ 'All talks by topics: '
alltalks.each_key do | topic |
- _a "#{topic}", href: "##{topic}"
+ _a topic, href: "##{topic}"
_ ' | ' unless topic == alltalks.keys.last
end
end
diff --git a/www/fundraising/invoice.cgi b/www/fundraising/invoice.cgi
index e5c21f8..1018327 100755
--- a/www/fundraising/invoice.cgi
+++ b/www/fundraising/invoice.cgi
@@ -174,7 +174,7 @@ _html do
_tr do
_td 'Amount'
_td do
- _input name: 'total', value: "#{@total or '$ 0'}"
+ _input name: 'total', value: @total or '$ 0'
end
end
end
diff --git a/www/members/list-traffic.cgi b/www/members/list-traffic.cgi
index f6679e9..b0cb796 100755
--- a/www/members/list-traffic.cgi
+++ b/www/members/list-traffic.cgi
@@ -58,7 +58,7 @@ def display_monthly(months:, nondiscuss:, cohorts:)
months.sort.reverse.each do |month|
data = MailUtils.get_mails_month(mailroot: SRV_MAIL, yearmonth: month,
nondiscuss: nondiscuss)
next if data.empty?
- _h1 "#{LIST_ROOT}@ statistics for #{month} (total mails:
#{data[MailUtils::MAILS].length})", id: "#{month}"
+ _h1 "#{LIST_ROOT}@ statistics for #{month} (total mails:
#{data[MailUtils::MAILS].length})", id: month
_div.row do
_div.col_sm_6 do
_ul.list_group do
@@ -82,9 +82,9 @@ def display_monthly(months:, nondiscuss:, cohorts:)
data[MailUtils::MAILCOUNT].each do |name, num|
id = (name.match(/.+[(](\w+)/) || [])[1]
if cohorts['cohorts'].has_key?(id)
- _span! "#{name} (#{num}), ", class: "#{cohorts['cohorts'][id]}"
+ _span! "#{name} (#{num}), ", class: cohorts['cohorts'][id]
else
- _span! "#{name} (#{num}), ", class:
"#{cohorts['cohorts'][COHORT_STYLES['Non-member']]}"
+ _span! "#{name} (#{num}), ", class:
cohorts['cohorts'][COHORT_STYLES['Non-member']]
end
end
end
@@ -123,7 +123,7 @@ def display_weekly(months:, nondiscuss:)
end
senders[WEEK_TOTAL] = total
_ul.list_group do
- _li.list_group_item.active.list_group_item_info "Week #{week} Top
Senders (total mails: #{senders[WEEK_TOTAL]})", id: "#{week}"
+ _li.list_group_item.active.list_group_item_info "Week #{week} Top
Senders (total mails: #{senders[WEEK_TOTAL]})", id: week
ctr = 0
senders.sort_by {|k,v| -v}.to_h.each do |id, num|
next if /@@/ =~ id
@@ -153,7 +153,7 @@ _html do
related: {
"/members/index" => "More Member-Specific Tools",
"/officers/list-traffic" => "Board@ List Traffic",
- "#{ENV['SCRIPT_NAME']}" => "Members@ List Traffic By Month",
+ ENV['SCRIPT_NAME'] => "Members@ List Traffic By Month",
"#{ENV['SCRIPT_NAME']}?week" => "Members@ List Traffic By Week",
"https://github.com/apache/whimsy/blob/master/www#{ENV['SCRIPT_NAME']}" => "See
This Source Code"
},
@@ -172,7 +172,7 @@ _html do
_ 'For the All Senders column, Members are colorized by approximate
years of membership like so: '
_br
COHORT_STYLES.each do |name, style|
- _span "#{name}, ", class: "#{style}"
+ _span "#{name}, ", class: style
end
_ ' note that due to email address variations, some entries may be
incorrectly marked.'
end
diff --git a/www/members/logs.cgi b/www/members/logs.cgi
index f3cb95d..0716e76 100755
--- a/www/members/logs.cgi
+++ b/www/members/logs.cgi
@@ -70,7 +70,7 @@ def display_access()
apps.each_with_index do |(name, data), n|
itemtitle = LogParser::WHIMSY_APPS[name] ? LogParser::WHIMSY_APPS[name]
: 'All Other URLs'
itemtitle << " (#{data['remote_user'].sum{|k,v| v}})" if
data['remote_user']
- _whimsy_accordion_item(listid: listid, itemid: name, itemtitle:
"#{itemtitle}", n: n, itemclass: 'panel-info') do
+ _whimsy_accordion_item(listid: listid, itemid: name, itemtitle:
itemtitle, n: n, itemclass: 'panel-info') do
_table.table.table_hover.table_striped do
_thead_ do
_tr do
diff --git a/www/members/meeting.cgi b/www/members/meeting.cgi
index 368e34e..80159d5 100755
--- a/www/members/meeting.cgi
+++ b/www/members/meeting.cgi
@@ -125,7 +125,7 @@ _html do
end
_p do
_ 'Currently, we will need '
- _span.text_primary "#{attend_irc}"
+ _span.text_primary attend_irc
_ " Members attending the first half of the meeting on Tuesday and
respond to Roll Call to reach quorum and continue the meeting."
_ " Calculation: Total voting members: #{num_members}, with one
third for quorum: #{quorum_need}, minus previously submitted proxies:
#{num_proxies}"
end
diff --git a/www/members/mentor-update.cgi b/www/members/mentor-update.cgi
index ebad281..898b1fa 100755
--- a/www/members/mentor-update.cgi
+++ b/www/members/mentor-update.cgi
@@ -80,11 +80,11 @@ def emit_form(apacheid, mdata, button_help, uimap)
_div.form_group do
_label.col_sm_offset_3.col_sm_9.strong.text_left 'Temporarily Opt Out
From Any NEW Mentees'
- _label.control_label.col_sm_3 'Not Accepting New Mentees', for:
"#{MentorFormat::NOTAVAILABLE}"
+ _label.control_label.col_sm_3 'Not Accepting New Mentees', for:
MentorFormat::NOTAVAILABLE
_div.col_sm_9 do
_div.input_group do
- _label "#{MentorFormat::NOTAVAILABLE}" do
- args = { type: 'checkbox', id: "#{MentorFormat::NOTAVAILABLE}",
name: "#{MentorFormat::NOTAVAILABLE}", value: "#{MentorFormat::NOTAVAILABLE}" }
+ _label MentorFormat::NOTAVAILABLE do
+ args = { type: 'checkbox', id: MentorFormat::NOTAVAILABLE, name:
MentorFormat::NOTAVAILABLE, value: MentorFormat::NOTAVAILABLE }
args[:checked] = true if mdata[MentorFormat::NOTAVAILABLE]
_input ' Stop accepting NEW Mentees', args
end
@@ -216,21 +216,21 @@ _html do
# Display data to the user, depending if we're GET (existing mentor
record or just blank data) or POST (show SVN checkin results)
if _.post?
submission = {
- "timezone" => "#{@timezone}",
- "availability" => "#{@availability}",
- "contact" => "#{@contact}",
- "available" => "#{@available}",
- "mentoring" => "#{@mentoring}",
- "experience" => "#{@experience}",
- "pronouns" => "#{@pronouns}",
- "aboutme" => "#{@aboutme}",
- "homepage" => "#{@homepage}",
+ "timezone" => @timezone,
+ "availability" => @availability,
+ "contact" => @contact,
+ "available" => @available,
+ "mentoring" => @mentoring,
+ "experience" => @experience,
+ "pronouns" => @pronouns,
+ "aboutme" => @aboutme,
+ "homepage" => @homepage,
# Multiple select fields
"prefers" => _.params['prefers'],
"languages" => _.params['languages']
}
if @notavailable
- submission['notavailable'] = "#{@notavailable}"
+ submission['notavailable'] = @notavailable
end
if validate_form(formdata: submission)
if send_form(formdata: submission)
diff --git a/www/members/mentors.cgi b/www/members/mentors.cgi
index ea4f9b5..9ddb812 100755
--- a/www/members/mentors.cgi
+++ b/www/members/mentors.cgi
@@ -99,7 +99,7 @@ _html do
mentor.each do |k, v|
_tr do
_td!.text_right do
- _span.text_primary uimap.has_key?(k) ? "#{uimap[k][0]}"
: "#{k}"
+ _span.text_primary uimap.has_key?(k) ? uimap[k][0] : k
end
_td!.text_left do
v = v.join(', ') if v.kind_of?(Array)
@@ -142,7 +142,7 @@ _html do
errors.each do |apacheid, error |
_li do
_code "#{apacheid}.json"
- _ "#{error[MentorFormat::ERRORS]}"
+ _ error[MentorFormat::ERRORS]
end
end
end
diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index b0f5c00..340bb4f 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -49,7 +49,7 @@ def emit_instructions(today, cur_mtg_dir, meeting)
if num_members
_p do
_ 'Currently, we must have '
- _span.text_primary "#{attend_irc}"
+ _span.text_primary attend_irc
_ " Members attend the first half of the #{meeting} meeting and respond
to Roll Call to reach quorum and continue the meeting."
_ " Calculation: Total voting members: #{num_members}, with one third
for quorum: #{quorum_need}, minus previously submitted proxies: #{num_proxies}"
end
diff --git a/www/members/repo-use.cgi b/www/members/repo-use.cgi
index 1ffea8e..1ede86e 100755
--- a/www/members/repo-use.cgi
+++ b/www/members/repo-use.cgi
@@ -82,14 +82,14 @@ _html do
tool = []
tmp.each do |file, (privlines, publines, wwwauth, authrealm)|
[privlines, publines].flatten.each do |x|
- tool << "#{x}" if x.length > 0
+ tool << x if x.length > 0
end
end
_li!.list_group_item.active do
_ "#{app} (#{path})"
end
tool.uniq.sort.each do |itm|
- _li.list_group_item "#{itm}"
+ _li.list_group_item itm
end
end
end
diff --git a/www/members/watch.cgi b/www/members/watch.cgi
index d13a826..68a7731 100755
--- a/www/members/watch.cgi
+++ b/www/members/watch.cgi
@@ -242,7 +242,7 @@ _html do
if chair
minutes = Dir['../board/minutes/*'].find do |name|
File.basename(name).split('.').first.downcase.gsub(/[_\W]/,'') ==
- "#{chair.name.gsub(/\W/,'')}"
+ chair.name.gsub(/\W/,'')
end
search_string = "RESOLVED, that #{person.public_name}"
diff --git a/www/officers/coi.cgi b/www/officers/coi.cgi
index da79995..f8f39d8 100755
--- a/www/officers/coi.cgi
+++ b/www/officers/coi.cgi
@@ -78,8 +78,8 @@ def get_affirmed_template(name, timestamp)
template, err =
ASF::SVN.svn('cat', COI_CURRENT_TEMPLATE_URL, {user: $USER, password:
$PASSWORD})
raise RuntimeError.new("Failed to read current template.txt -- %s" % err)
unless template
- centered_name = "#{name}".center(60, '_')
- centered_date ="#{timestamp}".center(62, '_')
+ centered_name = name.center(60, '_')
+ centered_date = timestamp.center(62, '_')
filled_signature_block = signature_block
.gsub('Signed: __', ('Signed: ' + centered_name))
.gsub('Date: __' , ( 'Date: ' + centered_date))
@@ -138,8 +138,8 @@ _html do
end
_p
_p "You are signed in as #{USERNAME} (#{USERID}) at
#{current_timestamp}."
- _p {_ "You are ";_b "#{not_required_message}";_ " to affirm the
Conflict of Interest policy for this year."}
- _p {_ "You ";_b "#{have_affirmed_message}";_ "the Conflict of
Interest policy for this year."}
+ _p {_ "You are "; _b not_required_message; _ " to affirm the Conflict
of Interest policy for this year."}
+ _p {_ "You "; _b have_affirmed_message; _ "the Conflict of Interest
policy for this year."}
if USER_AFFIRMATION_FILE
_a "Your Conflict of Interest affirmation",
href: "#{COI_CURRENT_URL}/#{USER_AFFIRMATION_FILE}"
@@ -209,7 +209,7 @@ def emit_post(_)
mail = Mail.new do
to "#{USERNAME}<#{USERMAIL}>"
cc "[email protected]"
- from "#{USERMAIL}"
+ from USERMAIL
subject "Conflict of Interest affirmation from #{USERNAME}"
text_part do
body "
diff --git a/www/officers/list-traffic.cgi b/www/officers/list-traffic.cgi
index 8068b9c..c0afe05 100755
--- a/www/officers/list-traffic.cgi
+++ b/www/officers/list-traffic.cgi
@@ -32,7 +32,7 @@ def display_monthly(months:, nondiscuss:)
months.sort.reverse.each do |month|
data = MailUtils.get_mails_month(mailroot: SRV_MAIL, yearmonth: month,
nondiscuss: nondiscuss)
next if data.empty?
- _h1 "#{LIST_ROOT}@ statistics for #{month} (total mails:
#{data[MailUtils::MAILS].length + data[MailUtils::TOOLS].length})", id:
"#{month}"
+ _h1 "#{LIST_ROOT}@ statistics for #{month} (total mails:
#{data[MailUtils::MAILS].length + data[MailUtils::TOOLS].length})", id: month
_div.row do
_div.col_sm_6 do
_ul.list_group do
@@ -90,7 +90,7 @@ def display_weekly(months:, nondiscuss:)
end
senders[WEEK_TOTAL] = total
_ul.list_group do
- _li.list_group_item.active.list_group_item_info "Week #{week} Top
Senders (total mails: #{senders[WEEK_TOTAL]})", id: "#{week}"
+ _li.list_group_item.active.list_group_item_info "Week #{week} Top
Senders (total mails: #{senders[WEEK_TOTAL]})", id: week
ctr = 0
senders.sort_by {|k,v| -v}.to_h.each do |id, num|
next if /@@/ =~ id
@@ -121,7 +121,7 @@ _html do
"/board/agenda" => "Current Month Board Agenda",
"/board/minutes" => "Past Minutes, Categorized",
"https://www.apache.org/foundation/board/calendar.html" => "Past
Minutes, Dated",
- "#{ENV['SCRIPT_NAME']}" => "List Traffic By Month",
+ ENV['SCRIPT_NAME'] => "List Traffic By Month",
"#{ENV['SCRIPT_NAME']}?week" => "List Traffic By Week",
"https://github.com/apache/whimsy/blob/master/www#{ENV['SCRIPT_NAME']}" => "See
This Source Code"
},
diff --git a/www/roster/views/actions/memstat.json.rb
b/www/roster/views/actions/memstat.json.rb
index 193ccf4..eb73821 100644
--- a/www/roster/views/actions/memstat.json.rb
+++ b/www/roster/views/actions/memstat.json.rb
@@ -71,9 +71,9 @@ elsif @action == 'request_emeritus'
template, err =
ASF::SVN.svn('cat', ASF::SVN.svnpath!('foundation',
'emeritus-request.txt'), {env:env})
raise RuntimeError.new("Failed to read emeritus-request.txt: " + err) unless
template
- centered_id = "#{USERID}".center(55, '_')
- centered_name = "#{USERNAME}".center(55, '_')
- centered_date ="#{TIMESTAMP}".center(55, '_')
+ centered_id = USERID.center(55, '_')
+ centered_name = USERNAME.center(55, '_')
+ centered_date = TIMESTAMP.center(55, '_')
signed_request = template
.gsub('Apache id: _______________________________________________________',
('Apache id: ' + centered_id))
@@ -106,7 +106,7 @@ elsif @action == 'request_reinstatement'
mail = Mail.new do
to "[email protected]"
cc "#{USERNAME}<#{USERMAIL}>"
- from "#{USERMAIL}"
+ from USERMAIL
subject "Emeritus reinstatement request from #{USERNAME}"
text_part do
body "I respectfully request reinstatement to full membership in The
Apache Software Foundation.\n\nRegards,\n\n#{USERNAME}"
diff --git a/www/roster/views/duties.html.rb b/www/roster/views/duties.html.rb
index 13b6549..282d044 100644
--- a/www/roster/views/duties.html.rb
+++ b/www/roster/views/duties.html.rb
@@ -126,7 +126,7 @@ _html do
_h4.text_warning('See This Source File')
end
_li.list_group_item do
- txtnam = File.basename("#{env['REQUEST_URI']}")
+ txtnam = File.basename(env['REQUEST_URI'])
_a "foundation/officers/personnel-duties/#{txtnam}.txt", href:
ASF::SVN.svnpath!('personnel-duties', "#{txtnam}.txt")
end
end
diff --git a/www/roster/views/person/forms.js.rb
b/www/roster/views/person/forms.js.rb
index 7736119..36e0f45 100644
--- a/www/roster/views/person/forms.js.rb
+++ b/www/roster/views/person/forms.js.rb
@@ -19,7 +19,7 @@ class PersonForms < Vue
if link == '' # has ICLA bu no karma to view it
_ 'ICLA'
else
- _a 'ICLA', href: "#{link}"
+ _a 'ICLA', href: link
end
end
elsif form == 'member'
@@ -28,7 +28,7 @@ class PersonForms < Vue
_ 'Member App'
else
_a 'Member App',
- href: "#{link}"
+ href: link
end
end
elsif form == 'emeritus'
@@ -37,7 +37,7 @@ class PersonForms < Vue
_ 'Emeritus'
else
_a 'Emeritus',
- href: "#{link}"
+ href: link
end
end
elsif form == 'emeritus_request'
@@ -46,7 +46,7 @@ class PersonForms < Vue
_ 'Emeritus Request'
else
_a 'Emeritus Request',
- href: "#{link}"
+ href: link
end
emeritus_request_age = committer['emeritus_request_age']
if emeritus_request_age
@@ -60,7 +60,7 @@ class PersonForms < Vue
_ 'Emeritus Rescinded'
else
_a 'Emeritus Rescinded',
- href: "#{link}"
+ href: link
end
end
elsif form == 'emeritus_reinstated'
@@ -69,7 +69,7 @@ class PersonForms < Vue
_ 'Emeritus Reinstated'
else
_a 'Emeritus Reinstated',
- href: "#{link}"
+ href: link
end
end
else
diff --git a/www/secretary/iclaparser.rb b/www/secretary/iclaparser.rb
index 9d9b00b..3dfc0df 100644
--- a/www/secretary/iclaparser.rb
+++ b/www/secretary/iclaparser.rb
@@ -174,7 +174,7 @@ module ICLAParser
val = v[:V]
# This is a hack; should really find the font def and use that
if val
- debug["#{key}"] = v.inspect
+ debug[key] = v.inspect
if val.bytes[0..1] == [254,255]
val = val.encode('utf-8','utf-16').strip
else
diff --git a/www/secretary/workbench/views/actions/grant.json.rb
b/www/secretary/workbench/views/actions/grant.json.rb
index a4611ed..f1696bd 100644
--- a/www/secretary/workbench/views/actions/grant.json.rb
+++ b/www/secretary/workbench/views/actions/grant.json.rb
@@ -40,7 +40,7 @@ _personalize_email(env.user)
task "svn commit documents/grants/#@filename#{fileext} and update grants.txt"
do
# construct line to be inserted
- @grantlines = "#{@company.strip}" +
+ @grantlines = @company.strip +
"\n file: #{@filename}#{fileext}" +
"\n for: #{@description.strip.gsub(/\r?\n\s*/,"\n ")}"
diff --git a/www/secretary/workbench/views/index.js.rb
b/www/secretary/workbench/views/index.js.rb
index 0c350f6..153eb54 100644
--- a/www/secretary/workbench/views/index.js.rb
+++ b/www/secretary/workbench/views/index.js.rb
@@ -48,9 +48,9 @@ class Index < Vue
_tr row_options do
_td do
if[:emeritusReady, :emeritusPending].include? message.status
- _a time, href: "#{message.href}", title: message.time,
target: "_blank"
+ _a time, href: message.href, title: message.time, target:
"_blank"
else
- _a time, href: "#{message.href}", title: message.time
+ _a time, href: message.href, title: message.time
end
end
_td message.from
diff --git a/www/test/dataflow.cgi b/www/test/dataflow.cgi
index c0bfb09..d5c0e03 100755
--- a/www/test/dataflow.cgi
+++ b/www/test/dataflow.cgi
@@ -94,10 +94,10 @@ _html do
_br
if info['maintainer'] =~ %r{/} then
_span.text_muted 'Maintained by Whimsy PMC using script: '
- _a.text_muted "#{info['maintainer']}", href:
"#{GITWHIMSY}#{info['maintainer']}"
+ _a.text_muted info['maintainer'], href:
"#{GITWHIMSY}#{info['maintainer']}"
else
_span.text_muted 'Maintained by role/PMC: '
- _a.text_muted "#{info['maintainer']}", href:
"/foundation/orgchart/#{info['maintainer']}"
+ _a.text_muted info['maintainer'], href:
"/foundation/orgchart/#{info['maintainer']}"
end
_br
if info.key?('format') then
@@ -109,7 +109,7 @@ _html do
_ul do
info['sources'].each do |src|
_li do
- _a "#{src}", href: "##{src.gsub(/[#%\[\]\{\}\\"<>]/, '')}"
+ _a src, href: "##{src.gsub(/[#%\[\]\{\}\\"<>]/, '')}"
end
end
end
diff --git a/www/test/example.cgi b/www/test/example.cgi
index 9593fd8..6044d0c 100755
--- a/www/test/example.cgi
+++ b/www/test/example.cgi
@@ -33,7 +33,7 @@ talktitle = get_svn_data()
# Example of handling POST forms cleanly
def emit_form(title, prev_data)
- _whimsy_panel("#{title}", style: 'panel-success') do
+ _whimsy_panel(title, style: 'panel-success') do
_form.form_horizontal method: 'post' do
_div.form_group do
_label.col_sm_offset_3.col_sm_9.strong.text_left 'Example Form Section'
@@ -168,7 +168,7 @@ _html do
officers = get_public_data()
_div.panel_group id: accordionid, role: 'tablist', aria_multiselectable:
'true' do
officers['auth'].each_with_index do |(listname, rosters), n|
- _whimsy_accordion_item(listid: accordionid, itemid: listname,
itemtitle: "#{listname}", n: n, itemclass: 'panel-primary') do
+ _whimsy_accordion_item(listid: accordionid, itemid: listname,
itemtitle: listname, n: n, itemclass: 'panel-primary') do
_ul do
rosters['roster'].each do |usr|
_li usr