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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94cec81297dc83ba31fc6dfcf4b258688c4b232c
4
- data.tar.gz: 5906271b9d85a5bc5f7da0a55f553d8e4ede3310
3
+ metadata.gz: 71abb68f2697e12cca499539898150e567ba6381
4
+ data.tar.gz: 250cff10b3af2aa083985b4636cda38c12ec179e
5
5
  SHA512:
6
- metadata.gz: 74ad63442c9b7cb228c955f172ded4091cf25a1267581d323f9ad8b9a526ce37eb546a81fb0c3d50c18ae03dfe4749dcc26ecfe85897734cdd7140da3f6ac6d5
7
- data.tar.gz: 89fd3b8a06e6bce83d42238472dad1b503863f8676579e3d2561aa62c59b3e4937a889c5ebe79ae95180cc89598d0f249babb1b60e13e5219b2329962b7dcafc
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] [tip]
18
+ [e04ece44aa56]
7
19
 
8
20
  2016-11-13 Michael Granger <ged@FaerieMUD.org>
9
21
 
data/History.md CHANGED
@@ -1,4 +1,9 @@
1
- ## v0.1.0 [YYYY-MM-DD] Michael Granger <ged@FaerieMUD.org>
1
+ ## v0.1.1 [2016-11-16] Michael Granger <ged@FaerieMUD.org>
2
2
 
3
- Initial release.
3
+ Build system fix only.
4
+
5
+
6
+ ## v0.1.0 [2016-11-16] Michael Granger <ged@FaerieMUD.org>
7
+
8
+ (Never released)
4
9
 
data/Rakefile CHANGED
@@ -14,7 +14,6 @@ Hoe.plugin :signing
14
14
  Hoe.plugin :deveiate
15
15
 
16
16
  Hoe.plugins.delete :rubyforge
17
- Hoe.plugins.delete :gemcutter # Remove for public gems
18
17
 
19
18
  hoespec = Hoe.spec 'thingfish-processor-image' do |spec|
20
19
  spec.readme_file = 'README.md'
@@ -18,10 +18,10 @@ class Thingfish::Processor::Image < Thingfish::Processor
18
18
 
19
19
 
20
20
  # Package version
21
- VERSION = '0.1.0'
21
+ VERSION = '0.1.1'
22
22
 
23
23
  # Version control revision
24
- REVISION = %q$Revision: e04ece44aa56 $
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
- self.log.debug " making a flattened image out of %p" % [ request.body.path ]
114
- list = Magick::ImageList.new( request.body.path )
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
- image.destroy!
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.0.pre20161114102625
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-14 00:00:00.000000000 Z
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: 1.3.1
241
+ version: '0'
242
242
  requirements: []
243
243
  rubyforge_project:
244
- rubygems_version: 2.5.1
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