html-proofer 3.19.1 → 3.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/htmlproofer +2 -1
- data/lib/html-proofer/cache.rb +1 -1
- data/lib/html-proofer/check/links.rb +1 -1
- data/lib/html-proofer/configuration.rb +1 -0
- data/lib/html-proofer/element.rb +4 -0
- data/lib/html-proofer/runner.rb +2 -1
- data/lib/html-proofer/utils.rb +1 -1
- data/lib/html-proofer/version.rb +1 -1
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f27b5c50ae5c1c77d5fbe36dbbdca327bcb96302912b726f7f955f643d1dfc48
|
4
|
+
data.tar.gz: f09405cd0c70f1d2dc98f904c388bcab594f79107fdbe441c63f934821bef1b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53a8c98438f2056e7e2d926e926e10a6d0aa840b1b6f790860631912a2146dc20c68ca2b303d799a8fbfa723476e0e95dd5bc89695ceddf09ecede6f9acafbd1
|
7
|
+
data.tar.gz: f68269ba70facf5ede07452d1029f49d17baadff8c6b4fd1d9de520c0ede91ff360bacb0cf46b5c719c0ae35c50ad61c6ce5b36171867f6a1c9d8c675d805ebc
|
data/bin/htmlproofer
CHANGED
@@ -37,6 +37,7 @@ Mercenary.program(:htmlproofer) do |p|
|
|
37
37
|
p.option 'file_ignore', '--file-ignore file1,[file2,...]', Array, 'A comma-separated list of Strings or RegExps containing file paths that are safe to ignore'
|
38
38
|
p.option 'http_status_ignore', '--http-status-ignore 123,[xxx, ...]', Array, 'A comma-separated list of numbers representing status codes to ignore.'
|
39
39
|
p.option 'internal_domains', '--internal-domains domain1,[domain2,...]', Array, 'A comma-separated list of Strings containing domains that will be treated as internal urls.'
|
40
|
+
p.option 'ignore_empty_mailto', '--ignore-empty-mailto', 'If `true`, allows `mailto:` `href`s which do not contain an email address'
|
40
41
|
p.option 'report_invalid_tags', '--report-invalid-tags', 'When `check_html` is enabled, HTML markup that is unknown to Nokogumbo are reported as errors (default: `false`)'
|
41
42
|
p.option 'report_missing_names', '--report-missing-names', 'When `check_html` is enabled, HTML markup that are missing entity names are reported as errors (default: `false`)'
|
42
43
|
p.option 'report_script_embeds', '--report-script-embeds', 'When `check_html` is enabled, `script` tags containing markup are reported as errors (default: `false`)'
|
@@ -89,7 +90,7 @@ Mercenary.program(:htmlproofer) do |p|
|
|
89
90
|
options[:validation][:report_mismatched_tags] = opts['report_mismatched_tags'] unless opts['report_mismatched_tags'].nil?
|
90
91
|
|
91
92
|
options[:typhoeus] = HTMLProofer::Configuration.parse_json_option('typhoeus_config', opts['typhoeus_config'], symbolize_names: false) unless opts['typhoeus_config'].nil?
|
92
|
-
options[:hydra] = HTMLProofer::Configuration.parse_json_option('hydra_config', opts['hydra_config']
|
93
|
+
options[:hydra] = HTMLProofer::Configuration.parse_json_option('hydra_config', opts['hydra_config']) unless opts['hydra_config'].nil?
|
93
94
|
|
94
95
|
unless opts['timeframe'].nil?
|
95
96
|
options[:cache] ||= {}
|
data/lib/html-proofer/cache.rb
CHANGED
@@ -95,7 +95,7 @@ class LinkCheck < ::HTMLProofer::Check
|
|
95
95
|
|
96
96
|
def handle_mailto(link, line, content)
|
97
97
|
if link.path.empty?
|
98
|
-
add_issue("#{link.href} contains no email address", line: line, content: content)
|
98
|
+
add_issue("#{link.href} contains no email address", line: line, content: content) unless link.ignore_empty_mailto?
|
99
99
|
elsif !link.path.include?('@')
|
100
100
|
add_issue("#{link.href} contains an invalid email address", line: line, content: content)
|
101
101
|
end
|
data/lib/html-proofer/element.rb
CHANGED
data/lib/html-proofer/runner.rb
CHANGED
@@ -53,6 +53,7 @@ module HTMLProofer
|
|
53
53
|
if @failures.empty?
|
54
54
|
@logger.log :info, 'HTML-Proofer finished successfully.'
|
55
55
|
else
|
56
|
+
@failures.uniq!
|
56
57
|
print_failed_tests
|
57
58
|
end
|
58
59
|
end
|
@@ -125,7 +126,7 @@ module HTMLProofer
|
|
125
126
|
end
|
126
127
|
|
127
128
|
external_urls = check.external_urls
|
128
|
-
external_urls = check.external_urls.
|
129
|
+
external_urls = check.external_urls.transform_keys { |url| swap(url, @options[:url_swap]) } if @options[:url_swap]
|
129
130
|
result[:external_urls].merge!(external_urls)
|
130
131
|
result[:failures].concat(check.issues)
|
131
132
|
end
|
data/lib/html-proofer/utils.rb
CHANGED
data/lib/html-proofer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html-proofer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.19.
|
4
|
+
version: 3.19.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -39,33 +39,33 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.13'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.13'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: parallel
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.10'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.10'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rainbow
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -278,7 +278,9 @@ files:
|
|
278
278
|
homepage: https://github.com/gjtorikian/html-proofer
|
279
279
|
licenses:
|
280
280
|
- MIT
|
281
|
-
metadata:
|
281
|
+
metadata:
|
282
|
+
funding_uri: https://github.com/sponsors/gjtorikian/
|
283
|
+
rubygems_mfa_required: 'true'
|
282
284
|
post_install_message:
|
283
285
|
rdoc_options: []
|
284
286
|
require_paths:
|
@@ -287,7 +289,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
287
289
|
requirements:
|
288
290
|
- - ">="
|
289
291
|
- !ruby/object:Gem::Version
|
290
|
-
version: 2.
|
292
|
+
version: 2.6.0
|
291
293
|
- - "<"
|
292
294
|
- !ruby/object:Gem::Version
|
293
295
|
version: '4.0'
|
@@ -297,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
297
299
|
- !ruby/object:Gem::Version
|
298
300
|
version: '0'
|
299
301
|
requirements: []
|
300
|
-
rubygems_version: 3.
|
302
|
+
rubygems_version: 3.3.13
|
301
303
|
signing_key:
|
302
304
|
specification_version: 4
|
303
305
|
summary: A set of tests to validate your HTML output. These tests check if your image
|