url_canonicalize 0.1.2 → 0.1.4
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/url_canonicalize/http.rb +0 -6
- data/lib/url_canonicalize/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34f9a7a4f198b6f09e35d22c80b290400b9f19dc
|
|
4
|
+
data.tar.gz: 3a10c7dd7d775f212d2b44e8f728a04568ff78c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9a953ab2304b1fbda3909f8af3abbc50a1acb634cf0b6300decd1d2cfad934884dbf27ee124a17100a7c81885f893cfeb07e712e166d0cdac3ff3b0855cd295
|
|
7
|
+
data.tar.gz: 253b870b0f19b5c29232e411a512c6e34a74b8744a79d9d70e530839317a8ab4e6eadee31203765e2b89fcfbf2494987b7ee2abb6819e5a1423a6c90a684bcdc
|
|
@@ -55,8 +55,6 @@ module URLCanonicalize
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def redirect_loop_detected?
|
|
58
|
-
puts 'Redirect' # debug
|
|
59
|
-
|
|
60
58
|
if redirect_list.include?(response.url)
|
|
61
59
|
return true if last_known_good
|
|
62
60
|
raise URLCanonicalize::Exception::Redirect, 'Redirect loop detected'
|
|
@@ -87,8 +85,6 @@ module URLCanonicalize
|
|
|
87
85
|
end
|
|
88
86
|
|
|
89
87
|
def handle_canonical_found
|
|
90
|
-
puts 'Canonical found' # debug
|
|
91
|
-
|
|
92
88
|
self.last_known_good = response.response
|
|
93
89
|
return true if response.url == url || redirect_list.include?(response.url)
|
|
94
90
|
set_url_from_response
|
|
@@ -109,8 +105,6 @@ module URLCanonicalize
|
|
|
109
105
|
end
|
|
110
106
|
|
|
111
107
|
def handle_success
|
|
112
|
-
puts 'Success' # debug
|
|
113
|
-
|
|
114
108
|
self.last_known_good = response
|
|
115
109
|
true
|
|
116
110
|
end
|