html-proofer 5.0.0 → 5.0.1
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/lib/html_proofer/configuration.rb +12 -2
- data/lib/html_proofer/runner.rb +8 -2
- data/lib/html_proofer/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44d7d6b601b41b5bf4c4ae8084b982fcb2b5dfcb6e5a56ec27c9f6ddb984f949
|
4
|
+
data.tar.gz: 88c9d25790610eabf95be2f52ab4f8d48c4cea795389b9eb858633c629001328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34a4e54a59920ca4f334fbb46374796abbaa97294d89a6bf1d339edbb1fad2e128ea1e9dea4ef876745ae6dc7279f23eec743c7c17220f8bd2e89079d019e109
|
7
|
+
data.tar.gz: 25cc51cd7495b1539354ba8be234ca660fb3cb4d4cee45dd514e61e350d8899a1c9756401697307e8e4de5313fdad0e229f12dd090c7f8e7b0ae143bf103140f
|
@@ -134,7 +134,17 @@ module HTMLProofer
|
|
134
134
|
|
135
135
|
section(opts, "Ignore Configuration") do
|
136
136
|
set_option(opts, "--ignore-files [FILE1,FILE2,...]") do |long_opt_symbol, list|
|
137
|
-
@options[long_opt_symbol] = list.nil?
|
137
|
+
@options[long_opt_symbol] = if list.nil?
|
138
|
+
[]
|
139
|
+
else
|
140
|
+
list.split(",").map.each do |l|
|
141
|
+
if l.start_with?("/") && l.end_with?("/")
|
142
|
+
Regexp.new(l[1...-1])
|
143
|
+
else
|
144
|
+
l
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
138
148
|
end
|
139
149
|
|
140
150
|
set_option(opts, "--[no-]ignore-empty-alt") do |long_opt_symbol, arg|
|
@@ -285,7 +295,7 @@ module HTMLProofer
|
|
285
295
|
check_internal_hash: ["Checks whether internal hashes exist (even if the webpage exists) (default: `true`)."],
|
286
296
|
check_sri: ["Check that `<link>` and `<script>` external resources use SRI (default: `false`)."],
|
287
297
|
disable_external: ["If `true`, does not run the external link checker (default: `false`)."],
|
288
|
-
enforce_https: ["Fails a link if it
|
298
|
+
enforce_https: ["Fails a link if it's not marked as `https` (default: `true`)."],
|
289
299
|
root_dir: ["The absolute path to the directory serving your html-files."],
|
290
300
|
|
291
301
|
ignore_empty_alt: ["If `true`, ignores images with empty/missing ",
|
data/lib/html_proofer/runner.rb
CHANGED
@@ -166,8 +166,14 @@ module HTMLProofer
|
|
166
166
|
|
167
167
|
def ignore_file?(file)
|
168
168
|
@options[:ignore_files].each do |pattern|
|
169
|
-
|
170
|
-
|
169
|
+
if pattern.is_a?(String) && pattern == file
|
170
|
+
@logger.log(:debug, "Ignoring #{file} because it matches #{pattern}")
|
171
|
+
return true
|
172
|
+
end
|
173
|
+
next unless pattern.is_a?(Regexp) && pattern.match(file)
|
174
|
+
|
175
|
+
@logger.log(:debug, "Ignoring #{file} because it matches regexp #{pattern}")
|
176
|
+
return true
|
171
177
|
end
|
172
178
|
|
173
179
|
false
|
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: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -306,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
306
|
- !ruby/object:Gem::Version
|
307
307
|
version: '0'
|
308
308
|
requirements: []
|
309
|
-
rubygems_version: 3.3.
|
309
|
+
rubygems_version: 3.3.22
|
310
310
|
signing_key:
|
311
311
|
specification_version: 4
|
312
312
|
summary: A set of tests to validate your HTML output. These tests check if your image
|