html-proofer 2.6.2 → 2.6.3

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
  SHA1:
3
- metadata.gz: bf234c7862c1fe6181713df3c1437f906ed23b26
4
- data.tar.gz: c4c88cabbc46a02bc1c1af319ec7f72c36a3cf9e
3
+ metadata.gz: 6964d1ee614f0d898f0bfc8d26c5fd31b68cc5c0
4
+ data.tar.gz: 236418a82ce34b84911962f5b1215457ef09e5d9
5
5
  SHA512:
6
- metadata.gz: 63f2b3ff9371bfb1c2970c3a7655a8a1a537e6292bf5764c6dbb3989719af85d293d7b7f942c6892ac61d908e652e22aeadd180c907cd6b9bd6bad9bf5fdefd4
7
- data.tar.gz: 41f7f1ee172557d380139a534fff028370765cb25b4694dbf2c5730c1a5ed4e3e3c78bca901c04e59a9dc9ead67ae28769dbd62e41045800ad835cb1bec37088
6
+ metadata.gz: 4ee9907b79951bbcc9884dcde1f7c97b304205be8dbd029ce91c2b69b7f46e5f039373df573548a03714fceb010454d171f6381c86a9a94439e9890909389304
7
+ data.tar.gz: 3994c7b5d56e4867b1a7bc1b6ed877d5b7fcdabb7fb5de260244dccd6062a6154b59b345ecfec860526ca62ddea69c170977cbe5bf609230effc6e85f7756a80
data/lib/html/proofer.rb CHANGED
@@ -113,21 +113,27 @@ module HTML
113
113
 
114
114
  # Walks over each implemented check and runs them on the files, in parallel.
115
115
  def check_files_for_internal_woes
116
- Parallel.map(files, @parallel_opts) do |path|
117
- html = create_nokogiri(path)
118
- result = { :external_urls => {}, :failed_tests => [] }
119
-
120
- checks.each do |klass|
121
- logger.log :debug, :yellow, "Checking #{klass.to_s.downcase} on #{path} ..."
122
- check = Object.const_get(klass).new(@src, path, html, @options, @typhoeus_opts, @hydra_opts, @parallel_opts, @validation_opts)
123
- check.run
124
- result[:external_urls].merge!(check.external_urls)
125
- result[:failed_tests].concat(check.issues) if check.issues.length > 0
126
- end
127
- result
116
+ if @parallel_opts.empty?
117
+ Parallel.map(files) { |path| check_path(path) }
118
+ else
119
+ Parallel.map(files, @parallel_opts) { |path| check_path(path) }
128
120
  end
129
121
  end
130
122
 
123
+ def check_path(path)
124
+ html = create_nokogiri(path)
125
+ result = { :external_urls => {}, :failed_tests => [] }
126
+
127
+ checks.each do |klass|
128
+ logger.log :debug, :yellow, "Checking #{klass.to_s.downcase} on #{path} ..."
129
+ check = Object.const_get(klass).new(@src, path, html, @options, @typhoeus_opts, @hydra_opts, @parallel_opts, @validation_opts)
130
+ check.run
131
+ result[:external_urls].merge!(check.external_urls)
132
+ result[:failed_tests].concat(check.issues) if check.issues.length > 0
133
+ end
134
+ result
135
+ end
136
+
131
137
  def validate_urls
132
138
  url_validator = HTML::Proofer::UrlValidator.new(logger, @external_urls, @options, @typhoeus_opts, @hydra_opts)
133
139
  @failed_tests.concat(url_validator.run)
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Proofer
3
- VERSION = '2.6.2'
3
+ VERSION = '2.6.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-proofer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian