html-proofer 4.0.0.rc1 → 4.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html_proofer/cache.rb +8 -6
- data/lib/html_proofer/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe365dbadbbe912ceb224355c844dbca64a07af97827b4c8ee43cf5a47c24c2f
|
4
|
+
data.tar.gz: 63b5df6a997e887dde145aaaabc2db988d2d28751ab91a8f9040e82676307779
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cf2b0c74896ecfc85fc98a67a6eac648de0bfe90ba0c08564031b9ee5b613237219b970e8c6f71901a300f7c14354755dc4f3878918b92c8029841795c72e01
|
7
|
+
data.tar.gz: b26a375b4f245b1c0edc27c5291ca86b2f738ac5a55b5fa7a64f1f148e763b5bd8961168dad9cf50bb91c4287e7bb6a2d25cdd26eac2b06b31551777984eb1ff
|
data/lib/html_proofer/cache.rb
CHANGED
@@ -95,8 +95,6 @@ module HTMLProofer
|
|
95
95
|
# prepare to add new URLs detected
|
96
96
|
private def determine_additions(urls_detected, type)
|
97
97
|
additions = urls_detected.reject do |url, metadata|
|
98
|
-
url = cleaned_url(url)
|
99
|
-
|
100
98
|
if @cache_log[type].include?(url)
|
101
99
|
@cache_log[type][url][:metadata] = metadata
|
102
100
|
|
@@ -124,8 +122,6 @@ module HTMLProofer
|
|
124
122
|
deletions = 0
|
125
123
|
|
126
124
|
@cache_log[type].delete_if do |url, _|
|
127
|
-
url = cleaned_url(url)
|
128
|
-
|
129
125
|
if urls_detected.include?(url)
|
130
126
|
false
|
131
127
|
elsif url_matches_type?(url, type)
|
@@ -149,6 +145,10 @@ module HTMLProofer
|
|
149
145
|
# if there are no urls, bail
|
150
146
|
return {} if urls_detected.empty?
|
151
147
|
|
148
|
+
urls_detected = urls_detected.transform_keys do |url|
|
149
|
+
cleaned_url(url)
|
150
|
+
end
|
151
|
+
|
152
152
|
urls_to_check = detect_url_changes(urls_detected, type)
|
153
153
|
|
154
154
|
@cache_log[type].each_pair do |url, cache|
|
@@ -222,9 +222,11 @@ module HTMLProofer
|
|
222
222
|
end
|
223
223
|
|
224
224
|
private def cleaned_url(url)
|
225
|
-
|
225
|
+
cleaned_url = escape_unescape(url)
|
226
|
+
|
227
|
+
return cleaned_url unless cleaned_url.end_with?('/', '#', '?') && cleaned_url.length > 1
|
226
228
|
|
227
|
-
|
229
|
+
cleaned_url[0..-2]
|
228
230
|
end
|
229
231
|
|
230
232
|
private def escape_unescape(url)
|
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: 4.0.0.
|
4
|
+
version: 4.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -136,20 +136,6 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
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
139
|
- !ruby/object:Gem::Dependency
|
154
140
|
name: rake
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|