Skip to content

Commit cd96ec5

Browse files
committed
DX-1846: Bump HTMLProofer from v3 to v4
1 parent 49f6922 commit cd96ec5

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.docker/entrypoint/Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ gem 'rouge', '~> 3'
1414
group :development, :test do
1515
gem 'codecov', '>= 0.6'
1616
gem 'diffy', '~> 3'
17-
gem 'html-proofer', '~> 3'
18-
gem 'html-proofer-unrendered-markdown', '>= 0.1'
17+
gem 'html-proofer', '>= 4'
18+
gem 'html-proofer-unrendered-markdown', '>= 0.2'
1919
gem 'its', '>= 0.2'
2020
gem 'rake', '~> 13'
2121
gem 'rspec', '~> 3'

.docker/entrypoint/lib/commands/verifier.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ def options(ignore_urls = nil)
6868
log_level = @context.arguments.log_level
6969
opts[:log_level] = log_level.to_sym unless log_level.nil?
7070
opts[:url_ignore] = ignore_urls if ignore_urls.valid_array?
71-
opts[:cache] = { timeframe: '1h' }
71+
opts[:cache] = { timeframe: { external: '1w' } }
7272

7373
opts
7474
end
7575

7676
def default_options
7777
{
78-
assume_extension: true,
78+
checks: ['Links', 'Images', 'Scripts', 'UnrenderedLink'],
79+
allow_missing_href: true,
7980
check_html: true,
8081
enforce_https: true,
8182
only_4xx: true,

.docker/entrypoint/spec/verifier_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878

7979
it 'receives expected options' do
8080
expected_options = {
81-
assume_extension: true,
81+
checks: ['Links', 'Images', 'Scripts', 'UnrenderedLink'],
82+
allow_missing_href: true,
8283
check_html: true,
8384
check_unrendered_link: true,
8485
enforce_https: true,
@@ -88,7 +89,7 @@
8889
typheous: {
8990
verbose: false
9091
},
91-
cache: { :timeframe => '1h' }
92+
cache: { timeframe: { external: '1w' } }
9293
}
9394
html_proofer_class = SpecHTMLProofer
9495
html_proofer = html_proofer_class.new

tests/minimal/index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ Text can be **bold**, _italic_, or ~~strikethrough~~.
1010
* [Absolute URL to page]({{ page.url | absolute_url }}).
1111
* [Relative URL to page]({{ "/" | relative_url }}).
1212
* [External absolute full link](https://www.wikipedia.org)
13-
* [External protocol relative link](//www.wikipedia.org)
1413
* [Internal absolute full link]({{ site.url }})
15-
* [Internal explicit relative link](./page1)
16-
* [Internal implicit relative link](page1)
17-
* [Internal absolute link](/page1)
14+
* [Internal explicit relative link](./)
15+
* [Internal absolute link](/)
1816

1917
There should be whitespace between paragraphs.
2018

0 commit comments

Comments
 (0)