evented_magick 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +10 -0
- data/Rakefile +4 -0
- data/VERSION +1 -1
- data/evented_magick.gemspec +4 -2
- data/lib/evented_magick.rb +2 -3
- data/spec/evented_magick_spec.rb +17 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/test.png +0 -0
- metadata +5 -11
- data/lib/image_temp_file.rb +0 -9
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,12 +1,21 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
+
diff-lcs (1.1.2)
|
4
5
|
git (1.2.5)
|
5
6
|
jeweler (1.6.0)
|
6
7
|
bundler (~> 1.0.0)
|
7
8
|
git (>= 1.2.5)
|
8
9
|
rake
|
9
10
|
rake (0.8.7)
|
11
|
+
rspec (2.6.0)
|
12
|
+
rspec-core (~> 2.6.0)
|
13
|
+
rspec-expectations (~> 2.6.0)
|
14
|
+
rspec-mocks (~> 2.6.0)
|
15
|
+
rspec-core (2.6.0)
|
16
|
+
rspec-expectations (2.6.0)
|
17
|
+
diff-lcs (~> 1.1.2)
|
18
|
+
rspec-mocks (2.6.0)
|
10
19
|
|
11
20
|
PLATFORMS
|
12
21
|
ruby
|
@@ -14,3 +23,4 @@ PLATFORMS
|
|
14
23
|
DEPENDENCIES
|
15
24
|
jeweler
|
16
25
|
rake
|
26
|
+
rspec
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/evented_magick.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{evented_magick}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mike Perham"]
|
@@ -23,7 +23,9 @@ Gem::Specification.new do |s|
|
|
23
23
|
"evented_magick.gemspec",
|
24
24
|
"examples/processor.rb",
|
25
25
|
"lib/evented_magick.rb",
|
26
|
-
"
|
26
|
+
"spec/evented_magick_spec.rb",
|
27
|
+
"spec/spec_helper.rb",
|
28
|
+
"spec/test.png"
|
27
29
|
]
|
28
30
|
s.homepage = %q{https://github.com/mperham/evented/tree/master/evented_magick}
|
29
31
|
s.require_paths = ["lib"]
|
data/lib/evented_magick.rb
CHANGED
@@ -2,8 +2,7 @@ require "open-uri"
|
|
2
2
|
require "stringio"
|
3
3
|
require "fileutils"
|
4
4
|
require "open3"
|
5
|
-
|
6
|
-
require File.join(File.dirname(__FILE__), '/image_temp_file')
|
5
|
+
require 'tempfile'
|
7
6
|
|
8
7
|
module EventedMagick
|
9
8
|
class MiniMagickError < RuntimeError; end
|
@@ -18,7 +17,7 @@ module EventedMagick
|
|
18
17
|
class << self
|
19
18
|
def from_blob(blob, ext = nil)
|
20
19
|
begin
|
21
|
-
tempfile =
|
20
|
+
tempfile = Tempfile.new(['evented_magick', ext.to_s])
|
22
21
|
tempfile.binmode
|
23
22
|
tempfile.write(blob)
|
24
23
|
ensure
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.expand_path('spec/spec_helper')
|
2
|
+
|
3
|
+
describe EventedMagick do
|
4
|
+
describe :from_blob do
|
5
|
+
it "can identify" do
|
6
|
+
image = EventedMagick::Image.from_blob(File.read('spec/test.png'))
|
7
|
+
image['width'].should == 100
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe :new do
|
12
|
+
it "can identify" do
|
13
|
+
image = EventedMagick::Image.new('spec/test.png')
|
14
|
+
image['width'].should == 100
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/test.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evented_magick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 27
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 0.1.0
|
5
|
+
version: 0.1.1
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Mike Perham
|
@@ -36,7 +31,9 @@ files:
|
|
36
31
|
- evented_magick.gemspec
|
37
32
|
- examples/processor.rb
|
38
33
|
- lib/evented_magick.rb
|
39
|
-
-
|
34
|
+
- spec/evented_magick_spec.rb
|
35
|
+
- spec/spec_helper.rb
|
36
|
+
- spec/test.png
|
40
37
|
has_rdoc: true
|
41
38
|
homepage: https://github.com/mperham/evented/tree/master/evented_magick
|
42
39
|
licenses: []
|
@@ -51,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
48
|
requirements:
|
52
49
|
- - ">="
|
53
50
|
- !ruby/object:Gem::Version
|
54
|
-
hash:
|
51
|
+
hash: -641136945
|
55
52
|
segments:
|
56
53
|
- 0
|
57
54
|
version: "0"
|
@@ -60,9 +57,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
57
|
requirements:
|
61
58
|
- - ">="
|
62
59
|
- !ruby/object:Gem::Version
|
63
|
-
hash: 3
|
64
|
-
segments:
|
65
|
-
- 0
|
66
60
|
version: "0"
|
67
61
|
requirements: []
|
68
62
|
|