ddr-core 1.14.0 → 1.15.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cf41723ee6c99b09acb09d17308f10f881d5e89c564fab81901fda438565606
|
4
|
+
data.tar.gz: 81c26a26394b4b6d1dc6a8dbf686d0a3ffbba7aa974bffd9b2c2ad7ba4dd0028
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fba1af2dbbf5b2f4039f819acfeb7f00b88ec7f8fafc3df6097ff08b27a6f97c921055338cacacb332820ab11260e1a32a0557711d8d01d047e4f30761fa5475
|
7
|
+
data.tar.gz: a69fba46869f6e99e228f032f436af6e926d14e29d1a80e3b6ac8b88d429869f6c591b6987bda3e230cae26cd4df8fee345fec0119573b81f1895aa4d1ef6ec1
|
@@ -202,29 +202,6 @@ module Ddr
|
|
202
202
|
resource.finding_aid
|
203
203
|
end
|
204
204
|
|
205
|
-
def intermediate_type
|
206
|
-
if has_intermediate_file?
|
207
|
-
resource.intermediate_type
|
208
|
-
end
|
209
|
-
end
|
210
|
-
|
211
|
-
def intermediate_path
|
212
|
-
if has_intermediate_file?
|
213
|
-
resource.intermediate_path
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
|
-
def intermediate_extension
|
218
|
-
if has_intermediate_file?
|
219
|
-
extensions = Ddr.preferred_file_extensions
|
220
|
-
if extensions.include? intermediate_type
|
221
|
-
extensions[intermediate_type]
|
222
|
-
else
|
223
|
-
intermediate_extension_default
|
224
|
-
end
|
225
|
-
end
|
226
|
-
end
|
227
|
-
|
228
205
|
def captionable?
|
229
206
|
resource.captionable?
|
230
207
|
end
|
@@ -345,10 +322,6 @@ module Ddr
|
|
345
322
|
structure['default'] || structure.values.first
|
346
323
|
end
|
347
324
|
|
348
|
-
def intermediate_extension_default
|
349
|
-
resource.intermediate_file.default_file_extension
|
350
|
-
end
|
351
|
-
|
352
325
|
def caption_extension_default
|
353
326
|
resource.caption.default_file_extension
|
354
327
|
end
|
data/app/models/ddr/component.rb
CHANGED
@@ -6,7 +6,6 @@ module Ddr
|
|
6
6
|
include HasContent
|
7
7
|
include HasDerivedImage
|
8
8
|
include HasExtractedText
|
9
|
-
include HasIntermediateFile
|
10
9
|
include HasMultiresImage
|
11
10
|
include HasParent
|
12
11
|
include Streamable
|
@@ -14,6 +13,7 @@ module Ddr
|
|
14
13
|
alias_method :item_id, :parent_id
|
15
14
|
alias_method :item, :parent
|
16
15
|
|
16
|
+
attribute :intermediate_file, Ddr::File.optional
|
17
17
|
attribute :target_id, Valkyrie::Types::ID.optional
|
18
18
|
|
19
19
|
self.parent_class = Ddr::Item
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddr-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Coble
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-
|
14
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activeresource
|
@@ -315,7 +315,6 @@ files:
|
|
315
315
|
- app/models/concerns/ddr/has_content.rb
|
316
316
|
- app/models/concerns/ddr/has_derived_image.rb
|
317
317
|
- app/models/concerns/ddr/has_extracted_text.rb
|
318
|
-
- app/models/concerns/ddr/has_intermediate_file.rb
|
319
318
|
- app/models/concerns/ddr/has_multires_image.rb
|
320
319
|
- app/models/concerns/ddr/has_parent.rb
|
321
320
|
- app/models/concerns/ddr/has_struct_metadata.rb
|
@@ -451,7 +450,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
451
450
|
- !ruby/object:Gem::Version
|
452
451
|
version: '0'
|
453
452
|
requirements: []
|
454
|
-
rubygems_version: 3.3.
|
453
|
+
rubygems_version: 3.3.22
|
455
454
|
signing_key:
|
456
455
|
specification_version: 4
|
457
456
|
summary: Models used in the Duke Digital Repository
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Ddr
|
2
|
-
module HasIntermediateFile
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
included do
|
6
|
-
attribute :intermediate_file, Ddr::File.optional
|
7
|
-
end
|
8
|
-
|
9
|
-
def intermediate_type
|
10
|
-
intermediate_file&.media_type
|
11
|
-
end
|
12
|
-
|
13
|
-
# This method is used in dul-hydra 'ComponentsController'
|
14
|
-
def intermediate_extension
|
15
|
-
if filename = intermediate_file&.original_filename
|
16
|
-
::File.extname(filename)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def intermediate_path
|
21
|
-
intermediate_file&.file&.disk_path
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|