hyrax 5.0.0.rc2 → 5.0.0
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 +14 -0
- data/.dassie/app/listeners/hyrax_listener.rb +81 -0
- data/.dassie/config/environments/test.rb +0 -5
- data/.dassie/config/initializers/hyrax.rb +5 -0
- data/.dassie/config/initializers/publisher.rb +3 -0
- data/.dassie/config/initializers/riiif.rb +77 -0
- data/.gitignore +4 -0
- data/.koppie/.env +2 -2
- data/.koppie/app/forms/collection_resource_form.rb +1 -0
- data/.koppie/app/indexers/collection_resource_indexer.rb +1 -0
- data/.koppie/app/listeners/hyrax_listener.rb +81 -0
- data/.koppie/app/models/collection.rb +1 -1
- data/.koppie/app/models/collection_resource.rb +1 -0
- data/.koppie/config/analytics.yml +5 -5
- data/.koppie/config/initializers/publisher.rb +3 -0
- data/.koppie/config/initializers/riiif.rb +78 -0
- data/.koppie/config/metadata/collection_resource.yaml +8 -166
- data/.koppie/config/metadata/sample_metadata.yaml +4 -0
- data/CONTAINERS.md +39 -2
- data/Dockerfile +14 -11
- data/Gemfile +8 -7
- data/README.md +2 -0
- data/app/actors/hyrax/actors/base_actor.rb +6 -3
- data/app/actors/hyrax/actors/file_actor.rb +1 -1
- data/app/actors/hyrax/actors/lease_actor.rb +3 -6
- data/app/assets/javascripts/hyrax/save_work/uploaded_files.es6 +10 -2
- data/app/assets/stylesheets/hyrax/sidebar.scss +6 -1
- data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +1 -1
- data/app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb +12 -19
- data/app/controllers/concerns/hyrax/stream_file_downloads_controller_behavior.rb +54 -0
- data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +38 -9
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +19 -14
- data/app/controllers/hyrax/admin/admin_sets_controller.rb +2 -2
- data/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +5 -5
- data/app/controllers/hyrax/dashboard/collections_controller.rb +2 -5
- data/app/controllers/hyrax/downloads_controller.rb +1 -0
- data/app/controllers/hyrax/file_sets_controller.rb +3 -2
- data/app/controllers/hyrax/my/collections_controller.rb +1 -1
- data/app/forms/concerns/hyrax/basic_metadata_form_fields_behavior.rb +1 -0
- data/app/forms/concerns/hyrax/contained_in_works_behavior.rb +24 -0
- data/app/forms/concerns/hyrax/deposit_agreement_behavior.rb +12 -0
- data/app/forms/concerns/hyrax/leaseability_behavior.rb +49 -0
- data/app/forms/concerns/hyrax/permission_behavior.rb +20 -0
- data/app/forms/hyrax/forms/administrative_set_form.rb +1 -5
- data/app/forms/hyrax/forms/collection_form.rb +19 -0
- data/app/forms/hyrax/forms/file_set_form.rb +5 -0
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +1 -5
- data/app/forms/hyrax/forms/pcdm_object_form.rb +13 -22
- data/app/forms/hyrax/forms/resource_batch_edit_form.rb +7 -2
- data/app/forms/hyrax/forms/resource_form.rb +30 -100
- data/app/forms/hyrax/forms.rb +52 -0
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +2 -0
- data/app/indexers/{hyrax → concerns/hyrax}/location_indexer.rb +1 -5
- data/app/indexers/{hyrax → concerns/hyrax}/permission_indexer.rb +2 -2
- data/app/indexers/{hyrax → concerns/hyrax}/visibility_indexer.rb +1 -1
- data/app/indexers/hyrax/administrative_set_indexer.rb +5 -17
- data/app/indexers/hyrax/indexers/administrative_set_indexer.rb +25 -0
- data/app/indexers/hyrax/indexers/file_set_indexer.rb +144 -0
- data/app/indexers/hyrax/indexers/pcdm_collection_indexer.rb +27 -0
- data/app/indexers/hyrax/indexers/pcdm_object_indexer.rb +72 -0
- data/app/indexers/hyrax/indexers/resource_indexer.rb +86 -0
- data/app/indexers/hyrax/indexers.rb +54 -0
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +5 -18
- data/app/indexers/hyrax/valkyrie_collection_indexer.rb +6 -4
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +5 -136
- data/app/indexers/hyrax/valkyrie_indexer.rb +8 -112
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +5 -64
- data/app/indexers/hyrax/work_indexer.rb +1 -0
- data/app/jobs/create_work_job.rb +1 -0
- data/app/models/admin_set.rb +20 -1
- data/app/models/collection.rb +5 -0
- data/app/models/concerns/hyrax/ability/admin_set_ability.rb +13 -28
- data/app/models/concerns/hyrax/ability/collection_ability.rb +26 -28
- data/app/models/concerns/hyrax/ability/resource_ability.rb +19 -0
- data/app/models/concerns/hyrax/ability.rb +11 -9
- data/app/models/concerns/hyrax/collection_behavior.rb +8 -0
- data/app/models/concerns/hyrax/solr_document_behavior.rb +15 -5
- data/app/models/concerns/hyrax/work_behavior.rb +4 -0
- data/app/models/featured_work.rb +12 -4
- data/app/models/file_set.rb +5 -0
- data/app/models/hyrax/administrative_set.rb +1 -1
- data/app/models/hyrax/change_set.rb +2 -2
- data/app/models/hyrax/file_metadata.rb +34 -7
- data/app/models/hyrax/file_set.rb +2 -2
- data/app/models/hyrax/group.rb +9 -38
- data/app/models/hyrax/group_behavior.rb +58 -0
- data/app/models/hyrax/model_registry.rb +111 -0
- data/app/models/hyrax/pcdm_collection.rb +1 -7
- data/app/models/hyrax/resource.rb +66 -8
- data/app/models/hyrax/statistic.rb +1 -1
- data/app/models/hyrax/work.rb +1 -7
- data/app/presenters/hyrax/collapsable_section_presenter.rb +7 -3
- data/app/presenters/hyrax/file_set_presenter.rb +8 -6
- data/app/presenters/hyrax/lease_presenter.rb +4 -0
- data/app/presenters/hyrax/menu_presenter.rb +14 -2
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +1 -1
- data/app/presenters/hyrax/version_list_presenter.rb +6 -4
- data/app/search_builders/hyrax/admin_set_search_builder.rb +1 -1
- data/app/search_builders/hyrax/catalog_search_builder.rb +8 -2
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +5 -3
- data/app/search_builders/hyrax/exposed_models_relation.rb +1 -1
- data/app/search_builders/hyrax/file_set_search_builder.rb +1 -1
- data/app/search_builders/hyrax/filter_by_type.rb +3 -2
- data/app/search_builders/hyrax/member_with_files_search_builder.rb +1 -1
- data/app/search_builders/hyrax/my/collections_search_builder.rb +2 -2
- data/app/search_builders/hyrax/my/find_works_search_builder.rb +8 -3
- data/app/services/hyrax/access_control_list.rb +21 -4
- data/app/services/hyrax/action/create_valkyrie_work.rb +80 -0
- data/app/services/hyrax/admin_set_create_service.rb +7 -3
- data/app/services/hyrax/admin_set_service.rb +2 -2
- data/app/services/hyrax/collections/collection_member_search_service.rb +2 -0
- data/app/services/hyrax/collections/permissions_service.rb +27 -9
- data/app/services/hyrax/custom_queries/find_collections_by_type.rb +1 -1
- data/app/services/hyrax/custom_queries/find_file_metadata.rb +1 -1
- data/app/services/hyrax/custom_queries/navigators/find_files.rb +1 -1
- data/app/services/hyrax/custom_queries/navigators/parent_work_navigator.rb +1 -1
- data/app/services/hyrax/edit_permissions_service.rb +1 -1
- data/app/services/hyrax/embargo_manager.rb +1 -1
- data/app/services/hyrax/file_set_file_service.rb +21 -10
- data/app/services/hyrax/form_factory.rb +1 -1
- data/app/services/hyrax/lease_manager.rb +39 -16
- data/app/services/hyrax/lease_service.rb +12 -6
- data/app/services/hyrax/listeners/acl_index_listener.rb +1 -1
- data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +1 -1
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +15 -1
- data/app/services/hyrax/listeners/object_lifecycle_listener.rb +5 -1
- data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +2 -1
- data/app/services/hyrax/listeners/workflow_listener.rb +13 -0
- data/app/services/hyrax/listeners.rb +2 -1
- data/app/services/hyrax/location_service.rb +3 -0
- data/app/services/hyrax/multiple_membership_checker.rb +1 -1
- data/app/services/hyrax/simple_schema_loader.rb +1 -1
- data/app/services/hyrax/solr_service.rb +19 -5
- data/app/services/hyrax/statistics/collections/over_time.rb +1 -1
- data/app/services/hyrax/statistics/query_service.rb +6 -0
- data/app/services/hyrax/valkyrie_persist_derivatives.rb +11 -4
- data/app/services/hyrax/valkyrie_upload.rb +1 -1
- data/app/services/hyrax/work_uploads_handler.rb +5 -4
- data/app/views/_user_util_links.html.erb +1 -1
- data/app/views/collections/edit_fields/_based_near.html.erb +11 -7
- data/app/views/hyrax/admin/admin_sets/_form_participants.html.erb +67 -67
- data/app/views/hyrax/admin/admin_sets/edit.html.erb +1 -1
- data/app/views/hyrax/admin/collection_types/_form_participants.html.erb +3 -1
- data/app/views/hyrax/base/_attribute_rows.html.erb +1 -0
- data/app/views/hyrax/base/_base_form_files_prepend.html.erb +4 -0
- data/app/views/hyrax/base/_form_files.html.erb +65 -64
- data/app/views/hyrax/base/show.html.erb +2 -3
- data/app/views/hyrax/collections/show.html.erb +7 -9
- data/app/views/hyrax/dashboard/_sidebar.html.erb +4 -3
- data/app/views/hyrax/dashboard/collections/_form_share_table.html.erb +2 -2
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
- data/app/views/hyrax/my/facet.html.erb +1 -1
- data/app/views/layouts/_head_tag_content.html.erb +1 -0
- data/app/views/shared/_footer.html.erb +1 -1
- data/chart/hyrax/Chart.yaml +3 -3
- data/chart/hyrax/templates/_tmplvalues.tpl +38 -0
- data/chart/hyrax/templates/deployment-worker.yaml +6 -2
- data/chart/hyrax/templates/deployment.yaml +9 -3
- data/chart/hyrax/values.yaml +9 -1
- data/config/initializers/listeners.rb +1 -1
- data/config/locales/hyrax.de.yml +5 -0
- data/config/locales/hyrax.en.yml +10 -0
- data/config/locales/hyrax.es.yml +5 -0
- data/config/locales/hyrax.fr.yml +5 -0
- data/config/locales/hyrax.it.yml +5 -0
- data/config/locales/hyrax.pt-BR.yml +5 -0
- data/config/locales/hyrax.zh.yml +5 -0
- data/config/metadata/basic_metadata.yaml +1 -0
- data/config/metadata/core_metadata.yaml +2 -0
- data/config/metadata/file_set_metadata.yaml +2 -0
- data/docker-compose-koppie.yml +3 -3
- data/docker-compose-sirenia.yml +3 -3
- data/documentation/developing-your-hyrax-based-app.md +89 -67
- data/hyrax.gemspec +9 -2
- data/lib/generators/hyrax/collection_resource/templates/collection_indexer.rb.erb +1 -1
- data/lib/generators/hyrax/config_generator.rb +12 -0
- data/lib/generators/hyrax/install_generator.rb +37 -7
- data/lib/generators/hyrax/listeners_generator.rb +18 -0
- data/lib/generators/hyrax/models_generator.rb +1 -10
- data/lib/generators/hyrax/riiif_generator.rb +6 -4
- data/lib/generators/hyrax/templates/.env +9 -0
- data/lib/generators/hyrax/templates/.lando.yml +50 -0
- data/lib/generators/hyrax/templates/app/listeners/hyrax_listener.rb +81 -0
- data/lib/generators/hyrax/templates/app/models/file_set.rb +1 -2
- data/lib/generators/hyrax/templates/config/initializers/1_valkyrie.rb +102 -0
- data/lib/generators/hyrax/templates/config/initializers/file_services.rb +6 -0
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +41 -5
- data/lib/generators/hyrax/templates/config/initializers/publisher.rb +3 -0
- data/lib/generators/hyrax/templates/config/initializers/riiif.rb +77 -0
- data/lib/generators/hyrax/templates/config/locales/hyrax.de.yml +1 -1
- data/lib/generators/hyrax/templates/config/locales/hyrax.en.yml +1 -1
- data/lib/generators/hyrax/templates/config/locales/hyrax.es.yml +1 -1
- data/lib/generators/hyrax/templates/config/locales/hyrax.fr.yml +1 -1
- data/lib/generators/hyrax/templates/config/locales/hyrax.it.yml +1 -1
- data/lib/generators/hyrax/templates/config/locales/hyrax.pt-BR.yml +1 -1
- data/lib/generators/hyrax/templates/config/locales/hyrax.zh.yml +1 -1
- data/lib/generators/hyrax/templates/config/redis.yml +3 -6
- data/lib/generators/hyrax/templates/config/valkyrie_index.yml +4 -9
- data/lib/generators/hyrax/work_resource/templates/indexer.rb.erb +1 -1
- data/lib/hyrax/configuration.rb +95 -7
- data/lib/hyrax/indexer.rb +1 -1
- data/lib/hyrax/publisher.rb +5 -2
- data/lib/hyrax/resource_sync/change_list_writer.rb +1 -1
- data/lib/hyrax/resource_sync/resource_list_writer.rb +1 -1
- data/lib/hyrax/specs/capybara.rb +1 -0
- data/lib/hyrax/specs/shared_specs/hydra_works.rb +78 -20
- data/lib/hyrax/specs/shared_specs/indexers.rb +1 -1
- data/lib/hyrax/transactions/admin_set_destroy.rb +2 -1
- data/lib/hyrax/transactions/container.rb +5 -0
- data/lib/hyrax/transactions/steps/add_to_parent.rb +1 -0
- data/lib/hyrax/transactions/steps/check_for_default_admin_set.rb +32 -0
- data/lib/hyrax/transactions/steps/check_for_empty_admin_set.rb +1 -1
- data/lib/hyrax/transactions/steps/save.rb +2 -1
- data/lib/hyrax/transactions/steps/set_user_as_creator.rb +1 -1
- data/lib/hyrax/transactions/steps/update_work_members.rb +2 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +1 -0
- data/lib/tasks/embargo_lease.rake +1 -0
- data/lib/valkyrie/indexing/solr/indexing_adapter.rb +21 -7
- data/lib/wings/active_fedora_converter/default_work.rb +4 -5
- data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
- data/lib/wings/model_registry.rb +8 -0
- data/lib/wings/model_transformer.rb +19 -2
- data/lib/wings/orm_converter.rb +4 -0
- data/lib/wings/services/custom_queries/find_ids_by_model.rb +2 -2
- data/lib/wings/valkyrie/query_service.rb +5 -2
- data/lib/wings.rb +3 -0
- data/spec/factories/access_control.rb +12 -0
- data/spec/factories/admin_sets.rb +32 -0
- data/spec/factories/admin_sets_lw.rb +222 -0
- data/spec/factories/administrative_sets.rb +79 -0
- data/spec/factories/api_items.rb +92 -0
- data/spec/factories/collection_branding_infos.rb +12 -0
- data/spec/factories/collection_type_participants.rb +9 -0
- data/spec/factories/collection_types.rb +139 -0
- data/spec/factories/collections.rb +282 -0
- data/spec/factories/collections_factory.rb +107 -0
- data/spec/factories/content_blocks.rb +5 -0
- data/spec/factories/counter_metrics.rb +12 -0
- data/spec/factories/featured_works.rb +5 -0
- data/spec/factories/file_sets.rb +45 -0
- data/spec/factories/generic_works.rb +200 -0
- data/spec/factories/hyrax_collection.rb +92 -0
- data/spec/factories/hyrax_default_admin_set.rb +7 -0
- data/spec/factories/hyrax_embargo.rb +18 -0
- data/spec/factories/hyrax_file_metadata.rb +92 -0
- data/spec/factories/hyrax_file_set.rb +129 -0
- data/spec/factories/hyrax_lease.rb +18 -0
- data/spec/factories/hyrax_resource.rb +15 -0
- data/spec/factories/hyrax_work.rb +221 -0
- data/spec/factories/object_id.rb +7 -0
- data/spec/factories/operations.rb +22 -0
- data/spec/factories/permission.rb +7 -0
- data/spec/factories/permission_template_accesses.rb +17 -0
- data/spec/factories/permission_templates.rb +111 -0
- data/spec/factories/proxy_deposit_requests.rb +7 -0
- data/spec/factories/single_use_links.rb +14 -0
- data/spec/factories/sipity_entities.rb +17 -0
- data/spec/factories/uploaded_files.rb +11 -0
- data/spec/factories/users.rb +52 -0
- data/spec/factories/workflow_actions.rb +7 -0
- data/spec/factories/workflow_states.rb +7 -0
- data/spec/factories/workflows.rb +7 -0
- data/spec/support/book_resource.rb +36 -0
- data/spec/support/can_can_overrides.rb +43 -0
- data/spec/support/clean_solr.rb +7 -0
- data/spec/support/controller_level_helpers.rb +27 -0
- data/spec/support/factory_helpers.rb +94 -0
- data/spec/support/fakes/fake_actor.rb +22 -0
- data/spec/support/fakes/fake_authority.rb +14 -0
- data/spec/support/fakes/fake_search_builder_scope.rb +44 -0
- data/spec/support/fakes/indexing_adapter.rb +17 -0
- data/spec/support/fakes/test_hydra_group_service.rb +55 -0
- data/spec/support/features/batch_edit_actions.rb +37 -0
- data/spec/support/features/session_helpers.rb +15 -0
- data/spec/support/features/workflow.rb +10 -0
- data/spec/support/features.rb +11 -0
- data/spec/support/form_with_validations.rb +15 -0
- data/spec/support/input_support.rb +12 -0
- data/spec/support/logging_formatter.rb +67 -0
- data/spec/support/matchers/api_responses.rb +27 -0
- data/spec/support/matchers/collection_type_property_matchers.rb +30 -0
- data/spec/support/matchers/embargo.rb +9 -0
- data/spec/support/matchers/lease.rb +9 -0
- data/spec/support/matchers/match_valkyrie_ids_with_af_ids.rb +12 -0
- data/spec/support/matchers/pcdm_matchers.rb +34 -0
- data/spec/support/matchers/permission.rb +31 -0
- data/spec/support/matchers/response_matchers.rb +8 -0
- data/spec/support/optional_example.rb +17 -0
- data/spec/support/rake.rb +42 -0
- data/spec/support/selectors.rb +112 -0
- data/spec/support/shared_examples_for_collection_presenter.rb +44 -0
- data/spec/support/simple_work.rb +28 -0
- data/spec/support/spec_statistic.rb +24 -0
- data/spec/support/speedup.rb +7 -0
- data/spec/support/statistic_helper.rb +10 -0
- data/spec/support/valkyrie_indexing.rb +2 -0
- data/spec/support/wings_models.rb +9 -0
- data/template.rb +1 -3
- metadata +113 -30
- data/app/indexers/hyrax/resource_indexer.rb +0 -15
- data/app/models/concerns/hyrax/riiif_file.rb +0 -30
- data/app/services/hyrax/characterization/model_wrapper.rb +0 -0
- data/app/services/hyrax/custom_queries/find_by_collection_type.rb +0 -0
- data/app/services/hyrax/query_service.rb +0 -0
- data/app/services/hyrax/riiif_file_resolver.rb +0 -50
- data/lib/hyrax/specs/disable_animations_in_test_environment.rb +0 -53
- /data/app/indexers/{hyrax → concerns/hyrax}/thumbnail_indexer.rb +0 -0
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2024-03-01 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rails
|
@@ -266,20 +266,6 @@ dependencies:
|
|
266
266
|
- - "~>"
|
267
267
|
- !ruby/object:Gem::Version
|
268
268
|
version: '1.6'
|
269
|
-
- !ruby/object:Gem::Dependency
|
270
|
-
name: dry-struct
|
271
|
-
requirement: !ruby/object:Gem::Requirement
|
272
|
-
requirements:
|
273
|
-
- - "~>"
|
274
|
-
- !ruby/object:Gem::Version
|
275
|
-
version: '1.6'
|
276
|
-
type: :runtime
|
277
|
-
prerelease: false
|
278
|
-
version_requirements: !ruby/object:Gem::Requirement
|
279
|
-
requirements:
|
280
|
-
- - "~>"
|
281
|
-
- !ruby/object:Gem::Version
|
282
|
-
version: '1.6'
|
283
269
|
- !ruby/object:Gem::Dependency
|
284
270
|
name: dry-validation
|
285
271
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1169,6 +1155,7 @@ files:
|
|
1169
1155
|
- ".dassie/app/indexers/monograph_indexer.rb"
|
1170
1156
|
- ".dassie/app/indexers/namespaced_works/nested_work_indexer.rb"
|
1171
1157
|
- ".dassie/app/jobs/application_job.rb"
|
1158
|
+
- ".dassie/app/listeners/hyrax_listener.rb"
|
1172
1159
|
- ".dassie/app/mailers/application_mailer.rb"
|
1173
1160
|
- ".dassie/app/models/ability.rb"
|
1174
1161
|
- ".dassie/app/models/application_record.rb"
|
@@ -1230,6 +1217,7 @@ files:
|
|
1230
1217
|
- ".dassie/config/initializers/mailboxer.rb"
|
1231
1218
|
- ".dassie/config/initializers/mime_types.rb"
|
1232
1219
|
- ".dassie/config/initializers/mini_magick.rb"
|
1220
|
+
- ".dassie/config/initializers/publisher.rb"
|
1233
1221
|
- ".dassie/config/initializers/redis_config.rb"
|
1234
1222
|
- ".dassie/config/initializers/riiif.rb"
|
1235
1223
|
- ".dassie/config/initializers/simple_form.rb"
|
@@ -1440,6 +1428,7 @@ files:
|
|
1440
1428
|
- ".koppie/app/indexers/generic_work_indexer.rb"
|
1441
1429
|
- ".koppie/app/indexers/monograph_indexer.rb"
|
1442
1430
|
- ".koppie/app/jobs/application_job.rb"
|
1431
|
+
- ".koppie/app/listeners/hyrax_listener.rb"
|
1443
1432
|
- ".koppie/app/mailers/application_mailer.rb"
|
1444
1433
|
- ".koppie/app/models/ability.rb"
|
1445
1434
|
- ".koppie/app/models/application_record.rb"
|
@@ -1502,6 +1491,7 @@ files:
|
|
1502
1491
|
- ".koppie/config/initializers/mailboxer.rb"
|
1503
1492
|
- ".koppie/config/initializers/mime_types.rb"
|
1504
1493
|
- ".koppie/config/initializers/mini_magick.rb"
|
1494
|
+
- ".koppie/config/initializers/publisher.rb"
|
1505
1495
|
- ".koppie/config/initializers/redis_config.rb"
|
1506
1496
|
- ".koppie/config/initializers/riiif.rb"
|
1507
1497
|
- ".koppie/config/initializers/simple_form.rb"
|
@@ -1520,6 +1510,7 @@ files:
|
|
1520
1510
|
- ".koppie/config/metadata/collection_resource.yaml"
|
1521
1511
|
- ".koppie/config/metadata/generic_work.yaml"
|
1522
1512
|
- ".koppie/config/metadata/monograph.yaml"
|
1513
|
+
- ".koppie/config/metadata/sample_metadata.yaml"
|
1523
1514
|
- ".koppie/config/puma.rb"
|
1524
1515
|
- ".koppie/config/redis.yml"
|
1525
1516
|
- ".koppie/config/role_map.yml"
|
@@ -1887,6 +1878,7 @@ files:
|
|
1887
1878
|
- app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb
|
1888
1879
|
- app/controllers/concerns/hyrax/manages_embargoes.rb
|
1889
1880
|
- app/controllers/concerns/hyrax/singular_subresource_controller.rb
|
1881
|
+
- app/controllers/concerns/hyrax/stream_file_downloads_controller_behavior.rb
|
1890
1882
|
- app/controllers/concerns/hyrax/themed_layout_controller.rb
|
1891
1883
|
- app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb
|
1892
1884
|
- app/controllers/concerns/hyrax/works_controller_behavior.rb
|
@@ -1948,6 +1940,11 @@ files:
|
|
1948
1940
|
- app/controllers/hyrax/users_controller.rb
|
1949
1941
|
- app/controllers/hyrax/workflow_actions_controller.rb
|
1950
1942
|
- app/forms/concerns/hyrax/basic_metadata_form_fields_behavior.rb
|
1943
|
+
- app/forms/concerns/hyrax/contained_in_works_behavior.rb
|
1944
|
+
- app/forms/concerns/hyrax/deposit_agreement_behavior.rb
|
1945
|
+
- app/forms/concerns/hyrax/leaseability_behavior.rb
|
1946
|
+
- app/forms/concerns/hyrax/permission_behavior.rb
|
1947
|
+
- app/forms/hyrax/forms.rb
|
1951
1948
|
- app/forms/hyrax/forms/admin/appearance.rb
|
1952
1949
|
- app/forms/hyrax/forms/admin/collection_type_form.rb
|
1953
1950
|
- app/forms/hyrax/forms/admin/collection_type_participant_form.rb
|
@@ -2009,6 +2006,10 @@ files:
|
|
2009
2006
|
- app/helpers/hyrax/workflows_helper.rb
|
2010
2007
|
- app/indexers/concerns/hyrax/indexes_basic_metadata.rb
|
2011
2008
|
- app/indexers/concerns/hyrax/indexes_linked_metadata.rb
|
2009
|
+
- app/indexers/concerns/hyrax/location_indexer.rb
|
2010
|
+
- app/indexers/concerns/hyrax/permission_indexer.rb
|
2011
|
+
- app/indexers/concerns/hyrax/thumbnail_indexer.rb
|
2012
|
+
- app/indexers/concerns/hyrax/visibility_indexer.rb
|
2012
2013
|
- app/indexers/hyrax/admin_set_indexer.rb
|
2013
2014
|
- app/indexers/hyrax/administrative_set_indexer.rb
|
2014
2015
|
- app/indexers/hyrax/basic_metadata_indexer.rb
|
@@ -2016,17 +2017,18 @@ files:
|
|
2016
2017
|
- app/indexers/hyrax/collection_with_basic_metadata_indexer.rb
|
2017
2018
|
- app/indexers/hyrax/deep_indexing_service.rb
|
2018
2019
|
- app/indexers/hyrax/file_set_indexer.rb
|
2020
|
+
- app/indexers/hyrax/indexers.rb
|
2021
|
+
- app/indexers/hyrax/indexers/administrative_set_indexer.rb
|
2022
|
+
- app/indexers/hyrax/indexers/file_set_indexer.rb
|
2023
|
+
- app/indexers/hyrax/indexers/pcdm_collection_indexer.rb
|
2024
|
+
- app/indexers/hyrax/indexers/pcdm_object_indexer.rb
|
2025
|
+
- app/indexers/hyrax/indexers/resource_indexer.rb
|
2019
2026
|
- app/indexers/hyrax/indexes_workflow.rb
|
2020
|
-
- app/indexers/hyrax/location_indexer.rb
|
2021
2027
|
- app/indexers/hyrax/pcdm_collection_indexer.rb
|
2022
|
-
- app/indexers/hyrax/permission_indexer.rb
|
2023
|
-
- app/indexers/hyrax/resource_indexer.rb
|
2024
|
-
- app/indexers/hyrax/thumbnail_indexer.rb
|
2025
2028
|
- app/indexers/hyrax/valkyrie_collection_indexer.rb
|
2026
2029
|
- app/indexers/hyrax/valkyrie_file_set_indexer.rb
|
2027
2030
|
- app/indexers/hyrax/valkyrie_indexer.rb
|
2028
2031
|
- app/indexers/hyrax/valkyrie_work_indexer.rb
|
2029
|
-
- app/indexers/hyrax/visibility_indexer.rb
|
2030
2032
|
- app/indexers/hyrax/work_indexer.rb
|
2031
2033
|
- app/inputs/controlled_vocabulary_input.rb
|
2032
2034
|
- app/inputs/multi_value_select_input.rb
|
@@ -2076,12 +2078,14 @@ files:
|
|
2076
2078
|
- app/models/admin_set.rb
|
2077
2079
|
- app/models/batch_upload_item.rb
|
2078
2080
|
- app/models/checksum_audit_log.rb
|
2081
|
+
- app/models/collection.rb
|
2079
2082
|
- app/models/collection_branding_info.rb
|
2080
2083
|
- app/models/concerns/hyrax/ability.rb
|
2081
2084
|
- app/models/concerns/hyrax/ability/admin_set_ability.rb
|
2082
2085
|
- app/models/concerns/hyrax/ability/collection_ability.rb
|
2083
2086
|
- app/models/concerns/hyrax/ability/collection_type_ability.rb
|
2084
2087
|
- app/models/concerns/hyrax/ability/permission_template_ability.rb
|
2088
|
+
- app/models/concerns/hyrax/ability/resource_ability.rb
|
2085
2089
|
- app/models/concerns/hyrax/ability/solr_document_ability.rb
|
2086
2090
|
- app/models/concerns/hyrax/basic_metadata.rb
|
2087
2091
|
- app/models/concerns/hyrax/collection_behavior.rb
|
@@ -2103,7 +2107,6 @@ files:
|
|
2103
2107
|
- app/models/concerns/hyrax/permissions/readable.rb
|
2104
2108
|
- app/models/concerns/hyrax/permissions/writable.rb
|
2105
2109
|
- app/models/concerns/hyrax/proxy_deposit.rb
|
2106
|
-
- app/models/concerns/hyrax/riiif_file.rb
|
2107
2110
|
- app/models/concerns/hyrax/serializers.rb
|
2108
2111
|
- app/models/concerns/hyrax/solr_document/characterization.rb
|
2109
2112
|
- app/models/concerns/hyrax/solr_document/export.rb
|
@@ -2121,6 +2124,7 @@ files:
|
|
2121
2124
|
- app/models/featured_work.rb
|
2122
2125
|
- app/models/featured_work_list.rb
|
2123
2126
|
- app/models/file_download_stat.rb
|
2127
|
+
- app/models/file_set.rb
|
2124
2128
|
- app/models/file_view_stat.rb
|
2125
2129
|
- app/models/hyrax/access_control.rb
|
2126
2130
|
- app/models/hyrax/administrative_set.rb
|
@@ -2140,7 +2144,9 @@ files:
|
|
2140
2144
|
- app/models/hyrax/file_metadata.rb
|
2141
2145
|
- app/models/hyrax/file_set.rb
|
2142
2146
|
- app/models/hyrax/group.rb
|
2147
|
+
- app/models/hyrax/group_behavior.rb
|
2143
2148
|
- app/models/hyrax/lease.rb
|
2149
|
+
- app/models/hyrax/model_registry.rb
|
2144
2150
|
- app/models/hyrax/operation.rb
|
2145
2151
|
- app/models/hyrax/orcid_validator.rb
|
2146
2152
|
- app/models/hyrax/pageview.rb
|
@@ -2291,6 +2297,7 @@ files:
|
|
2291
2297
|
- app/search_builders/hyrax/works_search_builder.rb
|
2292
2298
|
- app/services/hyrax/abstract_message_service.rb
|
2293
2299
|
- app/services/hyrax/access_control_list.rb
|
2300
|
+
- app/services/hyrax/action/create_valkyrie_work.rb
|
2294
2301
|
- app/services/hyrax/admin_set_create_service.rb
|
2295
2302
|
- app/services/hyrax/admin_set_member_service.rb
|
2296
2303
|
- app/services/hyrax/admin_set_service.rb
|
@@ -2309,7 +2316,6 @@ files:
|
|
2309
2316
|
- app/services/hyrax/change_content_depositor_service.rb
|
2310
2317
|
- app/services/hyrax/change_depositor_service.rb
|
2311
2318
|
- app/services/hyrax/characterization/file_set_description.rb
|
2312
|
-
- app/services/hyrax/characterization/model_wrapper.rb
|
2313
2319
|
- app/services/hyrax/characterization/valkyrie_characterization_service.rb
|
2314
2320
|
- app/services/hyrax/child_types.rb
|
2315
2321
|
- app/services/hyrax/collection_member_service.rb
|
@@ -2329,7 +2335,6 @@ files:
|
|
2329
2335
|
- app/services/hyrax/curation_concern.rb
|
2330
2336
|
- app/services/hyrax/custom_queries.rb
|
2331
2337
|
- app/services/hyrax/custom_queries/find_access_control.rb
|
2332
|
-
- app/services/hyrax/custom_queries/find_by_collection_type.rb
|
2333
2338
|
- app/services/hyrax/custom_queries/find_by_date_range.rb
|
2334
2339
|
- app/services/hyrax/custom_queries/find_collections_by_type.rb
|
2335
2340
|
- app/services/hyrax/custom_queries/find_count_by.rb
|
@@ -2405,7 +2410,6 @@ files:
|
|
2405
2410
|
- app/services/hyrax/persist_derivatives.rb
|
2406
2411
|
- app/services/hyrax/persist_directly_contained_output_file_service.rb
|
2407
2412
|
- app/services/hyrax/qa_select_service.rb
|
2408
|
-
- app/services/hyrax/query_service.rb
|
2409
2413
|
- app/services/hyrax/quick_classification_query.rb
|
2410
2414
|
- app/services/hyrax/repository_fixity_check_service.rb
|
2411
2415
|
- app/services/hyrax/resource_status.rb
|
@@ -2413,7 +2417,6 @@ files:
|
|
2413
2417
|
- app/services/hyrax/resource_visibility_propagator.rb
|
2414
2418
|
- app/services/hyrax/restriction_service.rb
|
2415
2419
|
- app/services/hyrax/rights_statement_service.rb
|
2416
|
-
- app/services/hyrax/riiif_file_resolver.rb
|
2417
2420
|
- app/services/hyrax/search_service.rb
|
2418
2421
|
- app/services/hyrax/simple_schema_loader.rb
|
2419
2422
|
- app/services/hyrax/solr_query_builder_service.rb
|
@@ -2580,6 +2583,7 @@ files:
|
|
2580
2583
|
- app/views/hyrax/base/_actions.html.erb
|
2581
2584
|
- app/views/hyrax/base/_attribute_rows.html.erb
|
2582
2585
|
- app/views/hyrax/base/_attributes.html.erb
|
2586
|
+
- app/views/hyrax/base/_base_form_files_prepend.html.erb
|
2583
2587
|
- app/views/hyrax/base/_citations.html.erb
|
2584
2588
|
- app/views/hyrax/base/_currently_shared.html.erb
|
2585
2589
|
- app/views/hyrax/base/_file_manager_actions.html.erb
|
@@ -2931,6 +2935,7 @@ files:
|
|
2931
2935
|
- chart/hyrax/README.md
|
2932
2936
|
- chart/hyrax/templates/NOTES.txt
|
2933
2937
|
- chart/hyrax/templates/_helpers.tpl
|
2938
|
+
- chart/hyrax/templates/_tmplvalues.tpl
|
2934
2939
|
- chart/hyrax/templates/branding-pvc.yaml
|
2935
2940
|
- chart/hyrax/templates/configmap-env.yaml
|
2936
2941
|
- chart/hyrax/templates/cron-embargo.yaml
|
@@ -3005,11 +3010,15 @@ files:
|
|
3005
3010
|
- lib/generators/hyrax/config_generator.rb
|
3006
3011
|
- lib/generators/hyrax/health_check_generator.rb
|
3007
3012
|
- lib/generators/hyrax/install_generator.rb
|
3013
|
+
- lib/generators/hyrax/listeners_generator.rb
|
3008
3014
|
- lib/generators/hyrax/models_generator.rb
|
3009
3015
|
- lib/generators/hyrax/riiif_generator.rb
|
3010
3016
|
- lib/generators/hyrax/sample_data_generator.rb
|
3017
|
+
- lib/generators/hyrax/templates/.env
|
3018
|
+
- lib/generators/hyrax/templates/.lando.yml
|
3011
3019
|
- lib/generators/hyrax/templates/app/assets/images/unauthorized.png
|
3012
3020
|
- lib/generators/hyrax/templates/app/assets/images/us_404.svg
|
3021
|
+
- lib/generators/hyrax/templates/app/listeners/hyrax_listener.rb
|
3013
3022
|
- lib/generators/hyrax/templates/app/models/collection.rb
|
3014
3023
|
- lib/generators/hyrax/templates/app/models/file_set.rb
|
3015
3024
|
- lib/generators/hyrax/templates/catalog_controller.rb
|
@@ -3021,8 +3030,11 @@ files:
|
|
3021
3030
|
- lib/generators/hyrax/templates/config/authorities/resource_types.yml
|
3022
3031
|
- lib/generators/hyrax/templates/config/authorities/rights_statements.yml
|
3023
3032
|
- lib/generators/hyrax/templates/config/clamav.rb
|
3033
|
+
- lib/generators/hyrax/templates/config/initializers/1_valkyrie.rb
|
3034
|
+
- lib/generators/hyrax/templates/config/initializers/file_services.rb
|
3024
3035
|
- lib/generators/hyrax/templates/config/initializers/hyrax.rb
|
3025
3036
|
- lib/generators/hyrax/templates/config/initializers/mini_magick.rb
|
3037
|
+
- lib/generators/hyrax/templates/config/initializers/publisher.rb
|
3026
3038
|
- lib/generators/hyrax/templates/config/initializers/redis_config.rb
|
3027
3039
|
- lib/generators/hyrax/templates/config/initializers/riiif.rb
|
3028
3040
|
- lib/generators/hyrax/templates/config/initializers/simple_form.rb
|
@@ -3181,7 +3193,6 @@ files:
|
|
3181
3193
|
- lib/hyrax/search_state.rb
|
3182
3194
|
- lib/hyrax/specs/capybara.rb
|
3183
3195
|
- lib/hyrax/specs/clamav.rb
|
3184
|
-
- lib/hyrax/specs/disable_animations_in_test_environment.rb
|
3185
3196
|
- lib/hyrax/specs/engine_routes.rb
|
3186
3197
|
- lib/hyrax/specs/shared_specs.rb
|
3187
3198
|
- lib/hyrax/specs/shared_specs/change_set.rb
|
@@ -3212,6 +3223,7 @@ files:
|
|
3212
3223
|
- lib/hyrax/transactions/steps/apply_collection_type_permissions.rb
|
3213
3224
|
- lib/hyrax/transactions/steps/apply_permission_template.rb
|
3214
3225
|
- lib/hyrax/transactions/steps/change_depositor.rb
|
3226
|
+
- lib/hyrax/transactions/steps/check_for_default_admin_set.rb
|
3215
3227
|
- lib/hyrax/transactions/steps/check_for_empty_admin_set.rb
|
3216
3228
|
- lib/hyrax/transactions/steps/delete_access_control.rb
|
3217
3229
|
- lib/hyrax/transactions/steps/delete_all_file_metadata.rb
|
@@ -3287,6 +3299,77 @@ files:
|
|
3287
3299
|
- lib/wings/valkyrizable.rb
|
3288
3300
|
- package.json
|
3289
3301
|
- samvera-fall-TM3.svg
|
3302
|
+
- spec/factories/access_control.rb
|
3303
|
+
- spec/factories/admin_sets.rb
|
3304
|
+
- spec/factories/admin_sets_lw.rb
|
3305
|
+
- spec/factories/administrative_sets.rb
|
3306
|
+
- spec/factories/api_items.rb
|
3307
|
+
- spec/factories/collection_branding_infos.rb
|
3308
|
+
- spec/factories/collection_type_participants.rb
|
3309
|
+
- spec/factories/collection_types.rb
|
3310
|
+
- spec/factories/collections.rb
|
3311
|
+
- spec/factories/collections_factory.rb
|
3312
|
+
- spec/factories/content_blocks.rb
|
3313
|
+
- spec/factories/counter_metrics.rb
|
3314
|
+
- spec/factories/featured_works.rb
|
3315
|
+
- spec/factories/file_sets.rb
|
3316
|
+
- spec/factories/generic_works.rb
|
3317
|
+
- spec/factories/hyrax_collection.rb
|
3318
|
+
- spec/factories/hyrax_default_admin_set.rb
|
3319
|
+
- spec/factories/hyrax_embargo.rb
|
3320
|
+
- spec/factories/hyrax_file_metadata.rb
|
3321
|
+
- spec/factories/hyrax_file_set.rb
|
3322
|
+
- spec/factories/hyrax_lease.rb
|
3323
|
+
- spec/factories/hyrax_resource.rb
|
3324
|
+
- spec/factories/hyrax_work.rb
|
3325
|
+
- spec/factories/object_id.rb
|
3326
|
+
- spec/factories/operations.rb
|
3327
|
+
- spec/factories/permission.rb
|
3328
|
+
- spec/factories/permission_template_accesses.rb
|
3329
|
+
- spec/factories/permission_templates.rb
|
3330
|
+
- spec/factories/proxy_deposit_requests.rb
|
3331
|
+
- spec/factories/single_use_links.rb
|
3332
|
+
- spec/factories/sipity_entities.rb
|
3333
|
+
- spec/factories/uploaded_files.rb
|
3334
|
+
- spec/factories/users.rb
|
3335
|
+
- spec/factories/workflow_actions.rb
|
3336
|
+
- spec/factories/workflow_states.rb
|
3337
|
+
- spec/factories/workflows.rb
|
3338
|
+
- spec/support/book_resource.rb
|
3339
|
+
- spec/support/can_can_overrides.rb
|
3340
|
+
- spec/support/clean_solr.rb
|
3341
|
+
- spec/support/controller_level_helpers.rb
|
3342
|
+
- spec/support/factory_helpers.rb
|
3343
|
+
- spec/support/fakes/fake_actor.rb
|
3344
|
+
- spec/support/fakes/fake_authority.rb
|
3345
|
+
- spec/support/fakes/fake_search_builder_scope.rb
|
3346
|
+
- spec/support/fakes/indexing_adapter.rb
|
3347
|
+
- spec/support/fakes/test_hydra_group_service.rb
|
3348
|
+
- spec/support/features.rb
|
3349
|
+
- spec/support/features/batch_edit_actions.rb
|
3350
|
+
- spec/support/features/session_helpers.rb
|
3351
|
+
- spec/support/features/workflow.rb
|
3352
|
+
- spec/support/form_with_validations.rb
|
3353
|
+
- spec/support/input_support.rb
|
3354
|
+
- spec/support/logging_formatter.rb
|
3355
|
+
- spec/support/matchers/api_responses.rb
|
3356
|
+
- spec/support/matchers/collection_type_property_matchers.rb
|
3357
|
+
- spec/support/matchers/embargo.rb
|
3358
|
+
- spec/support/matchers/lease.rb
|
3359
|
+
- spec/support/matchers/match_valkyrie_ids_with_af_ids.rb
|
3360
|
+
- spec/support/matchers/pcdm_matchers.rb
|
3361
|
+
- spec/support/matchers/permission.rb
|
3362
|
+
- spec/support/matchers/response_matchers.rb
|
3363
|
+
- spec/support/optional_example.rb
|
3364
|
+
- spec/support/rake.rb
|
3365
|
+
- spec/support/selectors.rb
|
3366
|
+
- spec/support/shared_examples_for_collection_presenter.rb
|
3367
|
+
- spec/support/simple_work.rb
|
3368
|
+
- spec/support/spec_statistic.rb
|
3369
|
+
- spec/support/speedup.rb
|
3370
|
+
- spec/support/statistic_helper.rb
|
3371
|
+
- spec/support/valkyrie_indexing.rb
|
3372
|
+
- spec/support/wings_models.rb
|
3290
3373
|
- tasks/benchmark.rake
|
3291
3374
|
- tasks/hyrax_dev.rake
|
3292
3375
|
- template.rb
|
@@ -3329,11 +3412,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
3329
3412
|
version: '3.2'
|
3330
3413
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
3331
3414
|
requirements:
|
3332
|
-
- - "
|
3415
|
+
- - ">="
|
3333
3416
|
- !ruby/object:Gem::Version
|
3334
|
-
version:
|
3417
|
+
version: '0'
|
3335
3418
|
requirements: []
|
3336
|
-
rubygems_version: 3.
|
3419
|
+
rubygems_version: 3.5.5
|
3337
3420
|
signing_key:
|
3338
3421
|
specification_version: 4
|
3339
3422
|
summary: Hyrax is a front-end based on the robust Samvera framework, providing a user
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Hyrax
|
4
|
-
##
|
5
|
-
# Indexes properties common to Hyrax::Resource types
|
6
|
-
module ResourceIndexer
|
7
|
-
def to_solr
|
8
|
-
super.tap do |index_document|
|
9
|
-
index_document[:has_model_ssim] = resource.class.name
|
10
|
-
index_document[:human_readable_type_tesim] = resource.human_readable_type
|
11
|
-
index_document[:alternate_ids_sim] = resource.alternate_ids.map(&:to_s)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module Hyrax
|
3
|
-
# Adds file locking to Riiif::File
|
4
|
-
# @see RiiifFileResolver
|
5
|
-
class RiiifFile < Riiif::File
|
6
|
-
include ActiveSupport::Benchmarkable
|
7
|
-
|
8
|
-
attr_reader :id
|
9
|
-
def initialize(input_path, tempfile = nil, id:)
|
10
|
-
super(input_path, tempfile)
|
11
|
-
raise(ArgumentError, "must specify id") if id.blank?
|
12
|
-
@id = id
|
13
|
-
end
|
14
|
-
|
15
|
-
# Wrap extract in a read lock and benchmark it
|
16
|
-
def extract(transformation, image_info = nil)
|
17
|
-
Riiif::Image.file_resolver.file_locks[id].with_read_lock do
|
18
|
-
benchmark "RiiifFile extracted #{path} with #{transformation.to_params}", level: :debug do
|
19
|
-
super
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def logger
|
27
|
-
Hyrax.logger
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module Hyrax
|
3
|
-
# Riiif file resolver for valkyrie resources
|
4
|
-
class RiiifFileResolver
|
5
|
-
include ActiveSupport::Benchmarkable
|
6
|
-
|
7
|
-
# @param [String] id from iiif manifest
|
8
|
-
# @return [Riiif::File]
|
9
|
-
def find(id)
|
10
|
-
path = nil
|
11
|
-
file_locks[id].with_write_lock do
|
12
|
-
path = build_path(id)
|
13
|
-
path = build_path(id, force: true) unless File.exist?(path) # Ensures the file is locally available
|
14
|
-
end
|
15
|
-
RiiifFile.new(path, id: id)
|
16
|
-
end
|
17
|
-
|
18
|
-
# tracks individual file locks
|
19
|
-
# @see RiiifFile
|
20
|
-
# @return [Concurrent::Map<Concurrent::ReadWriteLock>]
|
21
|
-
def file_locks
|
22
|
-
@file_locks ||= Concurrent::Map.new do |k, v|
|
23
|
-
k.compute_if_absent(v) { Concurrent::ReadWriteLock.new }
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def build_path(id, force: false)
|
30
|
-
Riiif::Image.cache.fetch("riiif:" + Digest::MD5.hexdigest("path:#{id}"),
|
31
|
-
expires_in: Riiif::Image.expires_in,
|
32
|
-
force: force) do
|
33
|
-
load_file(id)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def load_file(id)
|
38
|
-
benchmark "RiiifFileResolver loaded #{id}", level: :debug do
|
39
|
-
fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
|
40
|
-
file_set = Hyrax.query_service.find_by(id: fs_id)
|
41
|
-
file_metadata = Hyrax.custom_queries.find_original_file(file_set: file_set)
|
42
|
-
file_metadata.file.disk_path.to_s # Stores a local copy in tmpdir
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def logger
|
47
|
-
Hyrax.logger
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# disable CSS3 and jQuery animations in test mode for speed, consistency and avoiding timing issues.
|
3
|
-
# HT: https://gist.github.com/keithtom/8763169
|
4
|
-
class DisableAnimationsInTestEnvironment
|
5
|
-
def initialize(app, _options = {})
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
@status, @headers, @body = @app.call(env)
|
11
|
-
return [@status, @headers, @body] unless html?
|
12
|
-
response = Rack::Response.new([], @status, @headers)
|
13
|
-
|
14
|
-
@body.each { |fragment| response.write inject(fragment) }
|
15
|
-
@body.close if @body.respond_to?(:close)
|
16
|
-
|
17
|
-
response.finish
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def html?
|
23
|
-
@headers["Content-Type"] =~ /html/
|
24
|
-
end
|
25
|
-
|
26
|
-
# rubocop:disable Metrics/MethodLength Layout/IndentHeredoc
|
27
|
-
def inject(fragment)
|
28
|
-
disable_animations = <<-EOF
|
29
|
-
<script type="text/javascript">(typeof jQuery !== 'undefined') && (jQuery.fx.off = true);</script>
|
30
|
-
<style>
|
31
|
-
* {
|
32
|
-
-o-transition: none !important;
|
33
|
-
-moz-transition: none !important;
|
34
|
-
-ms-transition: none !important;
|
35
|
-
-webkit-transition: none !important;
|
36
|
-
transition: none !important;
|
37
|
-
-o-transform: none !important;
|
38
|
-
-moz-transform: none !important;
|
39
|
-
-ms-transform: none !important;
|
40
|
-
-webkit-transform: none !important;
|
41
|
-
transform: none !important;
|
42
|
-
-webkit-animation: none !important;
|
43
|
-
-moz-animation: none !important;
|
44
|
-
-o-animation: none !important;
|
45
|
-
-ms-animation: none !important;
|
46
|
-
animation: none !important;
|
47
|
-
}
|
48
|
-
</style>
|
49
|
-
EOF
|
50
|
-
fragment.gsub(%r{</head>}, disable_animations + "</head>")
|
51
|
-
end
|
52
|
-
# rubocop:enable Metrics/MethodLength Layout/IndentHeredoc
|
53
|
-
end
|
File without changes
|