hyrax 4.0.0 → 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 +124 -232
- data/.dassie/.env +8 -2
- 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/environments/test.rb +1 -0
- data/.dassie/config/initializers/hyrax.rb +3 -1
- data/.dassie/config/initializers/riiif.rb +11 -7
- 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 +22 -3
- data/.dockerignore +7 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +10 -7
- data/.github/release.yml +5 -2
- data/.gitignore +1 -1
- data/.koppie/.env +13 -4
- data/.koppie/Gemfile +10 -12
- data/.koppie/Gemfile.koppie +2 -0
- data/.koppie/Rakefile +0 -2
- data/.koppie/app/models/ability.rb +1 -5
- 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/environments/test.rb +1 -0
- 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 +10 -4
- data/.koppie/config/initializers/riiif.rb +11 -7
- data/.koppie/config/metadata/collection_resource.yaml +49 -0
- 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/.koppie/yarn.lock +23 -23
- data/.regen +1 -1
- data/CONTAINERS.md +1 -3
- data/Dockerfile +17 -13
- 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/base_actor.rb +4 -3
- data/app/actors/hyrax/actors/embargo_actor.rb +3 -3
- data/app/actors/hyrax/actors/lease_actor.rb +5 -2
- 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/javascripts/hyrax/file_manager/sorting.es6 +3 -2
- 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 +8 -2
- data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +7 -1
- data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +79 -0
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +64 -14
- data/app/controllers/hyrax/admin/workflows_controller.rb +48 -3
- data/app/controllers/hyrax/api/items_controller.rb +2 -3
- data/app/controllers/hyrax/batch_edits_controller.rb +39 -10
- data/app/controllers/hyrax/batch_uploads_controller.rb +5 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +4 -1
- data/app/controllers/hyrax/downloads_controller.rb +8 -1
- data/app/controllers/hyrax/file_sets_controller.rb +50 -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_edit_form.rb +1 -1
- 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 +2 -7
- data/app/forms/hyrax/forms/resource_batch_edit_form.rb +118 -0
- data/app/forms/hyrax/forms/resource_form.rb +21 -34
- data/app/forms/hyrax/forms/work_embargo_form.rb +1 -0
- data/app/forms/hyrax/forms/work_form.rb +1 -1
- data/app/forms/hyrax/forms/work_lease_form.rb +1 -0
- data/app/helpers/hyrax/dashboard_helper_behavior.rb +30 -9
- data/app/helpers/hyrax/membership_helper.rb +13 -1
- data/app/helpers/hyrax/work_form_helper.rb +0 -107
- data/app/indexers/hyrax/file_set_indexer.rb +6 -0
- data/app/indexers/hyrax/location_indexer.rb +29 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +36 -5
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +9 -2
- 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_create_derivatives_job.rb +8 -7
- data/app/jobs/valkyrie_ingest_job.rb +1 -4
- data/app/models/admin_set.rb +1 -31
- 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/file_set/derivatives.rb +3 -2
- data/app/models/concerns/hyrax/riiif_file.rb +30 -0
- data/app/models/concerns/hyrax/solr_document_behavior.rb +20 -3
- data/app/models/hyrax/collection_type.rb +5 -14
- data/app/models/hyrax/counter_metric.rb +7 -0
- data/app/models/hyrax/file_metadata.rb +9 -9
- data/app/models/hyrax/file_set.rb +76 -15
- data/app/models/hyrax/orcid_validator.rb +0 -6
- data/app/models/hyrax/resource.rb +30 -2
- 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/file_set_presenter.rb +6 -0
- data/app/presenters/hyrax/iiif_manifest_presenter.rb +3 -7
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +6 -4
- data/app/presenters/hyrax/presenter_renderer.rb +0 -7
- data/app/presenters/hyrax/version_list_presenter.rb +19 -10
- data/app/presenters/hyrax/version_presenter.rb +19 -4
- data/app/presenters/hyrax/work_show_presenter.rb +6 -11
- data/app/search_builders/hyrax/file_set_search_builder.rb +1 -1
- data/app/search_builders/hyrax/valkyrie_abstract_type_relation.rb +37 -0
- data/app/search_builders/hyrax/valkyrie_work_relation.rb +9 -0
- data/app/services/hyrax/admin_set_create_service.rb +0 -17
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +16 -9
- data/app/services/hyrax/collections/collection_member_service.rb +1 -1
- data/app/services/hyrax/custom_queries/find_by_date_range.rb +55 -0
- data/app/services/hyrax/custom_queries/find_count_by.rb +62 -0
- data/app/services/hyrax/custom_queries/find_file_metadata.rb +1 -1
- data/app/services/hyrax/custom_queries/find_models_by_access.rb +59 -0
- data/app/services/hyrax/derivative_bucketed_storage.rb +25 -0
- data/app/services/hyrax/derivative_path.rb +14 -4
- data/app/services/hyrax/embargo_manager.rb +106 -13
- data/app/services/hyrax/embargo_service.rb +12 -10
- data/app/services/hyrax/file_set_derivatives_service.rb +14 -13
- data/app/services/hyrax/fixity_check_failure_service.rb +1 -1
- data/app/services/hyrax/identifier/dispatcher.rb +9 -2
- data/app/services/hyrax/lease_manager.rb +88 -8
- data/app/services/hyrax/listeners/file_metadata_listener.rb +16 -8
- 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/listeners/workflow_listener.rb +8 -11
- data/app/services/hyrax/lock_manager.rb +1 -2
- data/app/services/hyrax/persist_directly_contained_output_file_service.rb +24 -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/solr_query_service.rb +7 -6
- data/app/services/hyrax/statistics/depositors/summary.rb +1 -1
- data/app/services/hyrax/statistics/over_time.rb +1 -1
- data/app/services/hyrax/statistics/users/over_time.rb +3 -1
- data/app/services/hyrax/statistics/valkyrie_query_service.rb +49 -0
- data/app/services/hyrax/statistics/works/count.rb +1 -1
- data/app/services/hyrax/thumbnail_path_service.rb +5 -0
- data/app/services/hyrax/valkyrie_persist_derivatives.rb +16 -11
- data/app/services/hyrax/valkyrie_upload.rb +16 -28
- data/app/services/hyrax/versioning_service.rb +30 -15
- data/app/services/hyrax/visibility_intention.rb +1 -4
- data/app/services/hyrax/visibility_propagator.rb +1 -1
- data/app/services/hyrax/work_uploads_handler.rb +1 -1
- data/app/services/hyrax/workflow/actionable_objects.rb +28 -3
- data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +1 -1
- data/app/services/hyrax/workflow/grant_read_to_depositor.rb +1 -1
- data/app/services/hyrax/workflow/permission_query.rb +23 -2
- 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/admin/workflows/_tabs.html.erb +9 -0
- data/app/views/hyrax/admin/workflows/index.html.erb +53 -76
- data/app/views/hyrax/base/_file_manager_members.html.erb +2 -2
- data/app/views/hyrax/base/_file_manager_resource_form.html.erb +1 -1
- data/app/views/hyrax/base/_form.html.erb +0 -10
- data/app/views/hyrax/base/_form_permission_embargo.html.erb +1 -1
- data/app/views/hyrax/base/_form_permission_lease.html.erb +1 -1
- data/app/views/hyrax/base/_form_visibility_component.html.erb +4 -4
- data/app/views/hyrax/base/_items.html.erb +1 -1
- 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/file_manager.html.erb +1 -1
- data/app/views/hyrax/base/show.json.jbuilder +4 -3
- 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/file_sets/show.html.erb +5 -3
- data/app/views/hyrax/homepage/_explore_collections.html.erb +1 -1
- 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 +18 -14
- data/chart/hyrax/README.md +34 -21
- data/chart/hyrax/templates/_helpers.tpl +34 -1
- data/chart/hyrax/templates/configmap-env.yaml +12 -2
- data/chart/hyrax/templates/secrets.yaml +1 -1
- data/chart/hyrax/values.yaml +39 -14
- data/config/initializers/file_length_patch.rb +10 -0
- data/config/initializers/listeners.rb +4 -10
- data/config/initializers/storage_adapter_initializer.rb +1 -1
- data/config/locales/hyrax.en.yml +8 -0
- data/config/metadata/basic_metadata.yaml +52 -0
- data/config/metadata/core_metadata.yaml +4 -0
- data/config/metadata/file_set_metadata.yaml +20 -1
- data/config/metadata/hyrax_internal_metadata.yaml +57 -0
- data/docker-compose-koppie.yml +36 -22
- data/docker-compose-sirenia.yml +202 -0
- data/docker-compose.yml +42 -26
- data/documentation/developing-your-hyrax-based-app.md +6 -14
- data/documentation/legacyREADME.md +3 -1
- data/hyrax.gemspec +12 -13
- data/karma.conf.js +9 -10
- data/lib/generators/hyrax/collection_resource/templates/collection_metadata.yaml +2 -0
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +1 -1
- data/lib/generators/hyrax/templates/config/initializers/riiif.rb +11 -7
- 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/active_fedora_dummy_model.rb +6 -1
- data/lib/hyrax/configuration.rb +147 -43
- data/lib/hyrax/controlled_vocabularies/location.rb +7 -1
- data/lib/hyrax/engine.rb +2 -1
- data/lib/hyrax/form_fields.rb +6 -0
- data/lib/hyrax/publisher.rb +23 -3
- data/lib/hyrax/redis_event_store.rb +7 -8
- data/lib/hyrax/resource_name.rb +4 -0
- data/lib/hyrax/specs/capybara.rb +25 -37
- 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 +47 -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_file_sets.rb +6 -0
- data/lib/hyrax/transactions/steps/add_to_parent.rb +1 -1
- data/lib/hyrax/transactions/steps/apply_permission_template.rb +40 -0
- 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/steps/save.rb +21 -0
- data/lib/hyrax/transactions/work_create.rb +1 -0
- data/lib/hyrax/transactions/work_destroy.rb +3 -2
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +1 -0
- 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/default_work.rb +7 -2
- data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
- data/lib/wings/active_fedora_converter.rb +53 -11
- data/lib/wings/attribute_transformer.rb +24 -17
- data/lib/wings/model_transformer.rb +23 -12
- data/lib/wings/orm_converter.rb +23 -18
- data/lib/wings/setup.rb +23 -3
- data/lib/wings/valkyrie/persister.rb +4 -2
- data/lib/wings/valkyrie/storage.rb +8 -90
- data/lib/wings.rb +5 -0
- data/package.json +3 -1
- data/tasks/hyrax_dev.rake +2 -33
- data/template.rb +1 -1
- metadata +104 -81
- data/.engine_cart.yml +0 -3
- data/app/forms/hyrax/forms/file_manager_form.rb +0 -35
- data/app/services/hyrax/collections/migration_service.rb +0 -113
- data/app/views/hyrax/base/_form_collections_error.html.erb +0 -1
- data/app/views/hyrax/base/_form_in_works_error.html.erb +0 -3
- data/app/views/hyrax/base/_form_ordered_members_error.html.erb +0 -3
- data/app/views/hyrax/base/_form_visibility_error.html.erb +0 -19
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 951cca50f478f6a77b0b4dfd7f7127de250891ae5f26af3d0aad431e84987506
|
4
|
+
data.tar.gz: 4748c1f1c6a6a744e9ddbf364de06d028548f3699aa5a25c33104259672b412d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e24d5fd70134e1c27b39cd266a51b18838fc8b29d815b91d9df80e96c53f5348ba0b87647cf15894886de61ac4c7e49afbb4ecb9b9708b38f74959d74b339480
|
7
|
+
data.tar.gz: 745e7abf8b5f773864867f91b75f74a1768c97dddd7de35085b65d7dae48513bc2b06dd233365de9445940ebc3af9ad01bd53276e6b58bd4fcffc217e63aaa94
|
data/.circleci/config.yml
CHANGED
@@ -5,271 +5,163 @@ orbs:
|
|
5
5
|
ruby: circleci/ruby@2
|
6
6
|
node: circleci/node@5
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
executors:
|
9
|
+
hyrax:
|
10
10
|
parameters:
|
11
|
+
fcrepo_version:
|
12
|
+
type: string
|
13
|
+
default: '4.7.5'
|
14
|
+
hyrax_app:
|
15
|
+
type: string
|
16
|
+
default: 'dassie'
|
17
|
+
postgres_version:
|
18
|
+
type: string
|
19
|
+
default: '14.9'
|
20
|
+
redis_version:
|
21
|
+
type: string
|
22
|
+
default: '6.2'
|
23
|
+
ruby_type:
|
24
|
+
type: string
|
25
|
+
default: 'ruby'
|
11
26
|
ruby_version:
|
12
27
|
type: string
|
13
|
-
default: 2.
|
14
|
-
|
28
|
+
default: '2.5.5'
|
29
|
+
solr_port:
|
15
30
|
type: string
|
16
|
-
default:
|
17
|
-
|
31
|
+
default: '8985'
|
32
|
+
solr_version:
|
18
33
|
type: string
|
19
|
-
default:
|
20
|
-
executor:
|
21
|
-
name: 'samvera/ruby'
|
22
|
-
ruby_version: << parameters.ruby_version >>
|
23
|
-
resource_class: medium
|
34
|
+
default: '8.11-slim'
|
24
35
|
environment:
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
fi
|
38
|
-
[[ -z "$(git branch --all --list master */master)" ]]
|
39
|
-
|
40
|
-
- samvera/bundle:
|
41
|
-
ruby_version: << parameters.ruby_version >>
|
42
|
-
bundler_version: << parameters.bundler_version >>
|
36
|
+
RAILS_ENV: test
|
37
|
+
RACK_ENV: test
|
38
|
+
FCREPO_PORT: 8080
|
39
|
+
POSTGRES_DB: circle_test
|
40
|
+
POSTGRES_HOST: 127.0.0.1
|
41
|
+
POSTGRES_USER: postgres
|
42
|
+
docker:
|
43
|
+
- image: "ghcr.io/samvera/hyrax/<< parameters.hyrax_app >>-dev:<< pipeline.git.revision >>"
|
44
|
+
- image: seleniarm/standalone-chromium:114.0
|
45
|
+
environment:
|
46
|
+
SE_NODE_SESSION_TIMEOUT: 1200
|
47
|
+
START_XVFB: "false"
|
43
48
|
|
44
|
-
|
45
|
-
|
49
|
+
- image: samvera/fcrepo4:<< parameters.fcrepo_version >>
|
50
|
+
environment:
|
51
|
+
CATALINA_OPTS: "-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC"
|
52
|
+
- image: zookeeper:3.4
|
53
|
+
- image: solr:<< parameters.solr_version >>
|
54
|
+
environment:
|
55
|
+
VERBOSE: yes
|
56
|
+
SECURITY_JSON: '{"authentication":{"blockUnknown": false, "class":"solr.BasicAuthPlugin", "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}, "realm":"My Solr users", "forwardCredentials": false}, "authorization":{ "class":"solr.RuleBasedAuthorizationPlugin", "permissions":[{"name":"security-edit", "role":"admin"}], "user-role":{"solr":"admin"}}}'
|
57
|
+
command: sh -c "server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd put /security.json \"${SECURITY_JSON}\" && solr-fg -cloud -noprompt -p << parameters.solr_port >> -z localhost:2181"
|
58
|
+
- image: redis:<< parameters.redis_version >>
|
59
|
+
- image: cimg/postgres:<< parameters.postgres_version >>
|
46
60
|
|
47
|
-
|
48
|
-
|
49
|
-
keys:
|
50
|
-
- v1-rubocop-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
|
51
|
-
- v1-rubocop-ruby<< parameters.ruby_version >>
|
52
|
-
- v1
|
53
|
-
|
54
|
-
- run:
|
55
|
-
name: Run rubocop in parallel
|
56
|
-
command: bundle exec rubocop --parallel
|
57
|
-
|
58
|
-
- save_cache:
|
59
|
-
name: Save rubocop cache
|
60
|
-
key: v1-rubocop-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
|
61
|
-
paths:
|
62
|
-
- ~/.cache/rubocop_cache
|
63
|
-
|
64
|
-
- persist_to_workspace:
|
65
|
-
root: ~/
|
66
|
-
paths:
|
67
|
-
- project/*
|
68
|
-
- project/**/*
|
69
|
-
|
70
|
-
build:
|
61
|
+
jobs:
|
62
|
+
kaniko-build:
|
71
63
|
parameters:
|
72
|
-
|
73
|
-
type: string
|
74
|
-
default: 2.7.7
|
75
|
-
bundler_version:
|
64
|
+
hyrax_app:
|
76
65
|
type: string
|
77
|
-
default:
|
78
|
-
|
66
|
+
default: dassie
|
67
|
+
ruby_version:
|
79
68
|
type: string
|
80
|
-
default:
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
resource_class: medium
|
85
|
-
environment:
|
86
|
-
RAILS_VERSION: << parameters.rails_version >>
|
87
|
-
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
|
88
|
-
ENGINE_CART_RAILS_OPTIONS: --database=postgresql --skip-git --skip-bundle --skip-listen --skip-spring --skip-keeps --skip-test --skip-bootsnap --skip-javascript
|
89
|
-
DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test # Hard-coded with data from CircleCI orb, related to https://github.com/samvera-labs/samvera-circleci-orb/issues/42
|
69
|
+
default: 3.2.2
|
70
|
+
docker:
|
71
|
+
- image: gcr.io/kaniko-project/executor:v1.14.0-debug
|
72
|
+
entrypoint: ""
|
90
73
|
steps:
|
91
|
-
- attach_workspace:
|
92
|
-
at: ~/
|
93
|
-
- samvera/engine_cart_generate:
|
94
|
-
cache_key: v1-internal-test-app-{{ checksum "hyrax.gemspec" }}-{{ checksum ".regen" }}-{{ checksum ".circleci/config.yml" }}-<< parameters.rails_version >>-<< parameters.ruby_version >>
|
95
|
-
- samvera/bundle:
|
96
|
-
ruby_version: << parameters.ruby_version >>
|
97
|
-
bundler_version: << parameters.bundler_version >>
|
98
74
|
- run:
|
99
|
-
name:
|
100
|
-
command:
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
75
|
+
name: Configure GHCR credentials
|
76
|
+
command: |
|
77
|
+
cat > /kaniko/.docker/config.json \<<- JSON
|
78
|
+
{
|
79
|
+
"auths": {
|
80
|
+
"ghcr.io": {
|
81
|
+
"auth": "$(echo -n $GHCR_USER:$GHCR_TOKEN | base64)"
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
JSON
|
86
|
+
- run:
|
87
|
+
name: Build and Push image
|
88
|
+
command: |
|
89
|
+
/kaniko/executor \
|
90
|
+
--cache=true \
|
91
|
+
--build-arg "EXTRA_APK_PACKAGES=git bash" \
|
92
|
+
--build-arg "APP_PATH=.<< parameters.hyrax_app >>" \
|
93
|
+
--build-arg "RUBY_VERSION=<< parameters.ruby_version >>" \
|
94
|
+
--context "git://github.com/$(echo $CIRCLE_REPOSITORY_URL | sed -E 's/.+:(.+)\.git/\1/')#refs/heads/${CIRCLE_BRANCH}#${CIRCLE_SHA1}" \
|
95
|
+
--target "hyrax-engine-dev" \
|
96
|
+
--destination "ghcr.io/samvera/hyrax/<< parameters.hyrax_app >>-dev:${CIRCLE_SHA1}"
|
112
97
|
|
113
|
-
test:
|
98
|
+
hyrax-test:
|
114
99
|
parameters:
|
115
|
-
|
100
|
+
hyrax_app:
|
116
101
|
type: string
|
117
|
-
default:
|
118
|
-
bundler_version:
|
119
|
-
type: string
|
120
|
-
default: 2.4.8
|
102
|
+
default: dassie
|
121
103
|
hyrax_valkyrie:
|
122
104
|
type: string
|
123
105
|
default: "false"
|
106
|
+
ruby_version:
|
107
|
+
type: string
|
108
|
+
default: 3.2.2
|
124
109
|
executor:
|
125
|
-
name:
|
110
|
+
name: hyrax
|
111
|
+
hyrax_app: << parameters.hyrax_app >>
|
126
112
|
ruby_version: << parameters.ruby_version >>
|
127
|
-
resource_class:
|
128
|
-
parallelism:
|
113
|
+
resource_class: large
|
114
|
+
parallelism: 12
|
129
115
|
environment:
|
116
|
+
CHROME_HEADLESS_MODE: true
|
117
|
+
DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test
|
118
|
+
HUB_URL: http://localhost:4444/wd/hub
|
130
119
|
HYRAX_VALKYRIE: << parameters.hyrax_valkyrie >>
|
120
|
+
IN_DOCKER: true
|
121
|
+
KARMA_BROWSER: remote-chromium
|
122
|
+
VALKYRIE_SOLR_CORE: valkyrie-test
|
131
123
|
VALKYRIE_SOLR_PORT: 8985
|
132
|
-
DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test # Hard-coded with data from CircleCI orb, related to https://github.com/samvera-labs/samvera-circleci-orb/issues/42
|
133
|
-
KARMA_BROWSER: ChromeHeadlessCustom
|
134
|
-
RAILS_ROOT: .internal_test_app
|
135
|
-
SPEC_OPTS: "" # Clear output conflicts between samvera orb executor and ruby orb rspec command
|
136
124
|
steps:
|
137
|
-
- attach_workspace:
|
138
|
-
at: ~/
|
139
125
|
- run:
|
140
|
-
name:
|
126
|
+
name: Create solr core
|
141
127
|
command: |
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
-
|
159
|
-
key: engine-node-v1-{{ checksum "package.json" }}
|
160
|
-
paths:
|
161
|
-
- node_modules
|
162
|
-
- samvera/install_solr_core:
|
163
|
-
solr_config_path: .internal_test_app/solr/conf
|
164
|
-
- samvera/install_solr_core:
|
165
|
-
solr_config_path: .internal_test_app/solr/conf
|
166
|
-
core_name: hyrax-valkyrie-test
|
167
|
-
# Rerun bundler in case this is a different ruby version than bundle and build steps
|
168
|
-
- samvera/bundle:
|
169
|
-
ruby_version: << parameters.ruby_version >>
|
170
|
-
bundler_version: << parameters.bundler_version >>
|
171
|
-
# Ensure gems needed by the test app are installed
|
172
|
-
- ruby/install-deps:
|
173
|
-
app-dir: .internal_test_app
|
174
|
-
- node/install-packages:
|
175
|
-
pkg-manager: yarn
|
176
|
-
app-dir: .internal_test_app
|
177
|
-
- run:
|
178
|
-
command: bundle exec rake db:migrate
|
179
|
-
working_directory: .internal_test_app
|
180
|
-
- ruby/rspec-test
|
181
|
-
- store_artifacts:
|
182
|
-
path: Gemfile.lock
|
183
|
-
destination: engine-gemfile-lock
|
184
|
-
- store_artifacts:
|
185
|
-
path: .internal_test_app/Gemfile.lock
|
186
|
-
destination: webapp-gemfile-lock
|
128
|
+
cd /app/samvera/hyrax-webapp/solr/conf
|
129
|
+
zip -1 -r solr_conf.zip ./*
|
130
|
+
db-wait.sh localhost:8985 # wait for solr to be available before hitting the API
|
131
|
+
curl -H "Content-type:application/octet-stream" --data-binary @solr_conf.zip "http://solr:SolrRocks@127.0.0.1:8985/solr/admin/configs?action=UPLOAD&name=solrconfig"
|
132
|
+
curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8985/api/collections/ -d '{create: {name: hydra-test, config: solrconfig, numShards: 1}}'
|
133
|
+
curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8985/api/collections/ -d '{create: {name: valkyrie-test, config: solrconfig, numShards: 1}}'
|
134
|
+
- ruby/rspec-test:
|
135
|
+
app-dir: /app/samvera/hyrax-engine
|
136
|
+
|
137
|
+
rubocop:
|
138
|
+
working_directory: ~/hyrax
|
139
|
+
docker:
|
140
|
+
- image: cimg/ruby:3.2.2
|
141
|
+
steps:
|
142
|
+
- checkout
|
143
|
+
- run: bundle install
|
144
|
+
- ruby/rubocop-check
|
187
145
|
|
188
146
|
workflows:
|
189
147
|
version: 2
|
190
|
-
|
148
|
+
dassie:
|
191
149
|
jobs:
|
192
|
-
-
|
150
|
+
- rubocop
|
151
|
+
- kaniko-build:
|
152
|
+
name: "dassie-build"
|
193
153
|
ruby_version: "3.2.2"
|
194
|
-
|
195
|
-
|
196
|
-
|
154
|
+
hyrax_app: "dassie"
|
155
|
+
- hyrax-test:
|
156
|
+
name: "dassie-test"
|
197
157
|
ruby_version: "3.2.2"
|
198
|
-
|
199
|
-
bundler_version: "2.4.8"
|
158
|
+
hyrax_app: "dassie"
|
200
159
|
requires:
|
201
|
-
-
|
202
|
-
- test:
|
203
|
-
name: "
|
160
|
+
- dassie-build
|
161
|
+
- hyrax-test:
|
162
|
+
name: "dassie-valkyrie-test"
|
204
163
|
ruby_version: "3.2.2"
|
205
|
-
|
206
|
-
|
207
|
-
- build
|
208
|
-
- test:
|
209
|
-
name: "ruby3-2-valkyrie"
|
210
|
-
ruby_version: "3.2.2"
|
211
|
-
bundler_version: "2.4.8"
|
212
|
-
hyrax_valkyrie: "true"
|
213
|
-
requires:
|
214
|
-
- build
|
215
|
-
ruby3-1:
|
216
|
-
jobs:
|
217
|
-
- bundle:
|
218
|
-
ruby_version: "3.1.4"
|
219
|
-
rails_version: "6.1.7.2"
|
220
|
-
bundler_version: "2.4.8"
|
221
|
-
- build:
|
222
|
-
ruby_version: "3.1.4"
|
223
|
-
rails_version: "6.1.7.2"
|
224
|
-
bundler_version: "2.4.8"
|
225
|
-
requires:
|
226
|
-
- bundle
|
227
|
-
- test:
|
228
|
-
name: "ruby3-1"
|
229
|
-
ruby_version: "3.1.4"
|
230
|
-
bundler_version: "2.4.8"
|
231
|
-
requires:
|
232
|
-
- build
|
233
|
-
ruby3-0:
|
234
|
-
jobs:
|
235
|
-
- bundle:
|
236
|
-
ruby_version: "3.0.6"
|
237
|
-
rails_version: "6.1.7.2"
|
238
|
-
bundler_version: "2.4.8"
|
239
|
-
- build:
|
240
|
-
ruby_version: "3.0.6"
|
241
|
-
rails_version: "6.1.7.2"
|
242
|
-
bundler_version: "2.4.8"
|
243
|
-
requires:
|
244
|
-
- bundle
|
245
|
-
- test:
|
246
|
-
name: "ruby3-0"
|
247
|
-
ruby_version: "3.0.6"
|
248
|
-
bundler_version: "2.4.8"
|
249
|
-
requires:
|
250
|
-
- build
|
251
|
-
ruby2-7:
|
252
|
-
jobs:
|
253
|
-
- bundle:
|
254
|
-
ruby_version: "2.7.7"
|
255
|
-
rails_version: "6.1.7.2"
|
256
|
-
bundler_version: "2.4.8"
|
257
|
-
- build:
|
258
|
-
ruby_version: "2.7.7"
|
259
|
-
rails_version: "6.1.7.2"
|
260
|
-
bundler_version: "2.4.8"
|
261
|
-
requires:
|
262
|
-
- bundle
|
263
|
-
- test:
|
264
|
-
name: "ruby2-7"
|
265
|
-
ruby_version: "2.7.7"
|
266
|
-
bundler_version: "2.4.8"
|
267
|
-
requires:
|
268
|
-
- build
|
269
|
-
- test:
|
270
|
-
name: "ruby2-7-valkyrie"
|
271
|
-
ruby_version: "2.7.7"
|
272
|
-
bundler_version: "2.4.8"
|
273
|
-
hyrax_valkyrie: "true"
|
164
|
+
hyrax_app: "dassie"
|
165
|
+
hyrax_valkyrie: "1"
|
274
166
|
requires:
|
275
|
-
- build
|
167
|
+
- dassie-build
|
data/.dassie/.env
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
ANALYTICS_START_DATE=2021-08-21
|
2
|
+
BUNDLE_GEMFILE=Gemfile.dassie
|
3
|
+
BUNDLE_PATH=/app/bundle
|
4
|
+
CH12N_TOOL=fits_servlet
|
2
5
|
CHROME_HEADLESS_MODE=false
|
3
6
|
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
|
4
7
|
DATABASE_TEST_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax_test?pool=5
|
@@ -9,6 +12,7 @@ FCREPO_HOST=fcrepo
|
|
9
12
|
FCREPO_PORT=8080
|
10
13
|
FCREPO_REST_PATH=rest
|
11
14
|
FCREPO_TEST_BASE_PATH=/test
|
15
|
+
FITS_SERVLET_URL=http://fits:8080/fits
|
12
16
|
HUB_URL=http://chrome:4444/wd/hub
|
13
17
|
HYRAX_ANALYTICS=false
|
14
18
|
HYRAX_ANALYTICS_PROVIDER=google
|
@@ -16,15 +20,17 @@ HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
|
|
16
20
|
HYRAX_ENGINE_PATH=/app/samvera/hyrax-engine
|
17
21
|
HYRAX_UPLOAD_PATH=/app/samvera/hyrax-webapp/uploads/
|
18
22
|
IN_DOCKER=true
|
19
|
-
KARMA_BROWSER=
|
23
|
+
KARMA_BROWSER=remote-chromium
|
24
|
+
KARMA_HOSTNAME=app
|
20
25
|
MEMCACHED_HOST=memcached
|
21
26
|
RACK_ENV=development
|
22
27
|
RAILS_ENV=development
|
23
28
|
RAILS_ROOT=.dassie
|
24
29
|
REDIS_HOST=redis
|
30
|
+
REDIS_PASSWORD=sidekickin
|
25
31
|
REDIS_PROVIDER=SIDEKIQ_REDIS_URL
|
26
32
|
SEED_DASSIE=true
|
27
|
-
SIDEKIQ_REDIS_URL=redis
|
33
|
+
SIDEKIQ_REDIS_URL=redis://:sidekickin@redis:6379/0
|
28
34
|
SOLR_HOST=solr
|
29
35
|
SOLR_PORT=8983
|
30
36
|
SOLR_TEST_URL=http://solr:8983/solr/hyrax_test
|
data/.dassie/Gemfile
CHANGED
@@ -8,35 +8,31 @@ else
|
|
8
8
|
end
|
9
9
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
10
10
|
|
11
|
-
|
12
|
-
gem '
|
13
|
-
# Use postgresql as the database for Active Record
|
14
|
-
gem 'pg', '>= 0.18', '< 2.0'
|
15
|
-
# Use Puma as the app server
|
16
|
-
gem 'puma', '~> 4.3.8'
|
17
|
-
# Use SCSS for stylesheets
|
18
|
-
gem 'sass-rails', '~> 6.0'
|
19
|
-
# Use Uglifier as compressor for JavaScript assets
|
20
|
-
gem 'uglifier', '>= 1.3.0'
|
21
|
-
|
22
|
-
gem 'dalli' # mem_cache_store support
|
23
|
-
|
24
|
-
# Use CoffeeScript for .coffee assets and views
|
11
|
+
gem 'bootsnap', '>= 1.1.0', require: false
|
12
|
+
gem 'bootstrap', '~> 4.0'
|
25
13
|
gem 'coffee-rails', '~> 4.2'
|
26
|
-
|
27
|
-
gem '
|
28
|
-
|
14
|
+
gem 'dalli'
|
15
|
+
gem 'devise'
|
16
|
+
gem 'devise-guests', '~> 0.8'
|
17
|
+
gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
|
29
18
|
gem 'jbuilder', '~> 2.5'
|
30
|
-
|
31
|
-
|
32
|
-
gem '
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
19
|
+
gem 'jquery-rails'
|
20
|
+
gem 'pg', '~> 1.3'
|
21
|
+
gem 'puma'
|
22
|
+
gem 'rails', '~> 6.1'
|
23
|
+
gem 'riiif', '~> 2.1'
|
24
|
+
gem 'rsolr', '>= 1.0', '< 3'
|
25
|
+
gem 'sass-rails', '~> 6.0'
|
26
|
+
gem 'sidekiq', '~> 6.4'
|
27
|
+
gem 'turbolinks', '~> 5'
|
28
|
+
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
|
29
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
30
|
+
gem 'uglifier', '>= 1.3.0'
|
38
31
|
|
39
32
|
group :development do
|
33
|
+
gem 'better_errors' # add command line in browser when errors
|
34
|
+
gem 'binding_of_caller' # deeper stack trace used by better errors
|
35
|
+
|
40
36
|
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
41
37
|
gem 'web-console', '>= 3.3.0'
|
42
38
|
gem 'listen', '>= 3.0.5', '< 3.2'
|
@@ -45,20 +41,9 @@ group :development do
|
|
45
41
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
46
42
|
end
|
47
43
|
|
48
|
-
|
49
|
-
gem '
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
gem 'devise'
|
55
|
-
gem 'devise-guests', '~> 0.6'
|
56
|
-
gem 'jquery-rails'
|
57
|
-
gem 'pry-byebug'
|
58
|
-
gem 'pry-doc'
|
59
|
-
gem 'pry-rails'
|
60
|
-
gem 'pry-rescue'
|
61
|
-
gem 'riiif', '~> 2.1'
|
62
|
-
gem 'rsolr', '>= 1.0', '< 3'
|
63
|
-
gem 'sidekiq', '~> 6.0'
|
64
|
-
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
|
44
|
+
group :development, :test do
|
45
|
+
gem 'debug', '>= 1.0.0'
|
46
|
+
gem 'pry-doc'
|
47
|
+
gem 'pry-rails'
|
48
|
+
gem 'pry-rescue'
|
49
|
+
end
|
@@ -2,6 +2,7 @@ require 'hyrax/specs/disable_animations_in_test_environment'
|
|
2
2
|
|
3
3
|
Rails.application.configure do
|
4
4
|
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
+
config.assets.debug = true
|
5
6
|
|
6
7
|
# The test environment is used exclusively to run your application's
|
7
8
|
# test suite. You never need to work with it otherwise. Remember that
|
@@ -18,6 +18,8 @@ Hyrax.config do |config|
|
|
18
18
|
config.work_requires_files = false
|
19
19
|
config.citations = true
|
20
20
|
|
21
|
+
config.characterization_options = { ch12n_tool: ENV.fetch('CH12N_TOOL', 'fits').to_sym }
|
22
|
+
|
21
23
|
# Returns a URL that resolves to an image provided by a IIIF image server
|
22
24
|
config.iiif_image_url_builder = lambda do |file_id, base_url, size, format|
|
23
25
|
Riiif::Engine.routes.url_helpers.image_url(file_id, host: base_url, size: size)
|
@@ -40,7 +42,7 @@ Hyrax.config do |config|
|
|
40
42
|
config.browse_everything = nil
|
41
43
|
end
|
42
44
|
|
43
|
-
|
45
|
+
config.geonames_username = ENV['GEONAMES_USERNAME'] || ''
|
44
46
|
|
45
47
|
##
|
46
48
|
# Set the system-wide virus scanner
|
@@ -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
|
@@ -14,9 +12,15 @@ ActiveSupport::Reloader.to_prepare do
|
|
14
12
|
{ height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
|
15
13
|
end
|
16
14
|
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
if Hyrax.config.use_valkyrie?
|
16
|
+
Riiif::Image.file_resolver = Hyrax::RiiifFileResolver.new
|
17
|
+
else
|
18
|
+
Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
|
19
|
+
|
20
|
+
Riiif::Image.file_resolver.id_to_uri = lambda do |id|
|
21
|
+
Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
|
22
|
+
Rails.logger.info "Riiif resolved #{id} to #{url}"
|
23
|
+
end
|
20
24
|
end
|
21
25
|
end
|
22
26
|
|
@@ -25,5 +29,5 @@ ActiveSupport::Reloader.to_prepare do
|
|
25
29
|
Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
26
30
|
Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
|
27
31
|
|
28
|
-
Riiif::Engine.config.cache_duration =
|
32
|
+
Riiif::Engine.config.cache_duration = 1.day
|
29
33
|
end
|
@@ -13,11 +13,14 @@ attributes:
|
|
13
13
|
form:
|
14
14
|
primary: true
|
15
15
|
multiple: true
|
16
|
+
predicate: http://hyrax-example.com/target_audience
|
16
17
|
department:
|
17
18
|
type: string
|
18
19
|
form:
|
19
20
|
primary: true
|
21
|
+
predicate: http://hyrax-example.com/department
|
20
22
|
course:
|
21
23
|
type: string
|
22
24
|
form:
|
23
25
|
primary: false
|
26
|
+
predicate: http://hyrax-example.com/course
|