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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e440a3dccb0a62785e545546b560476f37ccd57
4
- data.tar.gz: 38c85885bc54e08028e1cebdd0d9212fad57cec8
3
+ metadata.gz: 1b2bb63fccc1c47099ac402f2d81ba9eb69347ab
4
+ data.tar.gz: c75767253880fc3778bb4a19c82d00acc8f86d86
5
5
  SHA512:
6
- metadata.gz: b390de4b5d5a12d7d15fa0aaa049d859c07291077ff37f09d0dd8ba89da3daf770ee4128393c2da0d91c94d2f591c44190a3ab9786faec75e1587d5ba7c53aba
7
- data.tar.gz: cccf201bec13a2d174429fe4706845c05576985b46985e98895f074badb35d81d03c9d0397c32bcdc504d9f3603a5e5b235399f7607594603190a8568ee4a309
6
+ metadata.gz: a054859ed05cc2744f5a1374341d3ca37ce449167066a9dd37b97191a2003b4246a3060d687d36d342c1efd2fbd78844f8b512ab77968a0719c9e8614e50faba
7
+ data.tar.gz: a52297318348f13cba1ef8e9feee1c8eabae2ffb00dcd0711341869cde61f47af5b6b3c116ba61d6244dc8475b099c98677e6be4b176c8eadaea8a6f9bb6d51f
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Date : 2014-11-23
6
6
 
7
7
  Copyright : Copyright (C) 2014 Felix C. Stegerman
8
- Version : v0.1.1
8
+ Version : v0.1.2
9
9
 
10
10
  []: }}}1
11
11
 
@@ -1,4 +1,4 @@
1
1
  module OpenURIWithRedirectToHttps
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  DATE = '2014-11-23'
4
4
  end
@@ -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
- open_uri_orig name, *rest, &b
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_uri_w_redirect_to_https
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix C. Stegerman