ddr-models 2.4.5 → 2.4.6
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e01bbd2e47ba6a38f71653a7abcac2db6b73e438
|
4
|
+
data.tar.gz: 4e5eb3511d2e31f86879fd1b8d2ff9ab12f994ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cee3c59573413499ff0a3362aa75b811e177a3119612e2805102e96dc7d49b2cbfc96fbcde6bdf95a7df74a98176042790b2bf18c22ae3d3099c470c6071143
|
7
|
+
data.tar.gz: 7225dd1b450f4491cc3fe079ee3b17bc55382665c945be0667bcd722ba95162a654f1ab733748a0f8ff4ac5ba167a760faeb761df42d0e2ef816440602219fe5
|
@@ -112,7 +112,7 @@ module Ddr
|
|
112
112
|
return false unless object.has_content?
|
113
113
|
case derivative.name
|
114
114
|
when :multires_image
|
115
|
-
object.content_type == "image/tiff"
|
115
|
+
object.content_type == "image/tiff" || object.content_type == "image/jpeg"
|
116
116
|
when :thumbnail
|
117
117
|
object.image?
|
118
118
|
else
|
data/lib/ddr/models/version.rb
CHANGED
@@ -57,6 +57,14 @@ module Ddr
|
|
57
57
|
end
|
58
58
|
context "content is not tiff image" do
|
59
59
|
let(:file) { fixture_file_upload("bird.jpg", "image/jpeg") }
|
60
|
+
it "should generate a thumbnail and a ptif" do
|
61
|
+
expect(object.derivatives).to receive(:generate_derivative!).with(Ddr::Derivatives::DERIVATIVES[:thumbnail])
|
62
|
+
expect(object.derivatives).to receive(:generate_derivative!).with(Ddr::Derivatives::DERIVATIVES[:multires_image])
|
63
|
+
object.derivatives.update_derivatives(:now)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
context "content is not tiff or jpeg image" do
|
67
|
+
let(:file) { fixture_file_upload("arrow1rightred_e0.gif", "image/gif") }
|
60
68
|
it "should generate a thumbnail but not a ptif" do
|
61
69
|
expect(object.derivatives).to receive(:generate_derivative!).with(Ddr::Derivatives::DERIVATIVES[:thumbnail])
|
62
70
|
expect(object.derivatives).to_not receive(:generate_derivative!).with(Ddr::Derivatives::DERIVATIVES[:multires_image])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddr-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Coble
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|