fastimage 1.2.2 → 1.2.3
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.
- data/VERSION.yml +1 -1
- data/lib/fastimage.rb +2 -0
- data/test/test.rb +6 -0
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/fastimage.rb
CHANGED
@@ -147,6 +147,8 @@ class FastImage
|
|
147
147
|
raise ImageFetchFailure if options[:raise_on_failure]
|
148
148
|
rescue Errno::ENOENT
|
149
149
|
raise ImageFetchFailure if options[:raise_on_failure]
|
150
|
+
rescue NoMethodError # 1.8.7p248 can raise this due to a net/http bug
|
151
|
+
raise ImageFetchFailure if options[:raise_on_failure]
|
150
152
|
rescue UnknownImageType
|
151
153
|
raise UnknownImageType if options[:raise_on_failure]
|
152
154
|
end
|
data/test/test.rb
CHANGED
@@ -74,6 +74,12 @@ class FastImageTest < Test::Unit::TestCase
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
+
def test_should_raise_when_asked_to_when_domain_does_not_exist
|
78
|
+
assert_raises(FastImage::ImageFetchFailure) do
|
79
|
+
FastImage.size("http://www.google.com/does_not_exist_at_all", :raise_on_failure=>true)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
77
83
|
def test_should_raise_when_asked_when_image_type_not_known
|
78
84
|
assert_raises(FastImage::UnknownImageType) do
|
79
85
|
FastImage.size(TestUrl + "test.ico", :raise_on_failure=>true)
|
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: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Sykes
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-23 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|