html-proofer 5.0.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2c984bfe049fba10c746d289d8d0256f219d6ae8f5af152f6f8af68e639301b
4
- data.tar.gz: c407f3995e873bbbc42d90de1f082827a40caa90cb12e5cdba7fd514500d1124
3
+ metadata.gz: 44d7d6b601b41b5bf4c4ae8084b982fcb2b5dfcb6e5a56ec27c9f6ddb984f949
4
+ data.tar.gz: 88c9d25790610eabf95be2f52ab4f8d48c4cea795389b9eb858633c629001328
5
5
  SHA512:
6
- metadata.gz: 732365ae4207754f70b27843a52d4f8186673fe1282ddaae03244ebff07517816371e970b75e465539bac51e931d51d4b1856866fcd6a3a575ae6e980d7c6465
7
- data.tar.gz: ab01a8425d206863584e6c84f395ab85a22eff9d2e1df0daa4e0f72771fc9bde95a8992da17d2ef8195439ad1de2412135758989bb9ba29766b1978d95e0fad4
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? ? [] : list.split(",")
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\'s not marked as `https` (default: `true`)."],
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 ",
@@ -166,8 +166,14 @@ module HTMLProofer
166
166
 
167
167
  def ignore_file?(file)
168
168
  @options[:ignore_files].each do |pattern|
169
- return true if pattern.is_a?(String) && pattern == file
170
- return true if pattern.is_a?(Regexp) && pattern =~ file
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTMLProofer
4
- VERSION = "5.0.0"
4
+ VERSION = "5.0.1"
5
5
  end
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.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-10-08 00:00:00.000000000 Z
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.7
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