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 6fd8f6b7 Rename to clarify it is a boolean function
6fd8f6b7 is described below

commit 6fd8f6b792a6efb44ba64b10a1077e6624097bbf
Author: Sebb <[email protected]>
AuthorDate: Tue Apr 4 11:10:30 2023 +0100

    Rename to clarify it is a boolean function
---
 www/pods.cgi       |  2 +-
 www/site.cgi       |  2 +-
 www/site_or_pod.rb | 12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/www/pods.cgi b/www/pods.cgi
index ef2c6b7b..29c83734 100755
--- a/www/pods.cgi
+++ b/www/pods.cgi
@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 PAGETITLE = "Apache Podling Website Checks" # Wvisible:sites,brand
 
-def cgi_for_tlps
+def cgi_for_tlps?
   false
 end
 
diff --git a/www/site.cgi b/www/site.cgi
index c8f26937..be8974f4 100755
--- a/www/site.cgi
+++ b/www/site.cgi
@@ -1,7 +1,7 @@
 #!/usr/bin/env ruby
 PAGETITLE = "Apache Project Website Checks" # Wvisible:sites,brand
 
-def cgi_for_tlps
+def cgi_for_tlps?
   true
 end
 
diff --git a/www/site_or_pod.rb b/www/site_or_pod.rb
index f2535851..b9da4803 100644
--- a/www/site_or_pod.rb
+++ b/www/site_or_pod.rb
@@ -15,8 +15,8 @@ require 'time' # for httpdate
 require 'whimsy/sitestandards'
 
 # Gather and analyze scans for TLP websites
-sites, crawl_time = SiteStandards.get_sites(cgi_for_tlps)
-checks_performed = SiteStandards.get_checks(cgi_for_tlps)
+sites, crawl_time = SiteStandards.get_sites(cgi_for_tlps?)
+checks_performed = SiteStandards.get_checks(cgi_for_tlps?)
 analysis = SiteStandards.analyze(sites, checks_performed)
 
 # Allow CLI testing, e.g. "PATH_INFO=/ ruby www/site.cgi >test.json"
@@ -41,7 +41,7 @@ _html do
       .table td {font-size: smaller;}
     }
   end
-  if cgi_for_tlps
+  if cgi_for_tlps?
     other = "/pods/"
     other_text = "PPMC Podling Website Checker"
   else
@@ -60,7 +60,7 @@ _html do
         "mailto:[email protected]?subject=[SITE] Website Checker 
Question" => "Questions? Email Whimsy PMC"
       },
       helpblock: -> {
-        unless cgi_for_tlps
+        unless cgi_for_tlps?
           _div.bg_danger %{NOTE: most podlings may not pass these checks yet 
during incubation -
                            but they are expected to pass them before 
graduation.}
         end
@@ -78,7 +78,7 @@ _html do
           _ ', '
           _a 'validation checks details', href: 
"https://github.com/apache/whimsy/blob/master/lib/whimsy/sitewebsite.rb";
           _ ', and '
-          _a 'raw JSON data', href: 
"#{SiteStandards.get_url(false)}#{SiteStandards.get_filename(cgi_for_tlps)}"
+          _a 'raw JSON data', href: 
"#{SiteStandards.get_url(false)}#{SiteStandards.get_filename(cgi_for_tlps?)}"
           _ '.'
           _br
           _ "Last crawl time: #{crawl_time} over #{sites.size} websites."
@@ -86,7 +86,7 @@ _html do
       }
     ) do
       # Encapsulate data display (same for projects and podlings)
-      display_application(path_info, sites, analysis, checks_performed, 
cgi_for_tlps)
+      display_application(path_info, sites, analysis, checks_performed, 
cgi_for_tlps?)
     end
 
     _script %{

Reply via email to