[whimsy] branch master updated: Syntax error

2022-12-15 Thread sebb
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 d16e0eaa Syntax error
d16e0eaa is described below

commit d16e0eaabc06347c91479fd94963d67bbb0786c3
Author: Sebb 
AuthorDate: Thu Dec 15 17:08:19 2022 +

Syntax error
---
 www/members/mentor-update.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/members/mentor-update.cgi b/www/members/mentor-update.cgi
index 5e518731..629a7e26 100755
--- a/www/members/mentor-update.cgi
+++ b/www/members/mentor-update.cgi
@@ -138,7 +138,7 @@ def send_form(formdata: {})
 ASF::SVN.svn_('add', fn, _)
 message = "#{$USER} += mentoring volunteer (whimsy)"
   end
-  rc = ASF::SVN.svn_('commit', fn, _, {msg: message}.merge(credentials)]
+  rc = ASF::SVN.svn_('commit', fn, _, {msg: message}.merge(credentials))
 end
   end
 



[whimsy] branch master updated: SYntax

2022-03-23 Thread sebb
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 1862dcb  SYntax
1862dcb is described below

commit 1862dcb9fb9d193a5535e0662454ccb45c6d2140
Author: Sebb 
AuthorDate: Wed Mar 23 17:13:35 2022 +

SYntax

[skip ci]
---
 .github/workflows/unittestagenda.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/unittestagenda.yml 
b/.github/workflows/unittestagenda.yml
index 4362f49..e2fb751 100644
--- a/.github/workflows/unittestagenda.yml
+++ b/.github/workflows/unittestagenda.yml
@@ -22,7 +22,7 @@ jobs:
 sudo apt-get install libldap2-dev
 sudo apt-get install libsasl2-dev
 sudo apt-get install nodejs
-  if:  ${{ matrix.os }} != 'macos-latest'  
+  if:  matrix.os != 'macos-latest'  
 - uses: actions/setup-node@v2
   with:
 node-version: '14'


[whimsy] branch master updated: Syntax issue?

2022-03-23 Thread sebb
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 054fe3c  Syntax issue?
054fe3c is described below

commit 054fe3c049c95c21ff4888cc6fde6e058a151451
Author: Sebb 
AuthorDate: Wed Mar 23 13:37:12 2022 +

Syntax issue?
---
 .github/workflows/unittestlib.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/unittestlib.yml 
b/.github/workflows/unittestlib.yml
index 75f0f11..d582540 100644
--- a/.github/workflows/unittestlib.yml
+++ b/.github/workflows/unittestlib.yml
@@ -22,7 +22,7 @@ jobs:
   run: |
 sudo apt-get install libldap2-dev
 sudo apt-get install libsasl2-dev
-  if:  ${{ matrix.os }} != 'macos-latest'  
+  if:  matrix.os != 'macos-latest'  
 - uses: actions/checkout@v2
   with:
 persist-credentials: false


[whimsy] branch master updated: Syntax tidy up

2021-08-29 Thread sebb
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 1d72ec8  Syntax tidy up
1d72ec8 is described below

commit 1d72ec80f12d5bcad98c720f2e22a0a26ff507fb
Author: Sebb 
AuthorDate: Sun Aug 29 23:25:59 2021 +0100

Syntax tidy up
---
 tools/download_check.rb | 63 ++---
 1 file changed, 28 insertions(+), 35 deletions(-)

diff --git a/tools/download_check.rb b/tools/download_check.rb
index 0d0a6c2..54e7d60 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -34,7 +34,7 @@ $SHOW_LINKS = false
 $VERSION = nil
 
 # Check archives have hash and sig
-$vercheck = Hash.new() # key = archive name, value = array of [type, 
hash/sig...]
+$vercheck = {} # key = archive name, value = array of [type, hash/sig...]
 # collect versions for summary display
 $versions = Hash.new {|h1, k1| h1[k1] = Hash.new {|h2, k2| h2[k2] = Array.new} 
} # key = version, value = Hash, key = arch basename, value = array of 
[extensions]
 
@@ -50,12 +50,10 @@ def init
   if $NO_CHECK_LINKS
 $NOFOLLOW = true
 I "Will not check links"
+  elsif $ALWAYS_CHECK_LINKS
+I "Will check links even if download page has errors"
   else
-if $ALWAYS_CHECK_LINKS
-  I "Will check links even if download page has errors"
-else
-  I "Will check links if download page has no errors"
-end
+I "Will check links if download page has no errors"
   end
   I "Will %s archive.apache.org links in checks" % ($ARCHIVE_CHECK ? 'include' 
: 'not include')
 end
@@ -114,13 +112,13 @@ def displayHTML
   warns = tests(:W)
 
   if !fatals.empty?
-_h2_.bg_danger "The page at #@url failed our checks:"
+_h2_.bg_danger "The page at #{@url} failed our checks:"
   elsif !errors.empty?
