fastimage 2.1.1 → 2.1.2
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/fastimage.rb +4 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74fc8be5d9ead8961a52aa89c0df0ff8a007f0c7
|
4
|
+
data.tar.gz: caad48d5e5120cb0e4ee877b0511cb62e4ec3b95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e72700677ce5ae10030abb6a8083025437997f44cb1c854ec6d9ca951363e5dd324e0d7c80eae0b35fbafe55592d30e7fad78aae6acf7a90496f11b903ed5a8
|
7
|
+
data.tar.gz: 97fdb59e67a882064d5989e0d0c17ee87ef35b133c0fb93183e733c487fb766fc7cb9411421a5fc5165edb616516ff70b98ea627c7887b261b16384077c03bee
|
data/lib/fastimage.rb
CHANGED
@@ -214,7 +214,7 @@ class FastImage
|
|
214
214
|
raise SizeNotFound if @options[:raise_on_failure] && @property == :size && !@size
|
215
215
|
|
216
216
|
rescue Timeout::Error, SocketError, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ECONNRESET,
|
217
|
-
ImageFetchFailure, Net::HTTPBadResponse, EOFError, Errno::ENOENT
|
217
|
+
ImageFetchFailure, Net::HTTPBadResponse, EOFError, Errno::ENOENT, OpenSSL::SSL::SSLError
|
218
218
|
raise ImageFetchFailure if @options[:raise_on_failure]
|
219
219
|
rescue NoMethodError # 1.8.7p248 can raise this due to a net/http bug
|
220
220
|
raise ImageFetchFailure if @options[:raise_on_failure]
|
@@ -250,15 +250,7 @@ class FastImage
|
|
250
250
|
if res.is_a?(Net::HTTPRedirection) && @redirect_count < 4
|
251
251
|
@redirect_count += 1
|
252
252
|
begin
|
253
|
-
|
254
|
-
# The new location may be relative - check for that
|
255
|
-
if protocol_relative_url?(res['Location'])
|
256
|
-
@parsed_uri = URI.parse("#{@parsed_uri.scheme}:#{res['Location']}")
|
257
|
-
elsif newly_parsed_uri.scheme != "http" && newly_parsed_uri.scheme != "https"
|
258
|
-
@parsed_uri.path = res['Location']
|
259
|
-
else
|
260
|
-
@parsed_uri = newly_parsed_uri
|
261
|
-
end
|
253
|
+
@parsed_uri = URI.join(@parsed_uri, res['Location'])
|
262
254
|
rescue URI::InvalidURIError
|
263
255
|
else
|
264
256
|
fetch_using_http_from_parsed_uri
|
@@ -539,7 +531,8 @@ class FastImage
|
|
539
531
|
io = StringIO.new(data)
|
540
532
|
if io.read(4) == "Exif"
|
541
533
|
io.read(2)
|
542
|
-
|
534
|
+
new_exif = Exif.new(IOStream.new(io)) rescue nil
|
535
|
+
exif ||= new_exif # only use the first APP1 segment
|
543
536
|
end
|
544
537
|
:started
|
545
538
|
when 0xe0..0xef
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastimage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Sykes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fakeweb
|