thingfish-processor-image 0.1.0.pre20161114102625 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +13 -1
- data/History.md +7 -2
- data/Rakefile +0 -1
- data/lib/thingfish/processor/image.rb +13 -5
- data/spec/thingfish/processor/image_spec.rb +9 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71abb68f2697e12cca499539898150e567ba6381
|
4
|
+
data.tar.gz: 250cff10b3af2aa083985b4636cda38c12ec179e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1921b02379a6c6d6ce639ff887ee938e8250ed049ba27348fcae7846cf326dfda057455480432801f0c0d5291b0f79131a23b23e1d03edd0261ad803897cd1ae
|
7
|
+
data.tar.gz: 0c01adf4f342fc581f07a3bceb11207ffcaba83ec6da70b5b6acefc499248295a3cf91d8727db303143afc21e94e1dd3dda66645903d04696a0df16c236bf2ee
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
Binary file
|
data/ChangeLog
CHANGED
@@ -1,9 +1,21 @@
|
|
1
|
+
2016-11-16 Mahlon E. Smith <mahlon@martini.nu>
|
2
|
+
|
3
|
+
* lib/thingfish/processor/image.rb,
|
4
|
+
spec/thingfish/processor/image_spec.rb:
|
5
|
+
Add ImageMagick parsing catch. Only load the first
|
6
|
+
frame/page/whatever into memory to generate a thumbnail.
|
7
|
+
[663fd528faed] [tip]
|
8
|
+
|
1
9
|
2016-11-14 Michael Granger <ged@FaerieMUD.org>
|
2
10
|
|
11
|
+
* Rakefile, thingfish-processor-image.gemspec:
|
12
|
+
Fix the version calculation in the gemspec task.
|
13
|
+
[84149cda4ae5]
|
14
|
+
|
3
15
|
* History.md, README.md, Rakefile, lib/thingfish/processor/image.rb,
|
4
16
|
thingfish-processor-image.gemspec:
|
5
17
|
Fix up the README, Rakefile.
|
6
|
-
[e04ece44aa56]
|
18
|
+
[e04ece44aa56]
|
7
19
|
|
8
20
|
2016-11-13 Michael Granger <ged@FaerieMUD.org>
|
9
21
|
|
data/History.md
CHANGED
data/Rakefile
CHANGED
@@ -18,10 +18,10 @@ class Thingfish::Processor::Image < Thingfish::Processor
|
|
18
18
|
|
19
19
|
|
20
20
|
# Package version
|
21
|
-
VERSION = '0.1.
|
21
|
+
VERSION = '0.1.1'
|
22
22
|
|
23
23
|
# Version control revision
|
24
|
-
REVISION = %q$Revision:
|
24
|
+
REVISION = %q$Revision: c3964930bd4f $
|
25
25
|
|
26
26
|
|
27
27
|
# Loggability API -- log to the :angelfish logger
|
@@ -110,8 +110,10 @@ class Thingfish::Processor::Image < Thingfish::Processor
|
|
110
110
|
self.log.debug " making a single image from a StringIO"
|
111
111
|
Magick::Image.from_blob( request.body.read )
|
112
112
|
else
|
113
|
-
|
114
|
-
|
113
|
+
path = request.body.path
|
114
|
+
self.log.debug " making a flattened image out of %p" % [ path ]
|
115
|
+
path = path.to_s + '[0]' # ImageMagick, read a single frame
|
116
|
+
list = Magick::ImageList.new( path )
|
115
117
|
list.flatten_images
|
116
118
|
end
|
117
119
|
|
@@ -128,7 +130,13 @@ class Thingfish::Processor::Image < Thingfish::Processor
|
|
128
130
|
end
|
129
131
|
|
130
132
|
self.log.debug " destroying the image to free up memory"
|
131
|
-
|
133
|
+
|
134
|
+
rescue Magick::ImageMagickError => err
|
135
|
+
self.log.error "Problem while processing file %p: %s" % [ err.class, err.message ]
|
136
|
+
self.log.debug { err.backtrace.join( "\n " ) }
|
137
|
+
|
138
|
+
ensure
|
139
|
+
image.destroy! if image
|
132
140
|
end
|
133
141
|
|
134
142
|
|
@@ -54,6 +54,15 @@ describe Thingfish::Processor::Image, :db do
|
|
54
54
|
end
|
55
55
|
|
56
56
|
|
57
|
+
it "continues if ImageMagick processing is aborted" do
|
58
|
+
req = factory.post( '/tf', fixture_data('skunks.jpg'), 'Content-type' => 'image/jpeg' )
|
59
|
+
|
60
|
+
expect( Magick::ImageList ).to receive( :new ).and_raise( Magick::ImageMagickError.new )
|
61
|
+
processor.process_request( req )
|
62
|
+
|
63
|
+
expect( req.related_resources ).to be_empty
|
64
|
+
end
|
65
|
+
|
57
66
|
it "extracts IPTC metadata from uploaded images"
|
58
67
|
|
59
68
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thingfish-processor-image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pzRNUur1GInfW
|
36
36
|
p4vpx2kUSFSAGjtCbDGTNV2AH8w9OU4xEmNz8c5lyoA=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2016-11-
|
38
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: mongrel2
|
@@ -236,12 +236,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
236
236
|
version: 2.3.1
|
237
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
|
-
- - "
|
239
|
+
- - ">="
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
241
|
+
version: '0'
|
242
242
|
requirements: []
|
243
243
|
rubyforge_project:
|
244
|
-
rubygems_version: 2.
|
244
|
+
rubygems_version: 2.6.8
|
245
245
|
signing_key:
|
246
246
|
specification_version: 4
|
247
247
|
summary: This is a basic image-processor plugin for the Thingfish digital asset manager
|
metadata.gz.sig
ADDED
Binary file
|