-_h2_.bg_warning "The page at #@url has some problems:"
+_h2_.bg_warning "The page at #{@url} has some problems:"
   elsif !warns.empty?
-_h2_.bg_warning "The page at #@url has some minor issues"
+_h2_.bg_warning "The page at #{@url} has some minor issues"
   else
-_h2_.bg_success "The page at #@url looks OK, thanks for using this service"
+_h2_.bg_success "The page at #{@url} looks OK, thanks for using this 
service"
   end
 
   if @fails > 0
@@ -173,7 +171,6 @@ def fetch_url(url, method=:head, depth=0, 
followRedirects=true) # string input
   end
 end
 
-
 # Head an HTTP URL  => response
 def HEAD(url)
   puts ">> HEAD #{url}" if $VERBOSE
@@ -196,7 +193,7 @@ def check_head(path, severity = :E, log=true)
 code = (response.code || '?') rescue response.to_s
   end
   unless code == '200'
-test(severity, "HEAD #{path} - HTTP status: #{code}") unless severity == 
nil
+test(severity, "HEAD #{path} - HTTP status: #{code}") unless severity.nil?
 return nil
   end
   I "Checked HEAD #{path} - OK (#{code})" if log
@@ -208,7 +205,7 @@ def check_page(path, severity=:E, log=true, 
returnRes=false, followRedirects=tru
   response = GET(path, followRedirects)
   code = response.code || '?'
   unless code == '200' or (!followRedirects and code =~ /^3\d\d/)
-test(severity, "GET #{path} - HTTP status: #{code}") unless severity == nil
+test(severity, "GET #{path} - HTTP status: #{code}") unless severity.nil?
 return nil
   end
   I "Checked GET #{path} - OK (#{code})" if log
@@ -232,7 +229,7 @@ def check_hash_loc(h, tlp)
   tlpQE = "(?:tubemq|inlong)" if tlp == 'inlong' # renamed
   if h =~ 
%r{^(https?)://(?:(archive|www)\.)?apache\.org/dist/(?:incubator/)?#{tlpQE}/.*?([^/]+)\.(\w{3,6})$}
 WE "HTTPS! #{h}" unless $1 == 'https'
-return $2||'', $3, $4 # allow for no host before apache.org
+return $2 || '', $3, $4 # allow for no host before apache.org
   elsif h =~ 
%r{^(https?)://(downloads)\.apache\.org/(?:incubator/)?#{tlpQE}/.*?([^/]+)\.(\w{3,6})$}
 WE "HTTPS! #{h}" unless $1 == 'https'
 return $2, $3, $4
@@ -304,7 +301,7 @@ ALIASES = {
 # Need to be able to check if download is for a PMC or podling
 # parameter is the website URL
 # Also want to convert site to TLP
-URL2TLP = Hash.new # URL host to TLP conversion
+URL2TLP = {} # URL host to TLP conversion
 URL2TLP['jspwiki-wiki'] = 'jspwiki' # 
https://jspwiki-wiki.apache.org/Wiki.jsp?page=Downloads
 URL2TLP['xmlbeans'] = 'poi' # xmlbeans now being maintained by POI
 PMCS = Set.new # is this a TLP?
@@ -341,10 +338,10 @@ end
 
 def _checkDownloadPage(path, tlp, version)
   isTLP = PMCS.include? tlp
-  if version != ''
-I "Checking #{path} [#{tlp}] TLP #{isTLP} for version #{version} only ..."
-  else
+  if version == ''
 I "Checking #{path} [#{tlp}] TLP #{isTLP} ..."
+  else
+I "Checking #{path} [#{tlp}] TLP #{isTLP} for version #{version} only ..."
   end
 
   # check the main body
@@ -356,12 +353,10 @@ def _checkDownloadPage(path, tlp, version)
 
   if isTLP
 W "#{tlp} has Incubator 

[whimsy] branch master updated: Syntax error

2018-10-23 Thread sebb
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 6952c6c  Syntax error
6952c6c is described below

commit 6952c6cf7d5461ad5635984276def991918867c8
Author: Sebb 
AuthorDate: Wed Oct 24 02:11:21 2018 +0100

Syntax error
---
 www/secretary/workbench/views/actions/icla2.json.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/secretary/workbench/views/actions/icla2.json.rb 
b/www/secretary/workbench/views/actions/icla2.json.rb
index b9f4848..74ea240 100644
--- a/www/secretary/workbench/views/actions/icla2.json.rb
+++ b/www/secretary/workbench/views/actions/icla2.json.rb
@@ -106,7 +106,7 @@ end
 task "svn commit foundation/officers/iclas.txt" do
   icla = ASF::ICLA.find_by_id(@id) || ASF::ICLA.find_by_email(@oldemail)
   unless icla and icla.id == @id and icla.email == @oldemail
-raise ArgumentError("ICLA not found for #@id:#@oldemail")
+raise ArgumentError.new("ICLA not found for #@id:#@oldemail")
   end
 
   # construct line to be inserted