html-proofer 5.0.4 → 5.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5480fbee53b67ca43a6a5896919e8d6ab82bca8e31b20e0734b60c78a71747c6
|
4
|
+
data.tar.gz: 12d2e42cefdab3b45b8048e7293e2bb0ccb2235fb6ac2b1722b662f1129a7202
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6789de48b6d391cb36fd1c7b05bba18960e1782e4ef20b9cf15c076efdb147231a7b56c7c79eaad0c4c267a58fbc3355cb8a063334a7224a8901ac8a594908d8
|
7
|
+
data.tar.gz: 17fb7a62b96b1eb3b47dd297f8aedab8e02ffb2eacf3880d1b4ea7b0061ab4ba13dcc20993e76ba36d766d29f6ef8726823e5f73524b01eea5de96cba2455e96
|
data/lib/html_proofer/cache.rb
CHANGED
@@ -93,8 +93,10 @@ module HTMLProofer
|
|
93
93
|
# if there are no urls, bail
|
94
94
|
return {} if urls_detected.empty?
|
95
95
|
|
96
|
-
|
97
|
-
|
96
|
+
if type == :external
|
97
|
+
urls_detected = urls_detected.transform_keys do |url|
|
98
|
+
cleaned_url(url)
|
99
|
+
end
|
98
100
|
end
|
99
101
|
|
100
102
|
urls_to_check = detect_url_changes(urls_detected, type)
|
@@ -126,7 +126,7 @@ module HTMLProofer
|
|
126
126
|
|
127
127
|
# attempt to verify PDF hash ref; see #787 for more details
|
128
128
|
# FIXME: this is re-reading the PDF response
|
129
|
-
if content_type &&
|
129
|
+
if content_type && content_type[1].include?("pdf")
|
130
130
|
io = URI.parse(url.to_s).open
|
131
131
|
reader = PDF::Reader.new(io)
|
132
132
|
|
@@ -135,7 +135,7 @@ module HTMLProofer
|
|
135
135
|
page = Regexp.last_match[1].to_i
|
136
136
|
|
137
137
|
unless pages[page - 1]
|
138
|
-
msg = "External link #{href} failed: #{url.
|
138
|
+
msg = "External link #{href} failed: #{url.without_hash} exists, but the hash '#{hash}' does not"
|
139
139
|
add_failure(filenames, msg, response.code)
|
140
140
|
@cache.add_external(href, filenames, response.code, msg, false)
|
141
141
|
end
|
@@ -158,7 +158,7 @@ module HTMLProofer
|
|
158
158
|
|
159
159
|
return unless body_doc.xpath(xpath.join("|")).empty?
|
160
160
|
|
161
|
-
msg = "External link #{href} failed: #{url.
|
161
|
+
msg = "External link #{href} failed: #{url.without_hash} exists, but the hash '#{hash}' does not"
|
162
162
|
add_failure(filenames, msg, response.code)
|
163
163
|
@cache.add_external(href, filenames, response.code, msg, false)
|
164
164
|
true
|
data/lib/html_proofer/version.rb
CHANGED
@@ -4,7 +4,7 @@ module HTMLProofer
|
|
4
4
|
# https://stackoverflow.com/a/8812293
|
5
5
|
class XpathFunctions
|
6
6
|
def case_sensitive_equals(node_set, str_to_match)
|
7
|
-
node_set.find_all { |node| node.to_s
|
7
|
+
node_set.find_all { |node| node.to_s == str_to_match.to_s }
|
8
8
|
end
|
9
9
|
end
|
10
10
|
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.
|
4
|
+
version: 5.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -122,62 +122,6 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '2.5'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: awesome_print
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: debug
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: rake
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: redcarpet
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
125
|
- !ruby/object:Gem::Dependency
|
182
126
|
name: rspec
|
183
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,48 +136,6 @@ dependencies:
|
|
192
136
|
- - "~>"
|
193
137
|
- !ruby/object:Gem::Version
|
194
138
|
version: '3.1'
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: rubocop
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - ">="
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '0'
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - ">="
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '0'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: rubocop-rspec
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - ">="
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '0'
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - ">="
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: '0'
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: rubocop-standard
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - ">="
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: '0'
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - ">="
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: '0'
|
237
139
|
- !ruby/object:Gem::Dependency
|
238
140
|
name: timecop
|
239
141
|
requirement: !ruby/object:Gem::Requirement
|