whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Also strip before checking sponsorship
Date Tue, 25 Apr 2017 15:34:03 GMT
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  07d3455   Also strip before checking sponsorship
07d3455 is described below

commit 07d345537a2b9318a0e25a1cad8bfd780f2ad49d
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Apr 25 16:34:02 2017 +0100

    Also strip before checking sponsorship
---
 tools/site-check.rb | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tools/site-check.rb b/tools/site-check.rb
index a548c6e..7ca1b73 100755
--- a/tools/site-check.rb
+++ b/tools/site-check.rb
@@ -63,19 +63,21 @@ def parse(site, name)
       end
     end
 
-    if a.text.downcase.strip =~ /licenses?/ and a['href'].include? 'apache.org'
+    a_text = a.text.downcase.strip
+
+    if a_text =~ /licenses?/ and a['href'].include? 'apache.org'
       data[:license] = uri + a['href'].strip 
     end
 
-    if a.text.downcase.strip == 'thanks'
+    if a_text == 'thanks'
       data[:thanks] = uri + a['href'].strip 
     end
 
-    if a.text.downcase.strip == 'security'
+    if a_text == 'security'
       data[:security] = uri + a['href'].strip 
     end
 
-    if %w(sponsorship donate).concat(['sponsor apache']).include? a.text.downcase
+    if %w(sponsorship donate).concat(['sponsor apache']).include? a_text
       data[:sponsorship] = uri + a['href'].strip
     end
   end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message