image_size 1.1.0 → 1.1.1
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/image_size.gemspec +1 -1
- data/lib/image_size.rb +1 -1
- data/spec/image_size_spec.rb +6 -0
- metadata +5 -6
data/image_size.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'image_size'
|
5
|
-
s.version = '1.1.
|
5
|
+
s.version = '1.1.1'
|
6
6
|
s.summary = %q{Measure image size using pure Ruby}
|
7
7
|
s.description = %q{Measure following file dimensions: bmp, gif, jpeg, pbm, pcx, pgm, png, ppm, psd, swf, tiff, xbm, xpm}
|
8
8
|
s.homepage = "http://github.com/toy/#{s.name}"
|
data/lib/image_size.rb
CHANGED
@@ -17,7 +17,7 @@ class ImageSize
|
|
17
17
|
when String
|
18
18
|
StringIO.new(data_or_io)
|
19
19
|
else
|
20
|
-
raise ArgumentError.new("expected instance of IO, StringIO, Tempfile or String, got #{
|
20
|
+
raise ArgumentError.new("expected instance of IO, StringIO, Tempfile or String, got #{data_or_io.class}")
|
21
21
|
end
|
22
22
|
@read = 0
|
23
23
|
@data = ''
|
data/spec/image_size_spec.rb
CHANGED
@@ -65,4 +65,10 @@ describe ImageSize do
|
|
65
65
|
[is.format, is.width, is.height].should == [format, width, height]
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
it "should raise ArgumentError if argument is not valid" do
|
70
|
+
lambda {
|
71
|
+
ImageSize.new(Object)
|
72
|
+
}.should raise_error(ArgumentError)
|
73
|
+
end
|
68
74
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_size
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Keisuke Minami
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-06-19 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rspec
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
requirements: []
|
89
89
|
|
90
90
|
rubyforge_project: image_size
|
91
|
-
rubygems_version: 1.8.
|
91
|
+
rubygems_version: 1.8.24
|
92
92
|
signing_key:
|
93
93
|
specification_version: 3
|
94
94
|
summary: Measure image size using pure Ruby
|
@@ -106,4 +106,3 @@ test_files:
|
|
106
106
|
- spec/test.tif
|
107
107
|
- spec/test.xbm
|
108
108
|
- spec/test.xpm
|
109
|
-
has_rdoc:
|