dragonfly 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of dragonfly might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 785986a8487e1cb1e971e16b2eb88dc51794d490
4
- data.tar.gz: e76af75be5d2f6a224a042ab4f6b53dd8de93e5d
3
+ metadata.gz: 318cb26946caa19202dc1c572f4b64014a35e08a
4
+ data.tar.gz: 5ef7ed322415297775465630d3ae4bc65cfefdf9
5
5
  SHA512:
6
- metadata.gz: 528e4445092921b2c590cf787c6a23aa1a0c3f912ae9bea19416f60672605693735d33d0c6f709334c68555b087afeb7b72bfd7666187c3745eecc9fb891d27f
7
- data.tar.gz: c814aa4308afd5bb698c3e2f61605ffe6650d244fe8fbe3d84b843cf266c4e5ad9ea062d0bf0195b0856f758b213331e1d5ee9f4f1349fcd9dcd63710dcf0e8d
6
+ metadata.gz: fa6361437c7a1e6e9b0d963d989d171f3fe3518d224b91666ca61a93729f0147bfad254e898231b86215e280125850ad9bcda2dc2c60b17bf6387274a29967fa
7
+ data.tar.gz: 541b9b2ac910788a66af52937abb7d6674798dfdbd6de385fe5095e7fa8db6c82c5588ff6e1fe2a11bed8dcb7e00158b378fb9585aab723d39ad5d8fed764cc7
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ 1.1.3 (2017-06-02)
2
+ ===================
3
+ Fixes
4
+ -----
5
+ - Make sure imagemagick convert processor updates mime_type correctly when format is changed
6
+
1
7
  1.1.2 (2017-05-06)
2
8
  ===================
3
9
  Fixes
data/README.md CHANGED
@@ -44,7 +44,7 @@ Installation
44
44
 
45
45
  or in your Gemfile
46
46
  ```ruby
47
- gem 'dragonfly', '~> 1.1.2'
47
+ gem 'dragonfly', '~> 1.1.3'
48
48
  ```
49
49
 
50
50
  Require with
@@ -18,6 +18,7 @@ module Dragonfly
18
18
  if format
19
19
  content.meta['format'] = format.to_s
20
20
  content.ext = format
21
+ content.meta['mime_type'] = nil # don't need it as we have ext now
21
22
  end
22
23
  end
23
24
 
@@ -1,3 +1,3 @@
1
1
  module Dragonfly
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
@@ -67,4 +67,22 @@ describe Dragonfly::ImageMagick::Processors::Convert do
67
67
  processor.call(image, '', 'format' => 'jpg', 'delegate' => 'png')
68
68
  }.to call_command(app.shell, %r{'convert' 'png:/[^']+?/beach\.png' '/[^']+?\.jpg'})
69
69
  end
70
+
71
+ it "maintains the mime_type meta if it exists already" do
72
+ processor.call(image, '-resize 10x')
73
+ image.meta['mime_type'].should be_nil
74
+
75
+ image.add_meta('mime_type' => 'image/png')
76
+ processor.call(image, '-resize 5x')
77
+ image.meta['mime_type'].should == 'image/png'
78
+ image.mime_type.should == 'image/png' # sanity check
79
+ end
80
+
81
+ it "doesn't maintain the mime_type meta on format change" do
82
+ image.add_meta('mime_type' => 'image/png')
83
+ processor.call(image, '', 'format' => 'gif')
84
+ image.meta['mime_type'].should be_nil
85
+ image.mime_type.should == 'image/gif' # sanity check
86
+ end
87
+
70
88
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-06 00:00:00.000000000 Z
11
+ date: 2017-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack