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: Check URI; show expected matches for warnings per site
Date Sun, 14 May 2017 15:56:24 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  a388406   Check URI; show expected matches for warnings per site
a388406 is described below

commit a388406ed3c786c0fcbc1f3383ed7d63425c154c
Author: Sebb <sebb@apache.org>
AuthorDate: Sun May 14 16:56:22 2017 +0100

    Check URI; show expected matches for warnings per site
---
 www/site.cgi | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/www/site.cgi b/www/site.cgi
index 890710e..4a7168f 100755
--- a/www/site.cgi
+++ b/www/site.cgi
@@ -17,10 +17,11 @@ require 'wunderbar/jquery/stupidtable'
 require 'net/http'
 
 PAGETITLE = 'Apache TLP Website Link Checks'
-cols = %w( events foundation license sponsorship security thanks copyright trademarks )
+cols = %w( uri events foundation license sponsorship security thanks copyright trademarks
)
 CHECKS = { 
+  'uri'         => %r{https?://[^.]+\.apache\.org},
   'copyright'   => %r{[Cc]opyright [^.]+ Apache Software Foundation}, # Do we need '[Tt]he
ASF'?
-  'foundation'   => %r{.},
+  'foundation'  => %r{.},
   # TODO more checks needed here, e.g. ASF registered and 3rd party marks
   'trademarks'  => %r{trademarks of [Tt]he Apache Software Foundation},
   'events'      => %r{apache.org/events/current-event},
@@ -116,9 +117,19 @@ _html do
         _table.table.table_striped do
           _tbody do
             cols.each do |col|
+              cls = label(analysis, links, col, project)
               _tr do
                 _td col.capitalize
-                _td links[col], class: label(analysis, links, col, project)
+                _td links[col], class: cls
+                _td do
+                  if cls == 'label-warning'
+                    _ '(Expected to match the regular expression: '
+                    _code CHECKS[col].inspect
+                    _ ')'
+                  else
+                    _ ''
+                  end
+                end
               end
             end
           end

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

Mime
View raw message