cacho 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/cacho.rb +4 -5
- 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: 971a2618311a53c598754c6ac93be13c3c035bc1
|
4
|
+
data.tar.gz: c908a98a87751c1b69018042a126f871d0780023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2ffb8c7b0677f102b7174f5406027e612167490b85df8fc326ce6bf29729b8f29a7075b25f702b22765f5a885bd895cf47d8cf5c3dc1cb236e6fa3fa31fedf6
|
7
|
+
data.tar.gz: 3295d8ffff7648eba520a4fcdbcfd70fd041e9c76648c871b798c7b8558556b41b43b2019837975b9d1ada9bc3a99a3ce30a4a5e96d27ee908bdd28187cca1b2
|
data/CHANGELOG.md
CHANGED
data/lib/cacho.rb
CHANGED
@@ -7,7 +7,7 @@ require "csv"
|
|
7
7
|
require "fileutils"
|
8
8
|
|
9
9
|
class Cacho
|
10
|
-
VERSION = "0.1.
|
10
|
+
VERSION = "0.1.2"
|
11
11
|
|
12
12
|
attr_accessor :hasher
|
13
13
|
|
@@ -126,12 +126,11 @@ class Cacho::Client
|
|
126
126
|
return parsed
|
127
127
|
when "303" , "302" , "301"
|
128
128
|
if res["Location"].to_s.index(/^https?:\/\//)
|
129
|
-
|
129
|
+
uri = URI(res["Location"])
|
130
130
|
else
|
131
|
-
|
131
|
+
uri = URI.join(uri, res["Location"])
|
132
132
|
end
|
133
|
-
$stderr.
|
134
|
-
uri = URI.join(redirect_url)
|
133
|
+
$stderr.puts("Redirected to #{res["Location"]} (#{uri})")
|
135
134
|
when "404"
|
136
135
|
return nil
|
137
136
|
else
|