open_uri_w_redirect_to_https 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/README.md +1 -1
- data/lib/open_uri_w_redirect_to_https/version.rb +1 -1
- data/lib/open_uri_w_redirect_to_https.rb +6 -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: 1b2bb63fccc1c47099ac402f2d81ba9eb69347ab
|
4
|
+
data.tar.gz: c75767253880fc3778bb4a19c82d00acc8f86d86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a054859ed05cc2744f5a1374341d3ca37ce449167066a9dd37b97191a2003b4246a3060d687d36d342c1efd2fbd78844f8b512ab77968a0719c9e8614e50faba
|
7
|
+
data.tar.gz: a52297318348f13cba1ef8e9feee1c8eabae2ffb00dcd0711341869cde61f47af5b6b3c116ba61d6244dc8475b099c98677e6be4b176c8eadaea8a6f9bb6d51f
|
data/README.md
CHANGED
@@ -82,7 +82,12 @@ module OpenURI
|
|
82
82
|
r = (o = rest.find { |x| Hash === x }) && o.delete(:redirect_to_https)
|
83
83
|
Thread.current[:__open_uri_w_redirect_to_https__] = \
|
84
84
|
r.nil? ? redirect_to_https? : r
|
85
|
-
|
85
|
+
begin
|
86
|
+
open_uri_orig name, *rest, &b
|
87
|
+
ensure
|
88
|
+
# clear (redirectable? might not be called due to an exception)
|
89
|
+
Thread.current[:__open_uri_w_redirect_to_https__] = nil
|
90
|
+
end
|
86
91
|
end
|
87
92
|
|
88
93
|
private
|