From 7d2578b1ffbc579c430c3cf723cadfed79fc4dcc Mon Sep 17 00:00:00 2001 From: Eric Sorenson Date: Mon, 29 Apr 2024 16:16:30 -0700 Subject: [PATCH 1/3] Remove version lock from html-proofer There have been 2 major revs of HTML-Proofer since the one we pinned. The current one is causing flaky tests - it's missing clear errors w/internal links and only reports the first error it finds rather than running to completion and reporting all of them. The latest version (5.0.8 at the moment) does catch all of the errors but has a problem locally where UTF-8 encoded anchor links are not properly decoded. This might be a problem local to me though; I coded up a spec test in html-proofer with an exact copy-paste of one of the failing links and ... it passes there. So i'll unpin this and see if there's some local gem issue that's causing this on my machine and maybe it works in the Actions env. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index a76c33fb51c..ca9b7428d0e 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,6 @@ source "https://rubygems.org" gem "github-pages", group: :jekyll_plugins group :test do - gem "html-proofer", "~> 3.19.4" + gem "html-proofer" gem "rake" end From 81f75fbdab9042d360c23f1d0b15bca2117394e9 Mon Sep 17 00:00:00 2001 From: Eric Sorenson Date: Mon, 29 Apr 2024 18:09:00 -0700 Subject: [PATCH 2/3] Bump ruby-version to 3.2.x --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index a603bb50a29..a3ec5a4bd3d 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.5 +3.2 From 0c42faae08fce1bf0f2c566708a7c47c34c556ae Mon Sep 17 00:00:00 2001 From: Eric Sorenson Date: Mon, 29 Apr 2024 18:32:42 -0700 Subject: [PATCH 3/3] Update html-proofer config stanza for new version based on html-proofer's UPGRADING.md , many of the old configuration directives have changed names in the new version. --- script/html-proofer | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script/html-proofer b/script/html-proofer index 45a74b85e26..1e49fe96e94 100755 --- a/script/html-proofer +++ b/script/html-proofer @@ -20,12 +20,13 @@ HTMLProofer::Runner.new( ["_site"], parallel: { in_threads: 4 }, type: :directory, - url_ignore: url_ignores, + ignore_urls: url_ignores, check_html: true, check_opengraph: true, - check_img_http: true, favicon: true, assume_extension: true, + allow_missing_href: true, + enforce_https: false, only_4xx: true, - http_status_ignore: [429] + ignore_status_codes: [429] ).run