You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2022/04/29 12:18:38 UTC
[whimsy] branch master updated: Add privacy check
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 28af1a52 Add privacy check
28af1a52 is described below
commit 28af1a526380ec193d27b9bb31ce31c746295733
Author: Sebb <se...@apache.org>
AuthorDate: Fri Apr 29 13:18:31 2022 +0100
Add privacy check
---
lib/whimsy/sitestandards.rb | 9 +++++++++
tools/site-scan.rb | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/lib/whimsy/sitestandards.rb b/lib/whimsy/sitestandards.rb
index 0f97d32c..769b5c82 100644
--- a/lib/whimsy/sitestandards.rb
+++ b/lib/whimsy/sitestandards.rb
@@ -110,6 +110,15 @@ module SiteStandards
CHECK_DOC => 'All website content SHOULD include a copyright notice for the ASF.',
},
+ 'privacy' => { # link_check
+ CHECK_TEXT => %r{Privacy Policy}i,
+ CHECK_CAPTURE => %r{(Privacy)}i,
+ CHECK_VALIDATE => %r{\Ahttps://privacy.apache.org/policies/privacy-policy-public.html\z}i,
+ CHECK_TYPE => true,
+ CHECK_POLICY => 'https://lists.apache.org/thread/bz0lv2wlh90t58n73wr85qoof7vdvdxt',
+ CHECK_DOC => 'All websites must link to the Privacy Policy.',
+ },
+
'image' => { # Custom: merely looks in IMAGE_DIR for #{id}.*
CHECK_TEXT => nil,
CHECK_CAPTURE => nil,
diff --git a/tools/site-scan.rb b/tools/site-scan.rb
index 4aa8063a..7e76cd51 100755
--- a/tools/site-scan.rb
+++ b/tools/site-scan.rb
@@ -108,7 +108,7 @@ def parse(id, site, name)
end
end
- %w(thanks security sponsorship).each do |check|
+ %w(thanks security sponsorship privacy).each do |check|
if a_text =~ SiteStandards::COMMON_CHECKS[check][SiteStandards::CHECK_CAPTURE]
begin
data[check.to_sym] = uri + a_href
@@ -157,7 +157,7 @@ $cache = Cache.new(dir: 'site-scan')
$verbose = ARGV.delete '--verbose'
# USAGE:
-# site-scan.rb https://whimsical.apache.org [whimsy] [whimsy-scan.json] - to scan one project
+# site-scan.rb https://whimsical.apache.org [Whimsy] [whimsy-scan.json] - to scan one project
# site-scan.rb [project-output.json] [podlings-output.json] [projname podlingname ...]
# If additional projname|podlingname are provided, only scans those sites
if ARGV.first =~ /^https?:\/\/\w/