hyrax 5.0.0.rc1 → 5.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +11 -4
- data/.dassie/.env +5 -1
- data/.dassie/Gemfile +27 -42
- data/.dassie/Gemfile.dassie +2 -0
- data/.dassie/app/assets/config/manifest.js +2 -0
- data/.dassie/app/assets/stylesheets/hyrax.scss +1 -0
- data/.dassie/config/initializers/riiif.rb +5 -11
- data/.dassie/config/metadata/collection_resource.yaml +3 -0
- data/.dassie/config/metadata/monograph.yaml +8 -0
- data/.dassie/config/metadata/sample_metadata.yaml +1 -0
- data/.dassie/config/redis.yml +2 -0
- data/.dassie/db/migrate/20230725222727_create_hyrax_counter_metrics.hyrax.rb +14 -0
- data/.dassie/db/migrate/20230803165135_change_work_id_to_string.rb +5 -0
- data/.dassie/db/migrate/20230808102105_add_indices_to_hyrax_counter_metrics.hyrax.rb +8 -0
- data/.dassie/db/migrate/20230821153635_add_fields_to_counter_metric.rb +8 -0
- data/.dassie/db/schema.rb +20 -1
- data/.dockerignore +2 -1
- data/.gitignore +1 -1
- data/.koppie/.env +10 -4
- data/.koppie/Gemfile +10 -12
- data/.koppie/Gemfile.koppie +2 -0
- data/.koppie/Rakefile +0 -2
- data/.koppie/app/forms/collection_resource_form.rb +0 -1
- data/.koppie/app/indexers/collection_resource_indexer.rb +0 -1
- data/.koppie/app/models/ability.rb +1 -5
- data/.koppie/app/models/collection_resource.rb +0 -1
- data/.koppie/app/models/user.rb +0 -2
- data/.koppie/config/application.rb +2 -1
- data/.koppie/config/arkivo.yml +6 -0
- data/.koppie/config/blacklight.yml +2 -2
- data/.koppie/config/features.yml +2 -0
- data/.koppie/config/initializers/1_valkyrie.rb +29 -6
- data/.koppie/config/initializers/arkivo_constraint.rb +12 -0
- data/.koppie/config/initializers/hyrax.rb +2 -2
- data/.koppie/config/initializers/riiif.rb +6 -11
- data/.koppie/config/metadata/collection_resource.yaml +177 -1
- data/.koppie/config/metadata/generic_work.yaml +2 -0
- data/.koppie/config/metadata/monograph.yaml +10 -0
- data/.koppie/config/role_map.yml +3 -25
- data/.koppie/config/routes.rb +1 -2
- data/.koppie/config/solr.yml +1 -1
- data/.koppie/config/valkyrie_index.yml +4 -10
- data/.koppie/config/zotero.yml +6 -0
- data/.koppie/db/migrate/20230725222727_create_hyrax_counter_metrics.hyrax.rb +14 -0
- data/.koppie/db/migrate/20230803165135_change_work_id_to_string.rb +5 -0
- data/.koppie/db/schema.rb +12 -1
- data/CONTAINERS.md +1 -3
- data/Dockerfile +11 -2
- data/Gemfile +4 -21
- data/Gemfile.dassie +2 -0
- data/Gemfile.koppie +2 -0
- data/README.md +0 -1
- data/Rakefile +0 -11
- data/app/actors/hyrax/actors/embargo_actor.rb +3 -6
- data/app/assets/javascripts/hyrax/batch_select_all.js +1 -1
- data/app/assets/javascripts/hyrax/file_manager/member.es6 +1 -1
- data/app/assets/stylesheets/hyrax/_file-listing.scss +0 -2
- data/app/assets/stylesheets/hyrax/_work-show.scss +19 -3
- data/app/assets/stylesheets/hyrax/sidebar.scss +23 -0
- data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +7 -1
- data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +7 -1
- data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +14 -9
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +50 -9
- data/app/controllers/hyrax/api/items_controller.rb +2 -3
- data/app/controllers/hyrax/batch_edits_controller.rb +6 -6
- data/app/controllers/hyrax/batch_uploads_controller.rb +5 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +4 -1
- data/app/controllers/hyrax/file_sets_controller.rb +49 -6
- data/app/controllers/hyrax/my/collections_controller.rb +2 -0
- data/app/controllers/hyrax/single_use_links_viewer_controller.rb +16 -2
- data/app/forms/concerns/hyrax/basic_metadata_form_fields_behavior.rb +38 -0
- data/app/forms/hyrax/forms/collection_form.rb +0 -15
- data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +0 -34
- data/app/forms/hyrax/forms/file_set_form.rb +2 -2
- data/app/forms/hyrax/forms/pcdm_object_form.rb +21 -0
- data/app/forms/hyrax/forms/permission_template_form.rb +0 -7
- data/app/forms/hyrax/forms/resource_batch_edit_form.rb +49 -21
- data/app/forms/hyrax/forms/resource_form.rb +21 -34
- data/app/helpers/hyrax/dashboard_helper_behavior.rb +13 -0
- data/app/indexers/hyrax/location_indexer.rb +29 -0
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +0 -8
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +1 -6
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +1 -0
- data/app/inputs/controlled_vocabulary_input.rb +1 -1
- data/app/jobs/characterize_job.rb +1 -1
- data/app/jobs/create_work_job.rb +36 -4
- data/app/jobs/valkyrie_characterization_job.rb +9 -0
- data/app/jobs/valkyrie_ingest_job.rb +1 -3
- data/app/models/collection_branding_info.rb +2 -9
- data/app/models/concerns/hyrax/ability.rb +2 -1
- data/app/models/concerns/hyrax/collection_behavior.rb +4 -12
- data/app/models/concerns/hyrax/riiif_file.rb +30 -0
- data/app/models/concerns/hyrax/solr_document_behavior.rb +19 -2
- data/app/models/hyrax/counter_metric.rb +7 -0
- data/app/models/hyrax/file_metadata.rb +3 -2
- data/app/models/hyrax/file_set.rb +75 -22
- data/app/models/hyrax/orcid_validator.rb +0 -6
- data/app/models/hyrax/work.rb +2 -5
- data/app/presenters/hyrax/collection_presenter.rb +0 -17
- data/app/presenters/hyrax/embargo_presenter.rb +4 -0
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +6 -4
- data/app/presenters/hyrax/version_list_presenter.rb +19 -10
- data/app/presenters/hyrax/version_presenter.rb +19 -4
- data/app/services/hyrax/admin_set_create_service.rb +0 -17
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +5 -0
- data/app/services/hyrax/collections/collection_member_service.rb +1 -1
- data/app/services/hyrax/embargo_manager.rb +45 -18
- data/app/services/hyrax/embargo_service.rb +12 -10
- data/app/services/hyrax/file_set_derivatives_service.rb +11 -11
- data/app/services/hyrax/fixity_check_failure_service.rb +1 -1
- data/app/services/hyrax/identifier/dispatcher.rb +9 -2
- data/app/services/hyrax/listeners/file_metadata_listener.rb +14 -6
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +2 -28
- data/app/services/hyrax/listeners/metadata_index_listener.rb +11 -0
- data/app/services/hyrax/lock_manager.rb +1 -2
- data/app/services/hyrax/riiif_file_resolver.rb +50 -0
- data/app/services/hyrax/simple_schema_loader.rb +31 -0
- data/app/services/hyrax/valkyrie_persist_derivatives.rb +1 -1
- data/app/services/hyrax/valkyrie_upload.rb +12 -26
- data/app/services/hyrax/versioning_service.rb +29 -15
- data/app/services/hyrax/work_uploads_handler.rb +1 -1
- data/app/validators/hyrax/collection_membership_validator.rb +1 -1
- data/app/views/catalog/_search_form.html.erb +1 -1
- data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
- data/app/views/hyrax/base/_file_manager_resource_form.html.erb +1 -1
- data/app/views/hyrax/base/_form_visibility_component.html.erb +4 -4
- data/app/views/hyrax/base/_show_actions.html.erb +1 -1
- data/app/views/hyrax/base/_workflow_actions.html.erb +25 -23
- data/app/views/hyrax/base/show.json.jbuilder +2 -1
- data/app/views/hyrax/collections/_show_document_list_row.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_show_document_list_row.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb +3 -3
- data/app/views/hyrax/file_sets/_versioning.html.erb +5 -5
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +4 -4
- data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +2 -2
- data/app/views/hyrax/my/_search_form.html.erb +1 -1
- data/app/views/hyrax/notifications/_notifications.html.erb +1 -1
- data/app/views/hyrax/users/_vitals.html.erb +1 -1
- data/bin/dev-entrypoint.sh +13 -0
- data/chart/hyrax/Chart.yaml +3 -3
- data/chart/hyrax/templates/_helpers.tpl +8 -0
- data/chart/hyrax/templates/configmap-env.yaml +1 -1
- data/chart/hyrax/values.yaml +3 -0
- data/config/initializers/file_length_patch.rb +10 -0
- data/config/metadata/basic_metadata.yaml +52 -0
- data/config/metadata/core_metadata.yaml +4 -0
- data/config/metadata/file_set_metadata.yaml +19 -0
- data/config/metadata/hyrax_internal_metadata.yaml +57 -0
- data/docker-compose-koppie.yml +23 -22
- data/docker-compose-sirenia.yml +202 -0
- data/docker-compose.yml +27 -24
- data/documentation/developing-your-hyrax-based-app.md +2 -2
- data/hyrax.gemspec +10 -11
- data/karma.conf.js +1 -1
- data/lib/generators/hyrax/collection_resource/templates/collection_metadata.yaml +2 -0
- data/lib/generators/hyrax/templates/config/initializers/riiif.rb +13 -19
- data/lib/generators/hyrax/templates/db/migrate/20230725222727_create_hyrax_counter_metrics.rb.erb +14 -0
- data/lib/generators/hyrax/templates/db/migrate/20230803165135_change_work_id_to_string.rb.erb +5 -0
- data/lib/generators/hyrax/templates/db/migrate/20230808102105_add_indices_to_hyrax_counter_metrics.rb.erb +8 -0
- data/lib/generators/hyrax/templates/db/migrate/20230821153635_add_fields_to_counter_metric.rb.erb +8 -0
- data/lib/generators/hyrax/templates/db/seeds.rb +1 -1
- data/lib/generators/hyrax/work_resource/templates/form.rb.erb +1 -1
- data/lib/generators/hyrax/work_resource/templates/metadata.yaml +2 -0
- data/lib/hyrax/configuration.rb +147 -49
- data/lib/hyrax/controlled_vocabularies/location.rb +7 -1
- data/lib/hyrax/engine.rb +0 -1
- data/lib/hyrax/form_fields.rb +6 -0
- data/lib/hyrax/publisher.rb +4 -0
- data/lib/hyrax/redis_event_store.rb +7 -8
- data/lib/hyrax/resource_name.rb +4 -0
- data/lib/hyrax/specs/capybara.rb +25 -42
- data/lib/hyrax/specs/shared_specs/hydra_works.rb +34 -7
- data/lib/hyrax/specs/shared_specs/indexers.rb +24 -6
- data/lib/hyrax/transactions/collection_destroy.rb +3 -2
- data/lib/hyrax/transactions/container.rb +42 -0
- data/lib/hyrax/transactions/file_metadata_destroy.rb +20 -0
- data/lib/hyrax/transactions/file_set_destroy.rb +3 -1
- data/lib/hyrax/transactions/file_set_update.rb +21 -0
- data/lib/hyrax/transactions/steps/add_to_parent.rb +1 -1
- data/lib/hyrax/transactions/steps/delete_all_file_metadata.rb +46 -0
- data/lib/hyrax/transactions/steps/delete_all_file_sets.rb +46 -0
- data/lib/hyrax/transactions/steps/file_metadata_delete.rb +40 -0
- data/lib/hyrax/transactions/steps/remove_from_membership.rb +45 -0
- data/lib/hyrax/transactions/work_destroy.rb +3 -2
- data/lib/hyrax/version.rb +1 -1
- data/lib/tasks/collection_type_global_id.rake +9 -4
- data/lib/tasks/embargo_lease.rake +1 -0
- data/lib/valkyrie/indexing/solr/indexing_adapter.rb +2 -0
- data/lib/wings/active_fedora_converter.rb +6 -0
- data/lib/wings/attribute_transformer.rb +24 -17
- data/lib/wings/model_transformer.rb +0 -8
- data/lib/wings/orm_converter.rb +23 -18
- data/lib/wings/setup.rb +2 -2
- data/lib/wings/valkyrie/storage.rb +8 -90
- data/lib/wings.rb +5 -0
- data/tasks/hyrax_dev.rake +2 -33
- data/template.rb +1 -1
- metadata +90 -72
- data/.engine_cart.yml +0 -3
- data/app/views/hyrax/users/_user_util_links_extra.html.erb +0 -0
- data/lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb +0 -9
@@ -99,7 +99,7 @@ Hyrax.config do |config|
|
|
99
99
|
|
100
100
|
# Hyrax can integrate with Zotero's Arkivo service for automatic deposit
|
101
101
|
# of Zotero-managed research items.
|
102
|
-
|
102
|
+
config.arkivo_api = true
|
103
103
|
|
104
104
|
# Stream realtime notifications to users in the browser
|
105
105
|
# config.realtime_notifications = true
|
@@ -249,7 +249,7 @@ Hyrax.config do |config|
|
|
249
249
|
# Identify the model class name that will be used for Collections in your app
|
250
250
|
# (i.e. ::Collection for ActiveFedora, Hyrax::PcdmCollection for Valkyrie)
|
251
251
|
# config.collection_model = '::Collection'
|
252
|
-
config.collection_model = 'Hyrax::PcdmCollection'
|
252
|
+
# config.collection_model = 'Hyrax::PcdmCollection'
|
253
253
|
# Injected via `rails g hyrax:collection_resource CollectionResource`
|
254
254
|
config.collection_model = 'CollectionResource'
|
255
255
|
|
@@ -1,12 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
|
2
|
+
Rails.application.reloader.to_prepare do
|
4
3
|
Riiif::Image.info_service = lambda do |id, _file|
|
5
4
|
# id will look like a path to a pcdm:file
|
6
5
|
# (e.g. rv042t299%2Ffiles%2F6d71677a-4f80-42f1-ae58-ed1063fd79c7)
|
7
6
|
# but we just want the id for the FileSet it's attached to.
|
8
7
|
|
9
|
-
# Capture everything before the first slash
|
10
8
|
fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
|
11
9
|
resp = Hyrax::SolrService.get("id:#{fs_id}")
|
12
10
|
doc = resp['response']['docs'].first
|
@@ -15,24 +13,21 @@ ActiveSupport::Reloader.to_prepare do
|
|
15
13
|
end
|
16
14
|
|
17
15
|
if Hyrax.config.use_valkyrie?
|
18
|
-
|
19
|
-
# id comes in with the format "FILE_SET_ID/files/FILE_ID"
|
20
|
-
Riiif::Image.file_resolver.id_to_uri = lambda do |id|
|
21
|
-
file_metadata = Hyrax.query_service.find_by(id: id.split('/').last)
|
22
|
-
file = Hyrax.storage_adapter.find_by(id: file_metadata.file_identifier)
|
23
|
-
file.disk_path.to_s
|
24
|
-
end
|
16
|
+
Riiif::Image.file_resolver = Hyrax::RiiifFileResolver.new
|
25
17
|
else
|
18
|
+
Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
|
19
|
+
|
26
20
|
Riiif::Image.file_resolver.id_to_uri = lambda do |id|
|
27
21
|
Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
|
28
22
|
Rails.logger.info "Riiif resolved #{id} to #{url}"
|
29
23
|
end
|
30
24
|
end
|
31
25
|
end
|
26
|
+
|
32
27
|
Riiif::Image.authorization_service = Hyrax::IiifAuthorizationService
|
33
28
|
|
34
29
|
Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
35
30
|
Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
36
31
|
|
37
|
-
Riiif::Engine.config.cache_duration =
|
32
|
+
Riiif::Engine.config.cache_duration = 1.day
|
38
33
|
end
|
@@ -2,6 +2,8 @@
|
|
2
2
|
# index key names, and form properties.
|
3
3
|
#
|
4
4
|
# Attributes must have a type but all other configuration options are optional.
|
5
|
+
# Please note: If using Valkyrie's Fedora Metadata Adapter, predicates for attributes
|
6
|
+
# must be placed here.
|
5
7
|
#
|
6
8
|
# attributes:
|
7
9
|
# attribute_name:
|
@@ -19,4 +21,178 @@
|
|
19
21
|
# Generated via
|
20
22
|
# `rails generate hyrax:collection_resource CollectionResource`
|
21
23
|
|
22
|
-
attributes:
|
24
|
+
attributes:
|
25
|
+
description:
|
26
|
+
type: string
|
27
|
+
multiple: true
|
28
|
+
form:
|
29
|
+
primary: true
|
30
|
+
index_keys:
|
31
|
+
- "description_tesim"
|
32
|
+
predicate: http://purl.org/dc/elements/1.1/description
|
33
|
+
creator:
|
34
|
+
type: string
|
35
|
+
multiple: true
|
36
|
+
form:
|
37
|
+
required: false
|
38
|
+
primary: false
|
39
|
+
index_keys:
|
40
|
+
- "creator_tesim"
|
41
|
+
predicate: http://purl.org/dc/elements/1.1/creator
|
42
|
+
rights_statement:
|
43
|
+
type: string
|
44
|
+
multiple: true
|
45
|
+
form:
|
46
|
+
primary: false
|
47
|
+
index_keys:
|
48
|
+
- "rights_statement_tesim"
|
49
|
+
predicate: http://www.europeana.eu/schemas/edm/rights
|
50
|
+
abstract:
|
51
|
+
type: string
|
52
|
+
multiple: true
|
53
|
+
form:
|
54
|
+
primary: false
|
55
|
+
index_keys:
|
56
|
+
- "abstract_tesim"
|
57
|
+
predicate: http://purl.org/dc/terms/abstract
|
58
|
+
access_right:
|
59
|
+
type: string
|
60
|
+
multiple: true
|
61
|
+
form:
|
62
|
+
primary: false
|
63
|
+
index_keys:
|
64
|
+
- "access_right_tesim"
|
65
|
+
predicate: http://purl.org/dc/terms/accessRights
|
66
|
+
alternative_title:
|
67
|
+
type: string
|
68
|
+
multiple: true
|
69
|
+
form:
|
70
|
+
primary: false
|
71
|
+
index_keys:
|
72
|
+
- "alternative_title_tesim"
|
73
|
+
predicate: http://purl.org/dc/terms/alternative
|
74
|
+
based_near:
|
75
|
+
type: string
|
76
|
+
multiple: true
|
77
|
+
form:
|
78
|
+
primary: false
|
79
|
+
index_keys:
|
80
|
+
- "based_near_sim"
|
81
|
+
- "based_near_tesim"
|
82
|
+
predicate: http://xmlns.com/foaf/0.1/based_near
|
83
|
+
bibliographic_citation:
|
84
|
+
type: string
|
85
|
+
multiple: true
|
86
|
+
predicate: http://purl.org/dc/terms/bibliographicCitation
|
87
|
+
contributor:
|
88
|
+
type: string
|
89
|
+
multiple: true
|
90
|
+
form:
|
91
|
+
primary: false
|
92
|
+
index_keys:
|
93
|
+
- "contributor_tesim"
|
94
|
+
predicate: http://purl.org/dc/elements/1.1/contributor
|
95
|
+
date_created:
|
96
|
+
type: date_time
|
97
|
+
multiple: true
|
98
|
+
form:
|
99
|
+
primary: false
|
100
|
+
index_keys:
|
101
|
+
- "date_created_tesim"
|
102
|
+
predicate: http://purl.org/dc/terms/created
|
103
|
+
identifier:
|
104
|
+
type: string
|
105
|
+
multiple: true
|
106
|
+
form:
|
107
|
+
primary: false
|
108
|
+
index_keys:
|
109
|
+
- "identifier_tesim"
|
110
|
+
predicate: http://purl.org/dc/terms/identifier
|
111
|
+
import_url:
|
112
|
+
type: string
|
113
|
+
predicate: http://scholarsphere.psu.edu/ns#importUrl
|
114
|
+
keyword:
|
115
|
+
type: string
|
116
|
+
multiple: true
|
117
|
+
index_keys:
|
118
|
+
- "keyword_sim"
|
119
|
+
- "keyword_tesim"
|
120
|
+
form:
|
121
|
+
primary: false
|
122
|
+
predicate: http://schema.org/keywords
|
123
|
+
publisher:
|
124
|
+
type: string
|
125
|
+
multiple: true
|
126
|
+
form:
|
127
|
+
primary: false
|
128
|
+
index_keys:
|
129
|
+
- "publisher_tesim"
|
130
|
+
predicate: http://purl.org/dc/elements/1.1/publisher
|
131
|
+
label:
|
132
|
+
type: string
|
133
|
+
form:
|
134
|
+
primary: false
|
135
|
+
index_keys:
|
136
|
+
- "label_tesim"
|
137
|
+
predicate: info:fedora/fedora-system:def/model#downloadFilename
|
138
|
+
language:
|
139
|
+
type: string
|
140
|
+
multiple: true
|
141
|
+
form:
|
142
|
+
primary: false
|
143
|
+
index_keys:
|
144
|
+
- "language_tesim"
|
145
|
+
predicate: http://purl.org/dc/elements/1.1/language
|
146
|
+
license:
|
147
|
+
type: string
|
148
|
+
multiple: true
|
149
|
+
form:
|
150
|
+
primary: false
|
151
|
+
index_keys:
|
152
|
+
- "license_tesim"
|
153
|
+
predicate: http://purl.org/dc/terms/license
|
154
|
+
relative_path:
|
155
|
+
type: string
|
156
|
+
predicate: http://scholarsphere.psu.edu/ns#relativePath
|
157
|
+
related_url:
|
158
|
+
type: string
|
159
|
+
multiple: true
|
160
|
+
form:
|
161
|
+
primary: false
|
162
|
+
index_keys:
|
163
|
+
- "related_url_tesim"
|
164
|
+
predicate: http://www.w3.org/2000/01/rdf-schema#seeAlso
|
165
|
+
resource_type:
|
166
|
+
type: string
|
167
|
+
multiple: true
|
168
|
+
form:
|
169
|
+
primary: false
|
170
|
+
index_keys:
|
171
|
+
- "resource_type_sim"
|
172
|
+
- "resource_type_tesim"
|
173
|
+
predicate: http://purl.org/dc/terms/type
|
174
|
+
rights_notes:
|
175
|
+
type: string
|
176
|
+
multiple: true
|
177
|
+
form:
|
178
|
+
primary: false
|
179
|
+
index_keys:
|
180
|
+
- "rights_notes_tesim"
|
181
|
+
predicate: http://purl.org/dc/elements/1.1/rights
|
182
|
+
source:
|
183
|
+
type: string
|
184
|
+
multiple: true
|
185
|
+
form:
|
186
|
+
primary: false
|
187
|
+
index_keys:
|
188
|
+
- "source_tesim"
|
189
|
+
predicate: http://purl.org/dc/terms/source
|
190
|
+
subject:
|
191
|
+
type: string
|
192
|
+
multiple: true
|
193
|
+
index_keys:
|
194
|
+
- "subject_sim"
|
195
|
+
- "subject_tesim"
|
196
|
+
form:
|
197
|
+
primary: false
|
198
|
+
predicate: http://purl.org/dc/elements/1.1/subject
|
@@ -2,6 +2,8 @@
|
|
2
2
|
# index key names, and form properties.
|
3
3
|
#
|
4
4
|
# Attributes must have a type but all other configuration options are optional.
|
5
|
+
# Please note: If using Valkyrie's Fedora Metadata Adapter, predicates for attributes
|
6
|
+
# must be placed here.
|
5
7
|
#
|
6
8
|
# attributes:
|
7
9
|
# attribute_name:
|
@@ -2,6 +2,8 @@
|
|
2
2
|
# index key names, and form properties.
|
3
3
|
#
|
4
4
|
# Attributes must have a type but all other configuration options are optional.
|
5
|
+
# Please note: If using Valkyrie's Fedora Metadata Adapter, predicates for attributes
|
6
|
+
# must be placed here.
|
5
7
|
#
|
6
8
|
# attributes:
|
7
9
|
# attribute_name:
|
@@ -23,6 +25,7 @@
|
|
23
25
|
attributes:
|
24
26
|
monograph_title:
|
25
27
|
type: string
|
28
|
+
predicate: http://hyrax-example.com/monograph_title
|
26
29
|
record_info:
|
27
30
|
type: string
|
28
31
|
form:
|
@@ -30,26 +33,33 @@ attributes:
|
|
30
33
|
primary: true
|
31
34
|
index_keys:
|
32
35
|
- "record_info_tesim"
|
36
|
+
predicate: http://hyrax-example.com/record_info
|
33
37
|
place_of_publication:
|
34
38
|
type: string
|
35
39
|
form:
|
36
40
|
required: false
|
37
41
|
primary: true
|
42
|
+
predicate: http://hyrax-example.com/place_of_publication
|
38
43
|
genre:
|
39
44
|
type: string
|
40
45
|
form:
|
41
46
|
primary: true
|
47
|
+
predicate: http://hyrax-example.com/genre
|
42
48
|
series_title:
|
43
49
|
type: string
|
44
50
|
form:
|
45
51
|
primary: false
|
52
|
+
predicate: http://hyrax-example.com/series_title
|
46
53
|
target_audience:
|
47
54
|
type: string
|
48
55
|
form:
|
49
56
|
multiple: true
|
57
|
+
predicate: http://hyrax-example.com/target_audience
|
50
58
|
table_of_contents:
|
51
59
|
type: string
|
52
60
|
form:
|
53
61
|
multiple: false
|
62
|
+
predicate: http://hyrax-example.com/table_of_contents
|
54
63
|
date_of_issuance:
|
55
64
|
type: string
|
65
|
+
predicate: http://hyrax-example.com/date_of_issuance
|
data/.koppie/config/role_map.yml
CHANGED
@@ -1,28 +1,6 @@
|
|
1
|
-
# nurax-pg uses Hydra::RoleManagement for user and role definition. The following
|
2
|
-
# examples show how to perform common setup actions.
|
3
|
-
#
|
4
|
-
# @see https://github.com/samvera/hydra-role-management
|
5
|
-
#
|
6
|
-
# Create admin role
|
7
|
-
#
|
8
|
-
# admin_role = Role.find_or_create_by(name: 'admin')
|
9
|
-
#
|
10
|
-
# Create a user
|
11
|
-
#
|
12
|
-
# admin_user = User.find_or_create_by(email: 'user@example.com') do |user|
|
13
|
-
# user.password = 'change_me'
|
14
|
-
# user.password_confirmation = 'change_me'
|
15
|
-
# user.confirmed_at = DateTime.now
|
16
|
-
# end
|
17
|
-
# admin_user.roles << admin_role unless admin_user.roles.include?(admin_role)
|
18
|
-
# admin_user.save!(validate: false)
|
19
|
-
#
|
20
|
-
# You can create non-admin roles and assign users to those roles using a similar pattern.
|
21
|
-
#
|
22
|
-
# The following roles might be used for testing, so they remain here. They will not
|
23
|
-
# be available for use when logged in through the browser.
|
24
|
-
#
|
25
1
|
development:
|
2
|
+
admin:
|
3
|
+
- admin@example.com
|
26
4
|
archivist:
|
27
5
|
- archivist1@example.com
|
28
6
|
|
@@ -45,4 +23,4 @@ test:
|
|
45
23
|
|
46
24
|
production:
|
47
25
|
admin:
|
48
|
-
-
|
26
|
+
- admin@example.com
|
data/.koppie/config/routes.rb
CHANGED
@@ -5,14 +5,13 @@ Rails.application.routes.draw do
|
|
5
5
|
mount BrowseEverything::Engine => '/browse'
|
6
6
|
|
7
7
|
mount Blacklight::Engine => '/'
|
8
|
-
|
8
|
+
|
9
9
|
concern :searchable, Blacklight::Routes::Searchable.new
|
10
10
|
|
11
11
|
resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
|
12
12
|
concerns :searchable
|
13
13
|
end
|
14
14
|
devise_for :users
|
15
|
-
mount Hydra::RoleManagement::Engine => '/'
|
16
15
|
mount Sidekiq::Web => '/sidekiq'
|
17
16
|
mount Qa::Engine => '/authorities'
|
18
17
|
mount Hyrax::Engine, at: '/'
|
data/.koppie/config/solr.yml
CHANGED
@@ -2,6 +2,6 @@
|
|
2
2
|
development:
|
3
3
|
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/nurax-pg-solr-dev" %>
|
4
4
|
test: &test
|
5
|
-
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/nurax-pg-test" %>
|
5
|
+
url: <%= ENV['TEST_SOLR_URL'] ||ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/nurax-pg-test" %>
|
6
6
|
production:
|
7
7
|
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/nurax-pg" %>
|
@@ -1,12 +1,6 @@
|
|
1
1
|
development:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
test:
|
6
|
-
host: <%= ENV['VALKYRIE_SOLR_HOST'] || 'localhost' %>
|
7
|
-
port: <%= ENV['VALKYRIE_SOLR_PORT'] || 8987 %>
|
8
|
-
core: <%= ENV['VALKYRIE_SOLR_CORE'] || 'nurax-pg-test' %>
|
2
|
+
url: <%= ENV['SOLR_DEVELOPMENT_URL'] || ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/koppie" %>
|
3
|
+
test: &test
|
4
|
+
url: <%= ENV['SOLR_TEST_URL'] || ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/koppie-test" %>
|
9
5
|
production:
|
10
|
-
|
11
|
-
port: <%= ENV['VALKYRIE_SOLR_PORT'] %>
|
12
|
-
core: <%= ENV['VALKYRIE_SOLR_CORE'] %>
|
6
|
+
url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/koppie-prod" %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateHyraxCounterMetrics < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :hyrax_counter_metrics do |t|
|
4
|
+
t.string :worktype
|
5
|
+
t.string :resource_type
|
6
|
+
t.integer :work_id
|
7
|
+
t.date :date
|
8
|
+
t.integer :total_item_investigations
|
9
|
+
t.integer :total_item_requests
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/.koppie/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2023_08_03_165135) do
|
14
14
|
|
15
15
|
# These are extensions that must be enabled in order to support this database
|
16
16
|
enable_extension "plpgsql"
|
@@ -140,6 +140,17 @@ ActiveRecord::Schema.define(version: 2021_12_07_172259) do
|
|
140
140
|
t.index ["machine_id"], name: "index_hyrax_collection_types_on_machine_id", unique: true
|
141
141
|
end
|
142
142
|
|
143
|
+
create_table "hyrax_counter_metrics", force: :cascade do |t|
|
144
|
+
t.string "worktype"
|
145
|
+
t.string "resource_type"
|
146
|
+
t.string "work_id"
|
147
|
+
t.date "date"
|
148
|
+
t.integer "total_item_investigations"
|
149
|
+
t.integer "total_item_requests"
|
150
|
+
t.datetime "created_at", precision: 6, null: false
|
151
|
+
t.datetime "updated_at", precision: 6, null: false
|
152
|
+
end
|
153
|
+
|
143
154
|
create_table "hyrax_default_administrative_set", force: :cascade do |t|
|
144
155
|
t.string "default_admin_set_id", null: false
|
145
156
|
t.datetime "created_at", null: false
|
data/CONTAINERS.md
CHANGED
@@ -71,8 +71,6 @@ Let's break down the above command:
|
|
71
71
|
|
72
72
|
_**Note:**_ The `bundle exec rspec` portion of the command runs the whole test suite. See the [rspec command documentation](https://github.com/rspec/rspec-core#the-rspec-command) for how to refine your test runs.
|
73
73
|
|
74
|
-
_**Note**: The `/app/samvera/hyrax-webapp` is analogous to the `.internal_test_app` that we generate as part of the Hyrax engine Continuous Integration._
|
75
|
-
|
76
74
|
#### The Docker Container Named "app"
|
77
75
|
|
78
76
|
As a developer, you may need to run commands against the Hyrax-based application and/or the Hyrax engine. Examples
|
@@ -191,7 +189,7 @@ We publish several Hyrax images to the [GitHub container registry][ghcr] under
|
|
191
189
|
the [Samvera organization][samvera-packages]. To build them:
|
192
190
|
|
193
191
|
```sh
|
194
|
-
export HYRAX_VERSION=v5.0.0.
|
192
|
+
export HYRAX_VERSION=v5.0.0.rc2 # or desired version
|
195
193
|
git checkout hyrax-$HYRAX_VERSION
|
196
194
|
|
197
195
|
docker build --target hyrax-base --tag ghcr.io/samvera/hyrax/hyrax-base:$(git rev-parse HEAD) .
|
data/Dockerfile
CHANGED
@@ -33,7 +33,7 @@ USER app
|
|
33
33
|
RUN mkdir -p /app/samvera/hyrax-webapp
|
34
34
|
WORKDIR /app/samvera/hyrax-webapp
|
35
35
|
|
36
|
-
COPY --chown=1001:101 ./bin /app/samvera
|
36
|
+
COPY --chown=1001:101 ./bin/*.sh /app/samvera/
|
37
37
|
ENV PATH="/app/samvera:$PATH"
|
38
38
|
ENV RAILS_ROOT="/app/samvera/hyrax-webapp"
|
39
39
|
ENV RAILS_SERVE_STATIC_FILES="1"
|
@@ -89,6 +89,13 @@ ONBUILD RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nu
|
|
89
89
|
|
90
90
|
FROM hyrax-base as hyrax-engine-dev
|
91
91
|
|
92
|
+
USER root
|
93
|
+
RUN apk --no-cache add bash \
|
94
|
+
ffmpeg \
|
95
|
+
mediainfo \
|
96
|
+
perl
|
97
|
+
USER app
|
98
|
+
|
92
99
|
ARG APP_PATH=.dassie
|
93
100
|
ARG BUNDLE_WITHOUT=
|
94
101
|
|
@@ -100,7 +107,9 @@ COPY --chown=1001:101 . /app/samvera/hyrax-engine
|
|
100
107
|
RUN bundle -v && \
|
101
108
|
bundle install --jobs "$(nproc)" && \
|
102
109
|
cd $HYRAX_ENGINE_PATH && \
|
103
|
-
bundle install --jobs "$(nproc)"
|
110
|
+
bundle install --jobs "$(nproc)" && \
|
111
|
+
yarn
|
112
|
+
|
104
113
|
RUN RAILS_ENV=production SECRET_KEY_BASE='fakesecret1234' DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
|
105
114
|
|
106
115
|
|
data/Gemfile
CHANGED
@@ -14,25 +14,8 @@ group :development, :test do
|
|
14
14
|
gem "simplecov", require: false
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
# rubocop:disable Bundler/DuplicatedGem
|
22
|
-
if File.exist?(test_app_gemfile)
|
23
|
-
begin
|
24
|
-
Bundler.ui.info "[Hyrax] Including test application dependencies from #{test_app_gemfile}"
|
25
|
-
eval_gemfile test_app_gemfile
|
26
|
-
rescue Bundler::GemfileError => e
|
27
|
-
Bundler.ui.warn '[Hyrax] Skipping Rails application dependencies:'
|
28
|
-
Bundler.ui.warn e.message
|
29
|
-
end
|
30
|
-
elsif ENV['RAILS_VERSION'] == 'edge'
|
31
|
-
gem 'rails', github: 'rails/rails', source: 'https://rubygems.org'
|
32
|
-
ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
|
33
|
-
elsif ENV['RAILS_VERSION']
|
34
|
-
gem 'rails', ENV['RAILS_VERSION'], source: 'https://rubygems.org'
|
35
|
-
else
|
36
|
-
Bundler.ui.warn '[Hyrax] Skipping all Rails dependency injection'
|
17
|
+
# Install gems from test app
|
18
|
+
if ENV['RAILS_ROOT']
|
19
|
+
test_app_gemfile_path = File.expand_path('Gemfile', ENV['RAILS_ROOT'])
|
20
|
+
eval_gemfile test_app_gemfile_path
|
37
21
|
end
|
38
|
-
# rubocop:enable Bundler/DuplicatedGem
|
data/Gemfile.dassie
ADDED
data/Gemfile.koppie
ADDED
data/README.md
CHANGED
@@ -50,7 +50,6 @@ More detailed documentation about Hyrax is available on the [Hyrax Github Wiki](
|
|
50
50
|
|
51
51
|
Hyrax can also work running prerequisite dependencies separately. The following describe ways to do this:
|
52
52
|
* [Developing Your Hyrax-based Application](./documentation/developing-your-hyrax-based-app.md)
|
53
|
-
* [Development setup using Engine Cart and Solr Fedora wrapper](https://github.com/samvera/hyrax/wiki/Development-setup-using-Engine-Cart-and-Solr---Fedora-wrapper)
|
54
53
|
|
55
54
|
## Contribute
|
56
55
|
|
data/Rakefile
CHANGED
@@ -9,17 +9,6 @@ end
|
|
9
9
|
|
10
10
|
Bundler::GemHelper.install_tasks
|
11
11
|
|
12
|
-
task :setup_test_server do
|
13
|
-
require 'engine_cart'
|
14
|
-
EngineCart.load_application!
|
15
|
-
end
|
16
|
-
|
17
12
|
Dir.glob('tasks/*.rake').each { |r| import r }
|
18
13
|
|
19
14
|
task default: :ci
|
20
|
-
|
21
|
-
# Load the test app's rake tasks so they can be run from the app namespace (e.g. app:db:migrate)
|
22
|
-
if File.exist?(File.expand_path(".internal_test_app/Rakefile", __dir__))
|
23
|
-
APP_RAKEFILE = File.expand_path(".internal_test_app/Rakefile", __dir__)
|
24
|
-
load 'rails/tasks/engine.rake'
|
25
|
-
end
|
@@ -14,12 +14,9 @@ module Hyrax
|
|
14
14
|
def destroy
|
15
15
|
case work
|
16
16
|
when Valkyrie::Resource
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
embargo_manager.deactivate!
|
21
|
-
work.embargo = Hyrax.persister.save(resource: embargo_manager.embargo)
|
22
|
-
Hyrax::AccessControlList(work).save
|
17
|
+
Hyrax::EmbargoManager.deactivate_embargo_for(resource: work) &&
|
18
|
+
Hyrax.persister.save(resource: work.embargo) &&
|
19
|
+
Hyrax::AccessControlList(work).save
|
23
20
|
else
|
24
21
|
work.embargo_visibility! # If the embargo has lapsed, update the current visibility.
|
25
22
|
work.deactivate_embargo!
|
@@ -41,7 +41,7 @@
|
|
41
41
|
var checked = $("#check_all")[0]['checked'];
|
42
42
|
|
43
43
|
// check each individual box
|
44
|
-
$("input[type='checkbox'].batch_document_selector").each(function(index, value) {
|
44
|
+
$("input[type='checkbox'].batch_document_selector:not(.disabled)").each(function(index, value) {
|
45
45
|
value['checked'] = checked;
|
46
46
|
});
|
47
47
|
toggleButtons();
|
@@ -10,7 +10,7 @@ export class InputTracker {
|
|
10
10
|
this.notifier = notifier
|
11
11
|
this.element.data("initial-value", this.element.val())
|
12
12
|
this.element.data("tracker", this)
|
13
|
-
this.element.
|
13
|
+
this.element.on("change", this.value_changed)
|
14
14
|
}
|
15
15
|
|
16
16
|
reset() {
|
@@ -116,6 +116,21 @@ ul.tabular {
|
|
116
116
|
background: #fff;
|
117
117
|
border-color: #e0e0e0;
|
118
118
|
|
119
|
+
& > .btn {
|
120
|
+
padding: 0;
|
121
|
+
border: 0;
|
122
|
+
}
|
123
|
+
|
124
|
+
.btn-primary {
|
125
|
+
margin-bottom: 1rem;
|
126
|
+
}
|
127
|
+
|
128
|
+
.workflow-comments {
|
129
|
+
label {
|
130
|
+
font-weight: bold;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
119
134
|
.card-header {
|
120
135
|
background-color: #e6ab5f;
|
121
136
|
color: #ffffff;
|
@@ -128,8 +143,9 @@ ul.tabular {
|
|
128
143
|
.card-body {
|
129
144
|
background-color: #f2f1eb;
|
130
145
|
}
|
131
|
-
}
|
132
146
|
|
133
|
-
.workflow-actions {
|
134
|
-
|
147
|
+
.workflow-actions {
|
148
|
+
background-color: #f8f8f8;
|
149
|
+
padding: 1rem;
|
150
|
+
}
|
135
151
|
}
|