html-proofer 3.17.1 → 3.17.2
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/element.rb +4 -1
- data/lib/html-proofer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ee53fc4edb91d7319f27f79abf9c31a10761b19fdbabf25904048fd4a1f3f2b5
|
|
4
|
+
data.tar.gz: a779feb72397f9f7b3498702ba6097437ca4162fe95e9c618df2c32df317196f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1caec4616e73928e36e32cedc4529b0ad4628d5ff22b0b060f14d967f9e778fbad9cfdc1b3cc22aa302ea9e7509eb3d7bbaffeacc7f95541cede0bb1c875a3fa
|
|
7
|
+
data.tar.gz: e33a43f7e5fcbe892acf02c89950715d5b34e2d11430507ab83574126e9568a32a57a238727fa047153d7f4824baba9d62dbf2839655fd49c28ac50bb1469eea
|
data/lib/html-proofer/element.rb
CHANGED
|
@@ -181,7 +181,8 @@ module HTMLProofer
|
|
|
181
181
|
path_dot_ext = path + @check.options[:extension] if @check.options[:assume_extension]
|
|
182
182
|
|
|
183
183
|
base = if absolute_path?(path) # path relative to root
|
|
184
|
-
|
|
184
|
+
# either overwrite with root_dir; or, if source is directory, use that; or, just get the current file's dirname
|
|
185
|
+
@check.options[:root_dir] || (File.directory?(@check.src) ? @check.src : File.dirname(@check.src))
|
|
185
186
|
elsif File.exist?(File.expand_path(path, @check.src)) || File.exist?(File.expand_path(path_dot_ext, @check.src)) # relative links, path is a file
|
|
186
187
|
File.dirname(@check.path)
|
|
187
188
|
elsif File.exist?(File.join(File.dirname(@check.path), path)) || File.exist?(File.join(File.dirname(@check.path), path_dot_ext)) # rubocop:disable Lint/DuplicateBranch; relative links in nested dir, path is a file
|
|
@@ -189,7 +190,9 @@ module HTMLProofer
|
|
|
189
190
|
else # relative link, path is a directory
|
|
190
191
|
@check.path
|
|
191
192
|
end
|
|
193
|
+
|
|
192
194
|
file = File.join(base, path)
|
|
195
|
+
|
|
193
196
|
if @check.options[:assume_extension] && File.file?("#{file}#{@check.options[:extension]}")
|
|
194
197
|
file = "#{file}#{@check.options[:extension]}"
|
|
195
198
|
elsif File.directory?(file) && !unslashed_directory?(file) # implicit index support
|
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.17.
|
|
4
|
+
version: 3.17.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Garen Torikian
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-11-
|
|
11
|
+
date: 2020-11-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|