ddr-models 2.4.5 → 2.4.6

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: 5cf8b40bd52079862750467ee9bc03e43208e871
4
- data.tar.gz: 82d98b1e9957e594817279341b757b4d79a60995
3
+ metadata.gz: e01bbd2e47ba6a38f71653a7abcac2db6b73e438
4
+ data.tar.gz: 4e5eb3511d2e31f86879fd1b8d2ff9ab12f994ef
5
5
  SHA512:
6
- metadata.gz: 60c81c48f1f0d0182ca33559c0c0d4f61f3ba9f4ebfff82e870903ae4b53c4edadc754afbfcee57f7f16422ac6c17a59bbf42846d1dc4cdcbca3edf06b150805
7
- data.tar.gz: f9df42eca800507982c210c3b606973af618c6d48c563d5a46481badd987f75d977d69a79448249590e5d8571ba5b2d6e8411b02c0cbd59bddc31781a5f64262
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
@@ -1,5 +1,5 @@
1
1
  module Ddr
2
2
  module Models
3
- VERSION = "2.4.5"
3
+ VERSION = "2.4.6"
4
4
  end
5
5
  end
@@ -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.5
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-16 00:00:00.000000000 Z
12
+ date: 2016-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails