fastimage 2.1.6 → 2.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fastimage.rb +6 -5
  3. metadata +2 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e7aac521599a47fcc01c2aab866e644c18a0414dd93c2ebc4b04d7ccd294dab
4
- data.tar.gz: 76744799d19d92a539a877dc246968b9ff38d157cda06062ecda401144de363a
3
+ metadata.gz: 2aaa7bc9e7b596326f39fc933d836e8d94a0c19601670c0b55c839ba8d0e9ed5
4
+ data.tar.gz: b807e4cb3ac6ac16b10c026d15ac6a6440a65a75036482518b1a337475bd723b
5
5
  SHA512:
6
- metadata.gz: c9d14f0a65fcdf3565cdbbddbf9f1d3fd6532cc8ad8605e72c726d377eb133c3548645bd97788e5b05ee94ceced5c58beb90ac2a1794bf515edbbbd4d0cdb1c1
7
- data.tar.gz: 8bfc2d38b4228ce7b00cb3a8c0323daf7eb604915a36f355b991e95e562c8f759e3bd238f0c1bf3b5aede00c7b8822fb857b2fd398231b91bba4c28b96833678
6
+ metadata.gz: 8a87fd1e5eb5a209da0c2a2af1d7c0d6cead3f14af8cc591810e0e0d7b853cd519e236f9ec0ed70fdea0c39569631f5b41f88f5fea8942aa55fbe018390102ef
7
+ data.tar.gz: 002d20c88557352e4b3ebb80975d2f26cffa221cc3c510a0865ffed55fe251a63f53dfeff53843f351574cff1aa9c9864d5df1a2e5fc9a4550b5e03fd798880a
@@ -214,7 +214,8 @@ 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, OpenSSL::SSL::SSLError
217
+ Errno::ENETUNREACH, ImageFetchFailure, Net::HTTPBadResponse, EOFError, Errno::ENOENT,
218
+ OpenSSL::SSL::SSLError
218
219
  raise ImageFetchFailure if @options[:raise_on_failure]
219
220
  rescue NoMethodError # 1.8.7p248 can raise this due to a net/http bug
220
221
  raise ImageFetchFailure if @options[:raise_on_failure]
@@ -321,7 +322,7 @@ class FastImage
321
322
  proxy = proxy_uri
322
323
 
323
324
  if proxy
324
- @http = Net::HTTP::Proxy(proxy.host, proxy.port).new(@parsed_uri.host, @parsed_uri.port)
325
+ @http = Net::HTTP::Proxy(proxy.host, proxy.port, proxy.user, proxy.password).new(@parsed_uri.host, @parsed_uri.port)
325
326
  else
326
327
  @http = Net::HTTP.new(@parsed_uri.host, @parsed_uri.port)
327
328
  end
@@ -579,10 +580,10 @@ class FastImage
579
580
  d = @stream.read(32)[14..28]
580
581
  header = d.unpack("C")[0]
581
582
 
582
- result = if header == 40
583
- d[4..-1].unpack('l<l<')
584
- else
583
+ result = if header == 12
585
584
  d[4..8].unpack('SS')
585
+ else
586
+ d[4..-1].unpack('l<l<')
586
587
  end
587
588
 
588
589
  # ImageHeight is expressed in pixels. The absolute value is necessary because ImageHeight can be negative
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastimage
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Sykes
@@ -97,8 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubyforge_project:
101
- rubygems_version: 2.7.6
100
+ rubygems_version: 3.0.6
102
101
  signing_key:
103
102
  specification_version: 4
104
103
  summary: FastImage - Image info fast