ddr-core 1.6.3 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -10
- data/app/models/concerns/ddr/has_content.rb +0 -87
- data/app/models/ddr/digest.rb +4 -0
- data/app/models/ddr/file.rb +4 -0
- data/lib/ddr/core.rb +2 -2
- data/lib/ddr/index/fields.rb +2 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22911e9ad5452855fb5b40ef580f328296e41a1abd7a9ed589a6d2015eb745a1
|
4
|
+
data.tar.gz: 8191a791a07c581ede3d65b555bea9f123e218eeaf629f69210f4d7f000b0cc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1059b1a44d54aa2a3fa9003e4d1f0733563e606fa53160eaee724f2f9333f1bb21d5313bbaf43318abe354fca4baeca55b8288bf2924b42ed6ba62ee7adcd60
|
7
|
+
data.tar.gz: b909f0636e55d0b69e48e9593320c141c66229eaa772656dd064f2e26899a48819d03a4d5099791024b10f167713700fc53baf829b2366d81816df25b16791f0
|
data/README.md
CHANGED
@@ -10,19 +10,11 @@ Change to the `.docker` directory.
|
|
10
10
|
|
11
11
|
Start the *development* stack:
|
12
12
|
|
13
|
-
$ ./dev.sh up -d
|
13
|
+
$ ./dev.sh up -d
|
14
14
|
|
15
15
|
To run a Bash shell on the app server:
|
16
16
|
|
17
|
-
$ ./dev.sh
|
18
|
-
|
19
|
-
To connect to the *development* database:
|
20
|
-
|
21
|
-
$ ./dev.sh run --rm app psql -U postgres -h db -d ddr_core
|
22
|
-
|
23
|
-
To run the *test suite*:
|
24
|
-
|
25
|
-
$ ./run_test_suite.sh
|
17
|
+
$ ./dev.sh exec app bash
|
26
18
|
|
27
19
|
Stop the *development* stack:
|
28
20
|
|
@@ -6,55 +6,9 @@ module Ddr
|
|
6
6
|
attribute :content, Ddr::File.optional
|
7
7
|
attribute :fits_file, Ddr::File.optional
|
8
8
|
|
9
|
-
### DDRevo ################################################
|
10
|
-
# Extracted text factored out to separate concern -- Ddr::HasExtractedText
|
11
|
-
### DDRevo ################################################
|
12
|
-
# has_file_datastream \
|
13
|
-
# name: Ddr::Datastreams::EXTRACTED_TEXT,
|
14
|
-
# type: Ddr::Datastreams::PlainTextDatastream,
|
15
|
-
# versionable: true,
|
16
|
-
# label: "Text extracted from the content file",
|
17
|
-
# control_group: "M"
|
18
|
-
#
|
19
|
-
|
20
9
|
delegate :original_filename, to: :content, allow_nil: true
|
21
|
-
|
22
|
-
#######DDRevo#########
|
23
|
-
# expect that the FileManagement module will go to staff app
|
24
|
-
#######DDRevo#########
|
25
|
-
# include FileManagement
|
26
|
-
#
|
27
|
-
#######DDRevo#########
|
28
|
-
# to staff app
|
29
|
-
#######DDRevo#########
|
30
|
-
# delegate :validate_checksum!, to: :content
|
31
10
|
end
|
32
11
|
|
33
|
-
#######DDRevo#########
|
34
|
-
# to staff app
|
35
|
-
#######DDRevo#########
|
36
|
-
# # Convenience method wrapping FileManagement#add_file
|
37
|
-
# def upload file, opts={}
|
38
|
-
# add_file(file, Ddr::Datastreams::CONTENT, opts)
|
39
|
-
# end
|
40
|
-
#
|
41
|
-
#######DDRevo#########
|
42
|
-
# to staff app
|
43
|
-
#######DDRevo#########
|
44
|
-
# # Set content to file and save
|
45
|
-
# def upload! file, opts={}
|
46
|
-
# upload(file, opts)
|
47
|
-
# save
|
48
|
-
# end
|
49
|
-
#
|
50
|
-
#######DDRevo#########
|
51
|
-
# DerivativesManager will go to staff app. Need to determine if there is a need for a '#derivatives' method on
|
52
|
-
# content-bearing objects and, if so, what it should return
|
53
|
-
#######DDRevo#########
|
54
|
-
# def derivatives
|
55
|
-
# @derivatives ||= Ddr::Managers::DerivativesManager.new(self)
|
56
|
-
# end
|
57
|
-
#
|
58
12
|
def techmd
|
59
13
|
@techmd ||= Ddr::Managers::TechnicalMetadataManager.new(self)
|
60
14
|
end
|
@@ -80,10 +34,6 @@ module Ddr
|
|
80
34
|
content_type&.split("/")&.last
|
81
35
|
end
|
82
36
|
|
83
|
-
# def content_type= mime_type
|
84
|
-
# self.content.mimeType = mime_type
|
85
|
-
# end
|
86
|
-
#
|
87
37
|
def image?
|
88
38
|
content_major_type == "image"
|
89
39
|
end
|
@@ -92,42 +42,5 @@ module Ddr
|
|
92
42
|
content_type == "application/pdf"
|
93
43
|
end
|
94
44
|
|
95
|
-
# def virus_checks
|
96
|
-
# Ddr::Events::VirusCheckEvent.for_object(self)
|
97
|
-
# end
|
98
|
-
#
|
99
|
-
# def last_virus_check
|
100
|
-
# virus_checks.last
|
101
|
-
# end
|
102
|
-
#
|
103
|
-
# def last_virus_check_on
|
104
|
-
# last_virus_check && last_virus_check.event_date_time
|
105
|
-
# end
|
106
|
-
#
|
107
|
-
# def last_virus_check_outcome
|
108
|
-
# last_virus_check && last_virus_check.outcome
|
109
|
-
# end
|
110
|
-
#
|
111
|
-
# def content_changed?
|
112
|
-
# content.external? ? content.dsLocation_changed? : content.content_changed?
|
113
|
-
# end
|
114
|
-
#
|
115
|
-
### DDRevo ###########################################
|
116
|
-
# Moved to Ddr::Resource where other 'has_<file>?' methods reside
|
117
|
-
### DDRevo ###########################################
|
118
|
-
# def has_extracted_text?
|
119
|
-
# extractedText.has_content?
|
120
|
-
# end
|
121
|
-
#
|
122
|
-
# def with_content_file(&block)
|
123
|
-
# WithContentFile.new(self, &block)
|
124
|
-
# end
|
125
|
-
#
|
126
|
-
# protected
|
127
|
-
#
|
128
|
-
# def default_content_type
|
129
|
-
# "application/octet-stream"
|
130
|
-
# end
|
131
|
-
|
132
45
|
end
|
133
46
|
end
|
data/app/models/ddr/digest.rb
CHANGED
data/app/models/ddr/file.rb
CHANGED
data/lib/ddr/core.rb
CHANGED
@@ -71,7 +71,7 @@ module Ddr
|
|
71
71
|
'audio/ogg' => 'ogg',
|
72
72
|
'audio/wav' => 'wav',
|
73
73
|
'text/vtt' => 'vtt',
|
74
|
-
'video/flv'
|
74
|
+
'video/x-flv' => 'flv',
|
75
75
|
'video/mp4' => 'mp4',
|
76
76
|
'video/quicktime' => 'mov',
|
77
77
|
'video/webm' => 'webm'
|
@@ -83,7 +83,7 @@ module Ddr
|
|
83
83
|
{
|
84
84
|
'.aac' => 'audio/mp4',
|
85
85
|
'.f4a' => 'audio/mp4',
|
86
|
-
'.flv' => 'video/flv',
|
86
|
+
'.flv' => 'video/x-flv',
|
87
87
|
'.m2t' => 'video/vnd.dlna.mpeg-tts',
|
88
88
|
'.m2ts' => 'video/m2ts',
|
89
89
|
'.m4a' => 'audio/mp4',
|
data/lib/ddr/index/fields.rb
CHANGED
@@ -28,6 +28,7 @@ module Ddr::Index
|
|
28
28
|
COMPANY_FACET = Field.new :company_facet, :facetable
|
29
29
|
COMPOSER_FACET = Field.new :composer_facet, :facetable
|
30
30
|
CONTENT_CREATE_DATE = Field.new :content_create_date, :stored_sortable, type: :date
|
31
|
+
CONTENT_SHA1 = Field.new :content_sha1, :stored_sortable
|
31
32
|
CONTENT_SIZE = Field.new :content_size, solr_name: "content_size_lsi"
|
32
33
|
CONTENT_SIZE_HUMAN = Field.new :content_size_human, :symbol
|
33
34
|
CONTENTDM_ID = Field.new :contentdm_id, :stored_sortable
|
@@ -37,6 +38,7 @@ module Ddr::Index
|
|
37
38
|
DATE_SORT = Field.new :date_sort, :sortable
|
38
39
|
DC_IS_PART_OF = Field.new :isPartOf, :symbol
|
39
40
|
DEPOSITOR = Field.new :depositor, :stored_sortable
|
41
|
+
DERIVED_IMAGE_FILE_PATH = Field.new :derived_image_file_path, :stored_sortable
|
40
42
|
# DDR-1997 - description should always be indexed as _tesim regardless of length - Valkyrie indexes fields > 1000
|
41
43
|
# characters in length as _tsim only
|
42
44
|
DESCRIPTION = Field.new :description, :stored_searchable # stored_searchable produces _tesim
|
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.7.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: 2021-
|
14
|
+
date: 2021-11-05 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activeresource
|
@@ -269,16 +269,16 @@ dependencies:
|
|
269
269
|
name: rspec-rails
|
270
270
|
requirement: !ruby/object:Gem::Requirement
|
271
271
|
requirements:
|
272
|
-
- - "
|
272
|
+
- - "~>"
|
273
273
|
- !ruby/object:Gem::Version
|
274
|
-
version: '
|
274
|
+
version: '4.1'
|
275
275
|
type: :development
|
276
276
|
prerelease: false
|
277
277
|
version_requirements: !ruby/object:Gem::Requirement
|
278
278
|
requirements:
|
279
|
-
- - "
|
279
|
+
- - "~>"
|
280
280
|
- !ruby/object:Gem::Version
|
281
|
-
version: '
|
281
|
+
version: '4.1'
|
282
282
|
- !ruby/object:Gem::Dependency
|
283
283
|
name: solr_wrapper
|
284
284
|
requirement: !ruby/object:Gem::Requirement
|
@@ -455,7 +455,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
455
455
|
- !ruby/object:Gem::Version
|
456
456
|
version: '0'
|
457
457
|
requirements: []
|
458
|
-
rubygems_version: 3.2.
|
458
|
+
rubygems_version: 3.2.30
|
459
459
|
signing_key:
|
460
460
|
specification_version: 4
|
461
461
|
summary: Models used in the Duke Digital Repository
|