hyrax 3.0.0.pre.rc2 → 3.0.0.pre.rc3
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 +5 -5
- data/.dassie/.env +4 -0
- data/.dassie/.gitignore +27 -0
- data/.dassie/Gemfile +57 -0
- data/.dassie/README.md +3 -0
- data/.dassie/Rakefile +6 -0
- data/.dassie/app/actors/hyrax/actors/generic_work_actor.rb +8 -0
- data/.dassie/app/actors/hyrax/actors/namespaced_works/nested_work_actor.rb +8 -0
- data/.dassie/app/assets/config/manifest.js +3 -0
- data/.dassie/app/assets/images/.keep +0 -0
- data/.dassie/app/assets/images/unauthorized.png +0 -0
- data/.dassie/app/assets/images/us_404.svg +91 -0
- data/.dassie/app/assets/javascripts/application.js +26 -0
- data/.dassie/app/assets/javascripts/blacklight_gallery.js +1 -0
- data/.dassie/app/assets/javascripts/cable.js +13 -0
- data/.dassie/app/assets/javascripts/channels/.keep +0 -0
- data/.dassie/app/assets/javascripts/openseadragon.js +2 -0
- data/.dassie/app/assets/stylesheets/application.css +16 -0
- data/.dassie/app/assets/stylesheets/hyrax.scss +17 -0
- data/.dassie/app/assets/stylesheets/openseadragon.css +3 -0
- data/.dassie/app/channels/application_cable/channel.rb +4 -0
- data/.dassie/app/channels/application_cable/connection.rb +4 -0
- data/.dassie/app/controllers/application_controller.rb +14 -0
- data/.dassie/app/controllers/catalog_controller.rb +300 -0
- data/.dassie/app/controllers/concerns/.keep +0 -0
- data/.dassie/app/controllers/hyrax/generic_works_controller.rb +14 -0
- data/.dassie/app/controllers/hyrax/monographs_controller.rb +17 -0
- data/.dassie/app/controllers/hyrax/namespaced_works/nested_works_controller.rb +14 -0
- data/.dassie/app/forms/hyrax/generic_work_form.rb +9 -0
- data/.dassie/app/forms/hyrax/namespaced_works/nested_work_form.rb +9 -0
- data/.dassie/app/forms/monograph_form.rb +20 -0
- data/.dassie/app/helpers/application_helper.rb +2 -0
- data/.dassie/app/helpers/hyrax_helper.rb +6 -0
- data/.dassie/app/indexers/generic_work_indexer.rb +18 -0
- data/.dassie/app/indexers/monograph_indexer.rb +16 -0
- data/.dassie/app/indexers/namespaced_works/nested_work_indexer.rb +18 -0
- data/.dassie/app/jobs/application_job.rb +2 -0
- data/.dassie/app/mailers/application_mailer.rb +4 -0
- data/.dassie/app/models/ability.rb +21 -0
- data/.dassie/app/models/application_record.rb +3 -0
- data/.dassie/app/models/collection.rb +8 -0
- data/.dassie/app/models/concerns/.keep +0 -0
- data/.dassie/app/models/file_set.rb +5 -0
- data/.dassie/app/models/generic_work.rb +14 -0
- data/.dassie/app/models/monograph.rb +8 -0
- data/.dassie/app/models/namespaced_works/nested_work.rb +16 -0
- data/.dassie/app/models/qa.rb +5 -0
- data/.dassie/app/models/qa/local_authority.rb +2 -0
- data/.dassie/app/models/qa/local_authority_entry.rb +3 -0
- data/.dassie/app/models/search_builder.rb +16 -0
- data/.dassie/app/models/solr_document.rb +28 -0
- data/.dassie/app/models/time_span.rb +22 -0
- data/.dassie/app/models/user.rb +26 -0
- data/.dassie/app/presenters/hyrax/generic_work_presenter.rb +6 -0
- data/.dassie/app/presenters/hyrax/namespaced_works/nested_work_presenter.rb +6 -0
- data/.dassie/app/views/hyrax/generic_works/_generic_work.html.erb +2 -0
- data/.dassie/app/views/hyrax/monographs/_monograph.html.erb +2 -0
- data/.dassie/app/views/hyrax/namespaced_works/nested_works/_nested_work.html.erb +2 -0
- data/.dassie/app/views/layouts/application.html.erb +15 -0
- data/.dassie/app/views/layouts/mailer.html.erb +13 -0
- data/.dassie/app/views/layouts/mailer.text.erb +1 -0
- data/.dassie/bin/bundle +3 -0
- data/.dassie/bin/rails +9 -0
- data/.dassie/bin/rake +9 -0
- data/.dassie/bin/setup +36 -0
- data/.dassie/bin/spring +17 -0
- data/.dassie/bin/update +31 -0
- data/.dassie/bin/yarn +11 -0
- data/.dassie/config.ru +5 -0
- data/.dassie/config/analytics.yml +6 -0
- data/.dassie/config/application.rb +22 -0
- data/.dassie/config/arkivo.yml +6 -0
- data/.dassie/config/authorities/licenses.yml +46 -0
- data/.dassie/config/authorities/resource_types.yml +41 -0
- data/.dassie/config/authorities/rights_statements.yml +37 -0
- data/.dassie/config/blacklight.yml +9 -0
- data/.dassie/config/boot.rb +4 -0
- data/.dassie/config/browse_everything_providers.yml +2 -0
- data/.dassie/config/cable.yml +10 -0
- data/.dassie/config/credentials.yml.enc +1 -0
- data/.dassie/config/environment.rb +5 -0
- data/.dassie/config/environments/development.rb +69 -0
- data/.dassie/config/environments/production.rb +94 -0
- data/.dassie/config/environments/test.rb +51 -0
- data/.dassie/config/fedora.yml +15 -0
- data/.dassie/config/initializers/arkivo_constraint.rb +12 -0
- data/.dassie/config/initializers/assets.rb +2 -0
- data/.dassie/config/initializers/clamav.rb +2 -0
- data/.dassie/config/initializers/cookies_serializer.rb +1 -0
- data/.dassie/config/initializers/devise.rb +13 -0
- data/.dassie/config/initializers/filter_parameter_logging.rb +1 -0
- data/.dassie/config/initializers/hydra_config.rb +6 -0
- data/.dassie/config/initializers/hyrax.rb +48 -0
- data/.dassie/config/initializers/mailboxer.rb +21 -0
- data/.dassie/config/initializers/mime_types.rb +4 -0
- data/.dassie/config/initializers/mini_magick.rb +6 -0
- data/.dassie/config/initializers/redis_config.rb +4 -0
- data/.dassie/config/initializers/riiif.rb +27 -0
- data/.dassie/config/initializers/simple_form.rb +28 -0
- data/.dassie/config/initializers/simple_form_bootstrap.rb +143 -0
- data/.dassie/config/initializers/wrap_parameters.rb +3 -0
- data/.dassie/config/locales/blacklight.en.yml +3 -0
- data/.dassie/config/locales/devise.en.yml +65 -0
- data/.dassie/config/locales/generic_work.de.yml +8 -0
- data/.dassie/config/locales/generic_work.en.yml +8 -0
- data/.dassie/config/locales/generic_work.es.yml +10 -0
- data/.dassie/config/locales/generic_work.fr.yml +8 -0
- data/.dassie/config/locales/generic_work.it.yml +8 -0
- data/.dassie/config/locales/generic_work.pt-BR.yml +8 -0
- data/.dassie/config/locales/generic_work.zh.yml +10 -0
- data/.dassie/config/locales/hyrax.de.yml +58 -0
- data/.dassie/config/locales/hyrax.en.yml +58 -0
- data/.dassie/config/locales/hyrax.es.yml +58 -0
- data/.dassie/config/locales/hyrax.fr.yml +58 -0
- data/.dassie/config/locales/hyrax.it.yml +58 -0
- data/.dassie/config/locales/hyrax.pt-BR.yml +58 -0
- data/.dassie/config/locales/hyrax.zh.yml +58 -0
- data/.dassie/config/locales/namespaced_works/nested_work.de.yml +8 -0
- data/.dassie/config/locales/namespaced_works/nested_work.en.yml +8 -0
- data/.dassie/config/locales/namespaced_works/nested_work.es.yml +10 -0
- data/.dassie/config/locales/namespaced_works/nested_work.fr.yml +8 -0
- data/.dassie/config/locales/namespaced_works/nested_work.it.yml +8 -0
- data/.dassie/config/locales/namespaced_works/nested_work.pt-BR.yml +8 -0
- data/.dassie/config/locales/namespaced_works/nested_work.zh.yml +10 -0
- data/.dassie/config/metadata/monograph.yaml +55 -0
- data/.dassie/config/metadata/sample_metadata.yaml +3 -0
- data/.dassie/config/puma.rb +6 -0
- data/.dassie/config/redis.yml +9 -0
- data/.dassie/config/role_map.yml +24 -0
- data/.dassie/config/routes.rb +35 -0
- data/.dassie/config/solr.yml +7 -0
- data/.dassie/config/spring.rb +6 -0
- data/.dassie/config/storage.yml +7 -0
- data/.dassie/config/tinymce.yml +12 -0
- data/.dassie/config/uv/uv-config.json +3 -0
- data/.dassie/config/uv/uv.html +87 -0
- data/.dassie/config/valkyrie_index.yml +12 -0
- data/.dassie/config/workflows/default_workflow.json +21 -0
- data/.dassie/config/workflows/mediated_deposit_workflow.json +76 -0
- data/.dassie/config/zotero.yml +6 -0
- data/.dassie/db/migrate/20200821212749_create_searches.blacklight.rb +17 -0
- data/.dassie/db/migrate/20200821212750_create_bookmarks.blacklight.rb +19 -0
- data/.dassie/db/migrate/20200821212751_add_polymorphic_type_to_bookmarks.blacklight.rb +9 -0
- data/.dassie/db/migrate/20200821212803_devise_create_users.rb +44 -0
- data/.dassie/db/migrate/20200821212806_add_devise_guests_to_users.rb +15 -0
- data/.dassie/db/migrate/20200821212828_create_version_committers.hyrax.rb +15 -0
- data/.dassie/db/migrate/20200821212829_create_checksum_audit_logs.hyrax.rb +19 -0
- data/.dassie/db/migrate/20200821212830_create_single_use_links.hyrax.rb +12 -0
- data/.dassie/db/migrate/20200821212831_add_social_to_users.hyrax.rb +13 -0
- data/.dassie/db/migrate/20200821212832_add_ldap_attrs_to_user.hyrax.rb +27 -0
- data/.dassie/db/migrate/20200821212833_add_avatars_to_users.hyrax.rb +15 -0
- data/.dassie/db/migrate/20200821212834_create_trophies.hyrax.rb +10 -0
- data/.dassie/db/migrate/20200821212835_add_linkedin_to_users.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212836_create_tinymce_assets.hyrax.rb +8 -0
- data/.dassie/db/migrate/20200821212837_create_content_blocks.hyrax.rb +10 -0
- data/.dassie/db/migrate/20200821212838_create_featured_works.hyrax.rb +12 -0
- data/.dassie/db/migrate/20200821212839_add_external_key_to_content_blocks.hyrax.rb +6 -0
- data/.dassie/db/migrate/20200821212840_create_proxy_deposit_rights.hyrax.rb +10 -0
- data/.dassie/db/migrate/20200821212841_create_proxy_deposit_requests.hyrax.rb +15 -0
- data/.dassie/db/migrate/20200821212842_create_file_view_stats.hyrax.rb +12 -0
- data/.dassie/db/migrate/20200821212843_create_file_download_stats.hyrax.rb +12 -0
- data/.dassie/db/migrate/20200821212844_add_orcid_to_users.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212845_create_user_stats.hyrax.rb +19 -0
- data/.dassie/db/migrate/20200821212846_create_work_view_stats.hyrax.rb +12 -0
- data/.dassie/db/migrate/20200821212847_add_works_to_user_stats.hyrax.rb +13 -0
- data/.dassie/db/migrate/20200821212848_change_trophy_generic_file_id_to_work_id.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212849_change_proxy_deposit_generic_file_id_to_work_id.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212850_change_audit_log_generic_file_id_to_file_set_id.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212851_change_proxy_deposit_request_generic_file_id_to_work_id.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212852_create_uploaded_files.hyrax.rb +10 -0
- data/.dassie/db/migrate/20200821212853_create_features.hyrax.rb +10 -0
- data/.dassie/db/migrate/20200821212854_create_operations.hyrax.rb +23 -0
- data/.dassie/db/migrate/20200821212855_change_featured_work_generic_file_id_to_work_id.hyrax.rb +6 -0
- data/.dassie/db/migrate/20200821212856_add_arkivo_to_users.hyrax.rb +8 -0
- data/.dassie/db/migrate/20200821212857_create_sipity.hyrax.rb +163 -0
- data/.dassie/db/migrate/20200821212858_create_sipity_workflow_methods.hyrax.rb +10 -0
- data/.dassie/db/migrate/20200821212859_create_permission_template.hyrax.rb +11 -0
- data/.dassie/db/migrate/20200821212860_create_permission_template_access.hyrax.rb +11 -0
- data/.dassie/db/migrate/20200821212861_add_release_to_permission_templates.hyrax.rb +6 -0
- data/.dassie/db/migrate/20200821212862_add_permission_template_to_sipity_workflow.hyrax.rb +26 -0
- data/.dassie/db/migrate/20200821212863_tidy_up_because_of_bad_exception.hyrax.rb +13 -0
- data/.dassie/db/migrate/20200821212864_add_allows_access_grant_to_workflow.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb +18 -0
- data/.dassie/db/migrate/20200821212866_create_job_io_wrappers.hyrax.rb +15 -0
- data/.dassie/db/migrate/20200821212867_create_collection_types.hyrax.rb +17 -0
- data/.dassie/db/migrate/20200821212868_update_collection_type_column_names.hyrax.rb +9 -0
- data/.dassie/db/migrate/20200821212869_update_collection_type_column_options.hyrax.rb +17 -0
- data/.dassie/db/migrate/20200821212870_create_collection_branding_infos.hyrax.rb +15 -0
- data/.dassie/db/migrate/20200821212871_create_collection_type_participants.hyrax.rb +11 -0
- data/.dassie/db/migrate/20200821212872_rename_admin_set_id_to_source_id.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212873_add_preferred_locale_to_users.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212874_add_collection_type_sharing_options.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212875_add_unique_constraint_to_permission_template_accesses.hyrax.rb +8 -0
- data/.dassie/db/migrate/20200821212876_add_branding_to_collection_type.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212877_add_badge_color_to_collection_types.hyrax.rb +5 -0
- data/.dassie/db/migrate/20200821212878_update_single_use_links_column_names.hyrax.rb +6 -0
- data/.dassie/db/migrate/20200821212879_change_sipity_entity_specific_responsibility.hyrax.rb +9 -0
- data/.dassie/db/migrate/20200821212880_create_mailboxer.mailboxer_engine.rb +65 -0
- data/.dassie/db/migrate/20200821212881_add_conversation_optout.mailboxer_engine.rb +15 -0
- data/.dassie/db/migrate/20200821212882_add_missing_indices.mailboxer_engine.rb +20 -0
- data/.dassie/db/migrate/20200821212883_add_delivery_tracking_info_to_mailboxer_receipts.mailboxer_engine.rb +8 -0
- data/.dassie/db/migrate/20200821212884_create_qa_local_authorities.rb +10 -0
- data/.dassie/db/migrate/20200821212885_create_qa_local_authority_entries.rb +12 -0
- data/.dassie/db/migrate/20200821212902_create_minter_states.noid_rails_engine.rb +17 -0
- data/.dassie/db/migrate/20200821212903_rename_minter_state_random_to_rand.noid_rails_engine.rb +8 -0
- data/.dassie/db/schema.rb +563 -0
- data/.dassie/db/seeds.rb +14 -0
- data/.dassie/lib/assets/.keep +0 -0
- data/.dassie/lib/tasks/.keep +0 -0
- data/.dassie/log/.keep +0 -0
- data/.dassie/package.json +17 -0
- data/.dassie/public/404.html +67 -0
- data/.dassie/public/422.html +67 -0
- data/.dassie/public/500.html +66 -0
- data/.dassie/public/apple-touch-icon-precomposed.png +0 -0
- data/.dassie/public/apple-touch-icon.png +0 -0
- data/.dassie/public/favicon.ico +0 -0
- data/.dassie/public/robots.txt +1 -0
- data/.dassie/solr/conf/_rest_managed.json +3 -0
- data/.dassie/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/.dassie/solr/conf/schema.xml +367 -0
- data/.dassie/solr/conf/scripts.conf +24 -0
- data/.dassie/solr/conf/solrconfig.xml +208 -0
- data/.dassie/solr/conf/stopwords.txt +58 -0
- data/.dassie/solr/conf/stopwords_en.txt +58 -0
- data/.dassie/solr/conf/xslt/example.xsl +132 -0
- data/.dassie/solr/conf/xslt/example_atom.xsl +67 -0
- data/.dassie/solr/conf/xslt/example_rss.xsl +66 -0
- data/.dassie/solr/conf/xslt/luke.xsl +337 -0
- data/.dassie/solr/sample_solr_documents.yml +2692 -0
- data/.dassie/storage/.keep +0 -0
- data/.dassie/values.stage.yaml +7 -0
- data/.dassie/values.yaml +15 -0
- data/.dassie/vendor/.keep +0 -0
- data/.dockerignore +11 -0
- data/.env +26 -0
- data/.github/CODE_OF_CONDUCT.md +4 -4
- data/.github/CONTRIBUTING.md +1 -1
- data/.github/SUPPORT.md +13 -1
- data/.gitignore +1 -1
- data/.regen +1 -1
- data/.rubocop.yml +1 -0
- data/.rubocop_fixme.yml +4 -0
- data/CODE_OF_CONDUCT.md +4 -4
- data/CONTAINERS.md +148 -0
- data/CONTRIBUTING.md +1 -1
- data/Dockerfile +75 -0
- data/Gemfile +26 -35
- data/README.md +61 -288
- data/app/actors/hyrax/actors/attach_members_actor.rb +7 -5
- data/app/actors/hyrax/actors/base_actor.rb +0 -1
- data/app/actors/hyrax/actors/create_with_files_ordered_members_actor.rb +28 -28
- data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +2 -3
- data/app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb +23 -28
- data/app/actors/hyrax/actors/default_admin_set_actor.rb +20 -21
- data/app/actors/hyrax/actors/file_actor.rb +32 -32
- data/app/actors/hyrax/actors/file_set_actor.rb +4 -15
- data/app/actors/hyrax/actors/initialize_workflow_actor.rb +8 -0
- data/app/actors/hyrax/actors/transfer_request_actor.rb +5 -0
- data/app/assets/javascripts/hyrax.js +1 -0
- data/app/assets/javascripts/hyrax/skip_to_content.js +15 -0
- data/app/assets/stylesheets/hyrax/_usage-stats.scss +1 -1
- data/app/authorities/qa/authorities/collections.rb +18 -8
- data/app/authorities/qa/authorities/find_works.rb +20 -5
- data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +15 -6
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +62 -31
- data/app/controllers/hyrax/dashboard/collections_controller.rb +22 -12
- data/app/controllers/hyrax/dashboard/works_controller.rb +3 -4
- data/app/controllers/hyrax/file_sets_controller.rb +19 -10
- data/app/controllers/hyrax/homepage_controller.rb +11 -11
- data/app/controllers/hyrax/my/collections_controller.rb +5 -6
- data/app/controllers/hyrax/my/highlights_controller.rb +2 -3
- data/app/controllers/hyrax/my/shares_controller.rb +2 -3
- data/app/controllers/hyrax/my/works_controller.rb +1 -6
- data/app/controllers/hyrax/my_controller.rb +10 -2
- data/app/controllers/hyrax/permissions_controller.rb +1 -0
- data/app/controllers/hyrax/single_use_links_viewer_controller.rb +11 -5
- data/app/controllers/hyrax/users_controller.rb +5 -10
- data/app/forms/hyrax/forms/failed_submission_form_wrapper.rb +136 -0
- data/app/forms/hyrax/forms/resource_form.rb +8 -4
- data/app/helpers/hyrax/collections_helper.rb +1 -1
- data/app/helpers/hyrax/dashboard_helper_behavior.rb +7 -2
- data/app/helpers/hyrax/embargo_helper.rb +5 -1
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +10 -5
- data/app/helpers/hyrax/lease_helper.rb +5 -1
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +21 -0
- data/app/indexers/hyrax/resource_indexer.rb +3 -1
- data/app/indexers/hyrax/valkyrie_collection_indexer.rb +3 -12
- data/app/indexers/hyrax/valkyrie_indexer.rb +45 -17
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +16 -0
- data/app/jobs/attach_files_to_work_job.rb +3 -41
- data/app/jobs/embargo_expiry_job.rb +15 -0
- data/app/jobs/event_job.rb +14 -7
- data/app/jobs/hyrax/application_job.rb +6 -1
- data/app/jobs/import_url_job.rb +11 -5
- data/app/jobs/inherit_permissions_job.rb +6 -25
- data/app/jobs/lease_expiry_job.rb +15 -0
- data/app/models/admin_set.rb +1 -1
- data/app/models/concerns/hyrax/ability.rb +192 -21
- data/app/models/concerns/hyrax/ability/admin_set_ability.rb +0 -5
- data/app/models/concerns/hyrax/collection_behavior.rb +7 -13
- data/app/models/concerns/hyrax/permissions/writable.rb +2 -2
- data/app/models/concerns/hyrax/solr_document/characterization.rb +35 -2
- data/app/models/concerns/hyrax/solr_document_behavior.rb +37 -5
- data/app/models/hyrax/change_set.rb +5 -1
- data/app/models/hyrax/collection_type.rb +59 -22
- data/app/models/hyrax/event.rb +5 -7
- data/app/models/hyrax/file_metadata.rb +15 -4
- data/app/models/hyrax/pcdm_collection.rb +13 -0
- data/app/models/hyrax/uploaded_file.rb +9 -2
- data/app/models/hyrax/{active_job_proxy.rb → valkyrie_global_id_proxy.rb} +6 -5
- data/app/models/hyrax/virus_scanner.rb +2 -1
- data/app/models/hyrax/work.rb +1 -1
- data/app/models/sipity.rb +6 -0
- data/app/models/sipity/entity.rb +1 -1
- data/app/models/sipity/workflow.rb +23 -3
- data/app/presenters/hyrax/admin/repository_object_presenter.rb +7 -2
- data/app/presenters/hyrax/collection_presenter.rb +1 -1
- data/app/presenters/hyrax/file_set_presenter.rb +3 -0
- data/app/presenters/hyrax/iiif_manifest_presenter.rb +3 -3
- data/app/presenters/hyrax/permission_badge.rb +1 -1
- data/app/presenters/hyrax/presenter_factory.rb +0 -2
- data/app/presenters/hyrax/select_collection_type_presenter.rb +16 -3
- data/app/presenters/hyrax/select_type_presenter.rb +3 -2
- data/app/presenters/hyrax/stats_usage_presenter.rb +0 -1
- data/app/presenters/hyrax/work_show_presenter.rb +1 -1
- data/app/renderers/hyrax/renderers/attribute_renderer.rb +16 -6
- data/app/search_builders/hyrax/README.md +3 -3
- data/app/search_builders/hyrax/admin_admin_set_member_search_builder.rb +8 -2
- data/app/search_builders/hyrax/collection_member_search_builder.rb +21 -7
- data/app/search_builders/hyrax/dashboard/managed_search_filters.rb +1 -1
- data/app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb +1 -1
- data/app/search_builders/hyrax/embargo_search_builder.rb +0 -1
- data/app/search_builders/hyrax/filter_by_type.rb +3 -1
- data/app/search_builders/hyrax/lease_search_builder.rb +0 -1
- data/app/search_builders/hyrax/nested_collections_parent_search_builder.rb +12 -2
- data/app/search_builders/hyrax/search_builder.rb +1 -4
- data/app/search_builders/hyrax/search_filters.rb +0 -2
- data/app/services/hyrax/access_control_list.rb +33 -2
- data/app/services/hyrax/adapters/nesting_index_adapter.rb +26 -7
- data/app/services/hyrax/admin_set_member_service.rb +18 -4
- data/{lib/hyrax/callbacks/registry.rb → app/services/hyrax/callbacks.rb} +23 -0
- data/app/services/hyrax/change_content_depositor_service.rb +4 -1
- data/app/services/hyrax/collection_member_service.rb +5 -1
- data/app/services/hyrax/collection_types/permissions_service.rb +0 -2
- data/app/services/hyrax/collections/collection_member_service.rb +44 -64
- data/app/services/hyrax/collections/managed_collections_service.rb +15 -2
- data/app/services/hyrax/collections/migration_service.rb +9 -3
- data/app/services/hyrax/collections/nested_collection_persistence_service.rb +1 -1
- data/app/services/hyrax/collections/nested_collection_query_service.rb +39 -19
- data/app/services/hyrax/collections/permissions_service.rb +0 -1
- data/app/services/hyrax/collections_service.rb +12 -12
- data/app/services/hyrax/custom_queries/find_collections_by_type.rb +1 -1
- data/app/services/hyrax/custom_queries/navigators/child_collections_navigator.rb +14 -3
- data/app/services/hyrax/custom_queries/navigators/child_filesets_navigator.rb +14 -3
- data/app/services/hyrax/custom_queries/navigators/child_works_navigator.rb +10 -3
- data/app/services/hyrax/custom_queries/navigators/collection_members.rb +1 -0
- data/app/services/hyrax/custom_queries/navigators/find_files.rb +3 -0
- data/app/services/hyrax/database_migrator.rb +13 -10
- data/app/services/hyrax/default_middleware_stack.rb +0 -6
- data/app/services/hyrax/ensure_well_formed_admin_set_service.rb +27 -0
- data/app/services/hyrax/file_set_fixity_check_service.rb +16 -17
- data/app/services/hyrax/file_set_type_service.rb +55 -0
- data/app/services/hyrax/graph_exporter.rb +64 -8
- data/app/services/hyrax/list_source_exporter.rb +16 -34
- data/app/services/hyrax/listeners.rb +22 -0
- data/app/services/hyrax/listeners/proxy_deposit_listener.rb +20 -0
- data/app/services/hyrax/listeners/workflow_listener.rb +36 -0
- data/app/services/hyrax/multiple_membership_checker.rb +2 -1
- data/app/services/hyrax/quick_classification_query.rb +2 -3
- data/app/services/hyrax/resource_visibility_propagator.rb +1 -1
- data/app/services/hyrax/search_service.rb +108 -0
- data/app/services/hyrax/simple_schema_loader.rb +3 -1
- data/app/services/hyrax/statistics/depositors/summary.rb +0 -1
- data/app/services/hyrax/statistics/system_stats.rb +0 -1
- data/app/services/hyrax/thumbnail_path_service.rb +6 -1
- data/app/services/hyrax/time_service.rb +10 -0
- data/app/services/hyrax/versioning_service.rb +4 -28
- data/app/services/hyrax/work_uploads_handler.rb +166 -0
- data/app/services/hyrax/workflow/action_taken_service.rb +14 -1
- data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +3 -1
- data/app/services/hyrax/workflow/permission_generator.rb +14 -9
- data/app/services/hyrax/workflow/workflow_action_service.rb +1 -1
- data/app/services/hyrax/workflow/workflow_factory.rb +12 -10
- data/app/services/hyrax/working_directory.rb +0 -1
- data/app/services/hyrax/works/managed_works_service.rb +14 -2
- data/app/views/_controls.html.erb +1 -1
- data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
- data/app/views/hyrax/base/_member.html.erb +1 -1
- data/app/views/hyrax/base/_representative_media.html.erb +1 -1
- data/app/views/hyrax/base/iiif_viewers/_universal_viewer.html.erb +1 -1
- data/app/views/hyrax/base/show.html.erb +2 -2
- data/app/views/hyrax/batch_select/_add_button.html.erb +1 -1
- data/app/views/hyrax/collections/_default_group.html.erb +2 -0
- data/app/views/hyrax/collections/show.html.erb +1 -1
- data/app/views/hyrax/dashboard/works/_default_group.html.erb +2 -0
- data/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb +1 -1
- data/app/views/hyrax/leases/_list_expired_active_leases.html.erb +2 -1
- data/app/views/hyrax/my/works/_default_group.html.erb +2 -0
- data/app/views/layouts/hyrax.html.erb +0 -15
- data/bin/db-migrate-seed.sh +9 -0
- data/bin/db-wait.sh +14 -0
- data/bin/hyrax-entrypoint.sh +15 -0
- data/chart/fcrepo/.gitignore +2 -0
- data/chart/fcrepo/.helmignore +23 -0
- data/chart/fcrepo/Chart.yaml +11 -0
- data/chart/fcrepo/README.md +50 -0
- data/chart/fcrepo/templates/NOTES.txt +21 -0
- data/chart/fcrepo/templates/_helpers.tpl +68 -0
- data/chart/fcrepo/templates/configmap-env.yaml +19 -0
- data/chart/fcrepo/templates/deployment.yaml +109 -0
- data/chart/fcrepo/templates/ingress.yaml +41 -0
- data/chart/fcrepo/templates/pvc.yaml +20 -0
- data/chart/fcrepo/templates/secret.yaml +12 -0
- data/chart/fcrepo/templates/service.yaml +15 -0
- data/chart/fcrepo/templates/serviceaccount.yaml +12 -0
- data/chart/fcrepo/templates/tests/test-connection.yaml +15 -0
- data/chart/fcrepo/values.yaml +79 -0
- data/chart/hyrax/.gitignore +2 -0
- data/chart/hyrax/.helmignore +23 -0
- data/chart/hyrax/Chart.yaml +27 -0
- data/chart/hyrax/README.md +69 -0
- data/chart/hyrax/templates/NOTES.txt +21 -0
- data/chart/hyrax/templates/_helpers.tpl +92 -0
- data/chart/hyrax/templates/configmap-env.yaml +32 -0
- data/chart/hyrax/templates/deployment.yaml +79 -0
- data/chart/hyrax/templates/fcrepo-secret.yaml +13 -0
- data/chart/hyrax/templates/hpa.yaml +28 -0
- data/chart/hyrax/templates/ingress.yaml +41 -0
- data/chart/hyrax/templates/secrets.yaml +12 -0
- data/chart/hyrax/templates/service.yaml +15 -0
- data/chart/hyrax/templates/serviceaccount.yaml +12 -0
- data/chart/hyrax/templates/tests/test-connection.yaml +15 -0
- data/chart/hyrax/values.yaml +97 -0
- data/config/initializers/indexing_adapter_initializer.rb +7 -12
- data/config/initializers/listeners.rb +2 -0
- data/config/locales/hyrax.en.yml +1 -1
- data/config/metadata/basic_metadata.yaml +13 -0
- data/db/seeds.rb +20 -0
- data/docker-compose.yml +132 -0
- data/documentation/developing-your-hyrax-based-app.md +271 -0
- data/documentation/legacyREADME.md +336 -0
- data/documentation/note-about-versions.md +15 -0
- data/hyrax.gemspec +7 -8
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +4 -6
- data/lib/generators/hyrax/templates/config/locales/hyrax.es.yml +1 -1
- data/lib/generators/hyrax/templates/db/seeds.rb +16 -14
- data/lib/generators/hyrax/templates/uv.html +1 -1
- data/lib/generators/hyrax/work_resource/templates/controller.rb.erb +0 -5
- data/lib/generators/hyrax/work_resource/templates/form.rb.erb +1 -1
- data/lib/generators/hyrax/work_resource/templates/work.html.erb_spec.rb.erb +3 -2
- data/lib/hyrax.rb +17 -0
- data/lib/hyrax/configuration.rb +340 -200
- data/lib/hyrax/event_store.rb +5 -0
- data/lib/hyrax/form_fields.rb +1 -1
- data/lib/hyrax/indexer.rb +19 -3
- data/lib/hyrax/publisher.rb +71 -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/schema.rb +2 -2
- data/lib/hyrax/specs/capybara.rb +98 -0
- data/lib/hyrax/specs/clamav.rb +15 -0
- data/lib/hyrax/specs/disable_animations_in_test_environment.rb +53 -0
- data/lib/hyrax/specs/engine_routes.rb +11 -0
- data/lib/hyrax/specs/shared_specs/change_set.rb +11 -0
- data/lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb +13 -0
- data/lib/hyrax/specs/shared_specs/factories/strategies/valkyrie_resource.rb +0 -11
- data/lib/hyrax/specs/shared_specs/hydra_works.rb +6 -0
- data/lib/hyrax/specs/shared_specs/indexers.rb +22 -5
- data/lib/hyrax/specs/shared_specs/metadata.rb +64 -0
- data/lib/hyrax/specs/spy_listener.rb +52 -26
- data/lib/hyrax/transactions/container.rb +13 -1
- data/lib/hyrax/transactions/steps/add_file_sets.rb +35 -0
- data/lib/hyrax/transactions/steps/save.rb +10 -4
- data/lib/hyrax/transactions/steps/save_access_control.rb +29 -0
- data/lib/hyrax/transactions/steps/set_default_admin_set.rb +1 -1
- data/lib/hyrax/transactions/update_work.rb +3 -1
- data/lib/hyrax/transactions/work_create.rb +3 -1
- data/lib/hyrax/version.rb +1 -1
- data/lib/tasks/collection_type_global_id.rake +22 -0
- data/lib/tasks/default_admin_set.rake +5 -0
- data/lib/wings.rb +1 -1
- data/lib/wings/active_fedora_converter.rb +71 -123
- data/lib/wings/active_fedora_converter/default_work.rb +129 -0
- data/lib/wings/active_fedora_converter/nested_resource.rb +25 -0
- data/lib/wings/attribute_transformer.rb +28 -1
- data/lib/wings/converter_value_mapper.rb +70 -3
- data/lib/wings/model_registry.rb +4 -3
- data/lib/wings/model_transformer.rb +25 -7
- data/lib/wings/orm_converter.rb +19 -23
- data/lib/wings/services/custom_queries/find_collections_by_type.rb +1 -1
- data/lib/wings/services/custom_queries/find_file_metadata.rb +65 -38
- data/lib/wings/services/file_converter_service.rb +6 -55
- data/lib/wings/services/file_metadata_builder.rb +12 -8
- data/lib/wings/setup.rb +56 -9
- data/lib/wings/transformer_value_mapper.rb +1 -0
- data/lib/wings/valkyrie/metadata_adapter.rb +2 -2
- data/lib/wings/valkyrie/persister.rb +13 -14
- data/lib/wings/valkyrie/storage.rb +94 -0
- data/tasks/benchmark.rake +56 -0
- data/template.rb +1 -3
- metadata +346 -54
- data/lib/hyrax/callbacks.rb +0 -27
- data/lib/wings/hydra/pcdm/models/concerns/collection_valkyrie_behavior.rb +0 -28
- data/lib/wings/hydra/pcdm/models/concerns/object_valkyrie_behavior.rb +0 -28
- data/lib/wings/hydra/pcdm/models/concerns/pcdm_valkyrie_behavior.rb +0 -171
- data/lib/wings/hydra/works/models/concerns/collection_valkyrie_behavior.rb +0 -31
- data/lib/wings/hydra/works/models/concerns/file_set_valkyrie_behavior.rb +0 -31
- data/lib/wings/hydra/works/models/concerns/work_valkyrie_behavior.rb +0 -60
- data/lib/wings/models/concerns/collection_behavior.rb +0 -39
- data/lib/wings/models/multi_checksum.rb +0 -18
- data/lib/wings/services/id_converter_service.rb +0 -15
- data/lib/wings/valkyrie/storage/active_fedora.rb +0 -27
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module Hyrax
|
3
3
|
module Actors
|
4
|
-
# If there is a key
|
4
|
+
# If there is a key +:remote_files+ in the attributes, it attaches the files at the specified URIs
|
5
5
|
# to the work. e.g.:
|
6
6
|
# attributes[:remote_files] = filenames.map do |name|
|
7
7
|
# { url: "https://example.com/file/#{name}", file_name: name }
|
@@ -38,8 +38,7 @@ module Hyrax
|
|
38
38
|
path.start_with?(dir) && path.length > dir.length
|
39
39
|
end
|
40
40
|
else
|
41
|
-
#
|
42
|
-
# The server can probably access URLs the user can't.
|
41
|
+
Rails.logger.debug "Assuming #{uri.scheme} uri is valid without a serious attempt to validate: #{uri}"
|
43
42
|
true
|
44
43
|
end
|
45
44
|
end
|
@@ -1,41 +1,36 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module Hyrax
|
3
3
|
module Actors
|
4
|
-
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
4
|
+
##
|
5
|
+
# When adding member {FileSetBehavior}s to a {WorkBehavior}, {Hyrax} saves
|
6
|
+
# and reloads the work for each new member FileSet. This can significantly
|
7
|
+
# slow down ingest for Works with many member FileSets. The saving and
|
8
|
+
# reloading happens in {FileSetActor#attach_to_work}.
|
9
9
|
#
|
10
|
-
# This is a 'swappable' alternative approach. It will
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# with the standard approach.
|
10
|
+
# This is a 'swappable' alternative approach. It will be of most value to
|
11
|
+
# Hyrax applications dealing with works with many filesets. Anecdotally, a
|
12
|
+
# 600 FileSet work can be processed in ~15 mins versus >3 hours with the
|
13
|
+
# standard approach.
|
15
14
|
#
|
16
|
-
# The tradeoff is that the ordered members are now added in a
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# has not been observed in practice.
|
15
|
+
# The tradeoff is that the ordered members are now added in a single step
|
16
|
+
# after the creation of all the FileSets, thus introducing a slight risk of
|
17
|
+
# orphan filesets if the upload fails before the addition of the ordered members.
|
18
|
+
# This has not been observed in practice.
|
21
19
|
#
|
22
20
|
# Swapping out the actors can be achieved thus:
|
23
21
|
#
|
24
|
-
# In
|
25
|
-
#
|
26
|
-
# Hyrax::CurationConcern.actor_factory.swap(Hyrax::Actors::CreateWithFilesActor,
|
27
|
-
# Hyrax::Actors::CreateWithRemoteFilesOrderedMembersActor)
|
28
|
-
# ```
|
29
|
-
# Alternatively, in `config/application.rb`:
|
30
|
-
# ```
|
31
|
-
# config.to_prepare
|
32
|
-
# Hyrax::CurationConcern.actor_factory.swap(Hyrax::Actors::CreateWithFilesActor,
|
22
|
+
# In +config/initializers/hyrax.rb+:
|
23
|
+
# Hyrax::CurationConcern.actor_factory.swap(Hyrax::Actors::CreateWithRemoteFilesActor,
|
33
24
|
# Hyrax::Actors::CreateWithRemoteFilesOrderedMembersActor)
|
34
|
-
# end
|
35
|
-
# ```
|
36
25
|
#
|
37
|
-
#
|
38
|
-
#
|
26
|
+
# Alternatively, in +config/application.rb+:
|
27
|
+
# config.to_prepare
|
28
|
+
# Hyrax::CurationConcern.actor_factory.swap(Hyrax::Actors::CreateWithRemoteFilesActor,
|
29
|
+
# Hyrax::Actors::CreateWithRemoteFilesOrderedMembersActor)
|
30
|
+
# end
|
31
|
+
#
|
32
|
+
# If there is a key +:remote_files+ in the attributes, it attaches the files at
|
33
|
+
# the specified URIs to the work. e.g.:
|
39
34
|
# attributes[:remote_files] = filenames.map do |name|
|
40
35
|
# { url: "https://example.com/file/#{name}", file_name: name }
|
41
36
|
# end
|
@@ -6,8 +6,17 @@ module Hyrax
|
|
6
6
|
# Hyrax::Actors::InitializeWorkflowActor, so that the correct
|
7
7
|
# workflow can be kicked off.
|
8
8
|
#
|
9
|
+
# @see Hyrax::EnsureWellFormedAdminSetService
|
10
|
+
#
|
9
11
|
# @note Creates AdminSet, Hyrax::PermissionTemplate, Sipity::Workflow (with activation)
|
10
12
|
class DefaultAdminSetActor < Hyrax::Actors::AbstractActor
|
13
|
+
# Hyrax provides a service that ensures well formed admin sets.
|
14
|
+
# It is possible that downstream implementers might seek to
|
15
|
+
# override this behavior. The class attribute provicdes a means
|
16
|
+
# to override that behavior.
|
17
|
+
class_attribute :ensure_well_formed_admin_set_service
|
18
|
+
self.ensure_well_formed_admin_set_service = Hyrax::EnsureWellFormedAdminSetService
|
19
|
+
|
11
20
|
# @param [Hyrax::Actors::Environment] env
|
12
21
|
# @return [Boolean] true if create was successful
|
13
22
|
def create(env)
|
@@ -24,28 +33,18 @@ module Hyrax
|
|
24
33
|
|
25
34
|
private
|
26
35
|
|
36
|
+
# This method:
|
37
|
+
#
|
38
|
+
# - ensures that the env.attributes[:admin_set_id] is set
|
39
|
+
# - ensures that the permission template for the admin set is correct
|
27
40
|
def ensure_admin_set_attribute!(env)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def ensure_permission_template!(admin_set_id:)
|
39
|
-
Hyrax::PermissionTemplate.find_by(source_id: admin_set_id) || create_permission_template!(source_id: admin_set_id)
|
40
|
-
end
|
41
|
-
|
42
|
-
def default_admin_set_id
|
43
|
-
AdminSet.find_or_create_default_admin_set_id
|
44
|
-
end
|
45
|
-
|
46
|
-
# Creates a Hyrax::PermissionTemplate for the given AdminSet
|
47
|
-
def create_permission_template!(source_id:)
|
48
|
-
Hyrax::PermissionTemplate.create!(source_id: source_id)
|
41
|
+
# These logical hoops copy the prior behavior of the code;
|
42
|
+
# With a small logical caveat. If the given curation_concern
|
43
|
+
# has an admin_set_id, we now verify that that admin set is
|
44
|
+
# well formed.
|
45
|
+
given_admin_set_id = env.attributes[:admin_set_id].presence || env.curation_concern.admin_set_id.presence
|
46
|
+
admin_set_id = ensure_well_formed_admin_set_service.call(admin_set_id: given_admin_set_id)
|
47
|
+
env.attributes[:admin_set_id] = given_admin_set_id || admin_set_id
|
49
48
|
end
|
50
49
|
end
|
51
50
|
end
|
@@ -25,7 +25,7 @@ module Hyrax
|
|
25
25
|
# @see IngestJob
|
26
26
|
# @todo create a job to monitor the temp directory (or in a multi-worker system, directories!) to prune old files that have made it into the repo
|
27
27
|
def ingest_file(io)
|
28
|
-
|
28
|
+
use_valkyrie ? perform_ingest_file_through_valkyrie(io) : perform_ingest_file_through_active_fedora(io)
|
29
29
|
end
|
30
30
|
|
31
31
|
# Reverts file and spawns async job to characterize and create derivatives.
|
@@ -35,7 +35,7 @@ module Hyrax
|
|
35
35
|
repository_file = related_file
|
36
36
|
repository_file.restore_version(revision_id)
|
37
37
|
return false unless file_set.save
|
38
|
-
|
38
|
+
create_version(repository_file, user)
|
39
39
|
CharacterizeJob.perform_later(file_set, repository_file.id)
|
40
40
|
end
|
41
41
|
|
@@ -48,20 +48,21 @@ module Hyrax
|
|
48
48
|
|
49
49
|
private
|
50
50
|
|
51
|
+
##
|
52
|
+
# Wraps the verisoning service with erro handling. if the service's
|
53
|
+
# create handler isn't implemented, we want to accept that quietly here.
|
54
|
+
def create_version(content, user)
|
55
|
+
Hyrax::VersioningService.create(content, user)
|
56
|
+
rescue NotImplementedError
|
57
|
+
:no_op
|
58
|
+
end
|
59
|
+
|
60
|
+
##
|
51
61
|
# @return [Hydra::PCDM::File] the file referenced by relation
|
52
62
|
def related_file
|
53
63
|
file_set.public_send(normalize_relation(relation)) || raise("No #{relation} returned for FileSet #{file_set.id}")
|
54
64
|
end
|
55
65
|
|
56
|
-
# Persists file as part of file_set and records a new version.
|
57
|
-
# Also spawns an async job to characterize and create derivatives.
|
58
|
-
# @param [JobIoWrapper] io the file to save in the repository, with mime_type and original_name
|
59
|
-
# @return [FileMetadata, FalseClass] the created file metadata on success, false on failure
|
60
|
-
# @todo create a job to monitor the temp directory (or in a multi-worker system, directories!) to prune old files that have made it into the repo
|
61
|
-
def perform_ingest_file(io)
|
62
|
-
use_valkyrie ? perform_ingest_file_through_valkyrie(io) : perform_ingest_file_through_active_fedora(io)
|
63
|
-
end
|
64
|
-
|
65
66
|
def perform_ingest_file_through_active_fedora(io)
|
66
67
|
# Skip versioning because versions will be minted by VersionCommitter as necessary during save_characterize_and_record_committer.
|
67
68
|
Hydra::Works::AddFileToFileSet.call(file_set,
|
@@ -70,30 +71,25 @@ module Hyrax
|
|
70
71
|
versioning: false)
|
71
72
|
return false unless file_set.save
|
72
73
|
repository_file = related_file
|
73
|
-
|
74
|
-
|
75
|
-
CharacterizeJob.perform_later(file_set, repository_file.id, pathhint || io.path)
|
74
|
+
create_version(repository_file, user)
|
75
|
+
CharacterizeJob.perform_later(file_set, repository_file.id, pathhint(io))
|
76
76
|
end
|
77
77
|
|
78
78
|
def perform_ingest_file_through_valkyrie(io)
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
CharacterizeJob.perform_later(file_set, id, pathhint
|
92
|
-
|
93
|
-
|
94
|
-
def file_metadata_builder
|
95
|
-
Wings::FileMetadataBuilder.new(storage_adapter: Hyrax.storage_adapter,
|
96
|
-
persister: Hyrax.persister)
|
79
|
+
file =
|
80
|
+
begin
|
81
|
+
Hyrax.storage_adapter.upload(resource: file_set, file: io, original_filename: io.original_name, use: relation)
|
82
|
+
rescue StandardError => err
|
83
|
+
Rails.logger.error("Failed to save file_metadata through valkyrie: #{err.message}")
|
84
|
+
return false
|
85
|
+
end
|
86
|
+
file_metadata = Hyrax.custom_queries.find_file_metadata_by(id: file.id)
|
87
|
+
create_version(file_metadata, user)
|
88
|
+
id = file_metadata.file_identifier
|
89
|
+
file_set.file_ids << id
|
90
|
+
Hyrax.persister.save(resource: file_set)
|
91
|
+
CharacterizeJob.perform_later(file_set, id.to_s, pathhint(io))
|
92
|
+
file_metadata
|
97
93
|
end
|
98
94
|
|
99
95
|
def normalize_relation(relation)
|
@@ -124,6 +120,10 @@ module Hyrax
|
|
124
120
|
rescue ArgumentError
|
125
121
|
Hyrax::FileMetadata::Use::ORIGINAL_FILE
|
126
122
|
end
|
123
|
+
|
124
|
+
def pathhint(io)
|
125
|
+
io.uploaded_file&.uploader&.path || io.path
|
126
|
+
end
|
127
127
|
end
|
128
128
|
end
|
129
129
|
end
|
@@ -23,7 +23,7 @@ module Hyrax
|
|
23
23
|
# If the file set doesn't have a title or label assigned, set a default.
|
24
24
|
file_set.label ||= label_for(file)
|
25
25
|
file_set.title = [file_set.label] if file_set.title.blank?
|
26
|
-
@file_set = perform_save(file_set)
|
26
|
+
@file_set = perform_save(file_set)
|
27
27
|
return false unless file_set
|
28
28
|
if from_url
|
29
29
|
# If ingesting from URL, don't spawn an IngestJob; instead
|
@@ -47,7 +47,6 @@ module Hyrax
|
|
47
47
|
def update_content(file, relation = :original_file)
|
48
48
|
IngestJob.perform_later(wrapper!(file: file, relation: relation), notification: true)
|
49
49
|
end
|
50
|
-
|
51
50
|
# @!endgroup
|
52
51
|
|
53
52
|
# Adds the appropriate metadata, visibility and relationships to file_set
|
@@ -138,7 +137,8 @@ module Hyrax
|
|
138
137
|
end
|
139
138
|
|
140
139
|
def build_file_actor(relation)
|
141
|
-
|
140
|
+
fs = use_valkyrie ? file_set.valkyrie_resource : file_set
|
141
|
+
file_actor_class.new(fs, relation, user, use_valkyrie: use_valkyrie)
|
142
142
|
end
|
143
143
|
|
144
144
|
# uses create! because object must be persisted to serialize for jobs
|
@@ -185,20 +185,11 @@ module Hyrax
|
|
185
185
|
work.save!
|
186
186
|
end
|
187
187
|
|
188
|
-
# save a valkyrie resource returning false if FailedSaveError is raised
|
189
|
-
# TODO: Change calls to `#perform_save` to call `#save` instead when env passes resources instead of active fedora objects
|
190
|
-
def save(resource)
|
191
|
-
Hyrax.persister.save(resource: resource)
|
192
|
-
rescue FailedSaveError
|
193
|
-
false
|
194
|
-
end
|
195
|
-
|
196
188
|
# switches between using valkyrie to save or active fedora to save
|
197
|
-
# TODO: Remove this method when env passes resources instead of active fedora objects
|
198
189
|
def perform_save(object)
|
199
190
|
obj_to_save = object_to_act_on(object)
|
200
191
|
if valkyrie_object?(obj_to_save)
|
201
|
-
saved_resource = save(obj_to_save)
|
192
|
+
saved_resource = Hyrax.persister.save(resource: obj_to_save)
|
202
193
|
# return the same type of object that was passed in
|
203
194
|
saved_object_to_return = valkyrie_object?(object) ? saved_resource : Wings::ActiveFedoraConverter.new(resource: saved_resource).convert
|
204
195
|
else
|
@@ -209,14 +200,12 @@ module Hyrax
|
|
209
200
|
end
|
210
201
|
|
211
202
|
# if passed a resource or if use_valkyrie==true, object to act on is the valkyrie resource
|
212
|
-
# TODO: Remove this method when env passes resources instead of active fedora objects
|
213
203
|
def object_to_act_on(object)
|
214
204
|
return object if valkyrie_object?(object)
|
215
205
|
use_valkyrie ? object.valkyrie_resource : object
|
216
206
|
end
|
217
207
|
|
218
208
|
# determine if the object is a valkyrie resource
|
219
|
-
# TODO: Remove this method when env passes resources instead of active fedora objects
|
220
209
|
def valkyrie_object?(object)
|
221
210
|
object.is_a? Valkyrie::Resource
|
222
211
|
end
|
@@ -1,6 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module Hyrax
|
3
3
|
module Actors
|
4
|
+
##
|
5
|
+
# @deprecated
|
6
|
+
#
|
4
7
|
# Responsible for generating the workflow for the given curation_concern.
|
5
8
|
# Done through direct collaboration with the configured Hyrax::Actors::InitializeWorkflowActor.workflow_factory
|
6
9
|
#
|
@@ -13,6 +16,7 @@ module Hyrax
|
|
13
16
|
# @param [Hyrax::Actors::Environment] env
|
14
17
|
# @return [Boolean] true if create was successful
|
15
18
|
def create(env)
|
19
|
+
Deprecation.warn('Use Hyrax::Listeners::WorkflowListener instead.')
|
16
20
|
next_actor.create(env) && create_workflow(env)
|
17
21
|
end
|
18
22
|
|
@@ -20,6 +24,10 @@ module Hyrax
|
|
20
24
|
|
21
25
|
# @return [TrueClass]
|
22
26
|
def create_workflow(env)
|
27
|
+
# if the entity exists, this is already initialized
|
28
|
+
Sipity::Entity(env.curation_concern)
|
29
|
+
true
|
30
|
+
rescue Sipity::ConversionError
|
23
31
|
workflow_factory.create(env.curation_concern, env.attributes, env.user)
|
24
32
|
end
|
25
33
|
end
|
@@ -1,12 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module Hyrax
|
3
3
|
module Actors
|
4
|
+
##
|
5
|
+
# @deprecated transfer requests are now carried out in response to published
|
6
|
+
# 'object.deposited' events.
|
7
|
+
#
|
4
8
|
# Notify the provided owner that their proxy wants to make a
|
5
9
|
# deposit on their behalf
|
6
10
|
class TransferRequestActor < AbstractActor
|
7
11
|
# @param [Hyrax::Actors::Environment] env
|
8
12
|
# @return [Boolean] true if create was successful
|
9
13
|
def create(env)
|
14
|
+
Deprecation.warn('Use Hyrax::Listeners::ProxyDepositListener instead.')
|
10
15
|
next_actor.create(env) && create_proxy_deposit_request(env)
|
11
16
|
end
|
12
17
|
|
@@ -105,6 +105,7 @@
|
|
105
105
|
//= require hyrax/turbolinks_events
|
106
106
|
//= require hyrax/i18n_helper
|
107
107
|
//= require hyrax/collapse
|
108
|
+
//= require hyrax/skip_to_content
|
108
109
|
|
109
110
|
// this needs to be after batch_select so that the form ids get setup correctly
|
110
111
|
//= require hyrax/batch_edit
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This code is to implement skip_to_content
|
2
|
+
|
3
|
+
Blacklight.onLoad(function () {
|
4
|
+
$(".skip-to-content").click(function(event) {
|
5
|
+
event.preventDefault();
|
6
|
+
// element to focus on
|
7
|
+
var skipTo = '#' + $(this)[0].firstElementChild.hash.split('#')[1];
|
8
|
+
|
9
|
+
// Setting 'tabindex' to -1 takes an element out of normal
|
10
|
+
// tab flow but allows it to be focused via javascript
|
11
|
+
$(skipTo).attr('tabindex', -1).on('blur focusout', function () {
|
12
|
+
$(this).removeAttr('tabindex');
|
13
|
+
}).focus();
|
14
|
+
});
|
15
|
+
});
|
@@ -7,9 +7,7 @@ module Qa::Authorities
|
|
7
7
|
def search(_q, controller)
|
8
8
|
# The Hyrax::CollectionSearchBuilder expects a current_user
|
9
9
|
return [] unless controller.current_user
|
10
|
-
|
11
|
-
builder = search_builder(controller)
|
12
|
-
response = repo.search(builder)
|
10
|
+
response, _docs = search_response(controller)
|
13
11
|
docs = response.documents
|
14
12
|
docs.map do |doc|
|
15
13
|
id = doc.id
|
@@ -20,12 +18,24 @@ module Qa::Authorities
|
|
20
18
|
|
21
19
|
private
|
22
20
|
|
23
|
-
def
|
21
|
+
def search_service(controller)
|
22
|
+
@search_service ||= Hyrax::SearchService.new(
|
23
|
+
config: controller.blacklight_config,
|
24
|
+
user_params: controller.params,
|
25
|
+
search_builder_class: search_builder_class,
|
26
|
+
scope: controller,
|
27
|
+
current_ability: controller.current_ability
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
def search_response(controller)
|
24
32
|
access = controller.params[:access] || 'read'
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
33
|
+
|
34
|
+
search_service(controller).search_results do |builder|
|
35
|
+
builder.where(controller.params[:q])
|
36
|
+
.with_access(access)
|
37
|
+
.rows(100)
|
38
|
+
end
|
29
39
|
end
|
30
40
|
end
|
31
41
|
end
|
@@ -7,9 +7,8 @@ module Qa::Authorities
|
|
7
7
|
def search(_q, controller)
|
8
8
|
# The My::FindWorksSearchBuilder expects a current_user
|
9
9
|
return [] unless controller.current_user
|
10
|
-
|
11
|
-
|
12
|
-
response = repo.search(builder)
|
10
|
+
|
11
|
+
response, _docs = search_response(controller)
|
13
12
|
docs = response.documents
|
14
13
|
docs.map do |doc|
|
15
14
|
id = doc.id
|
@@ -20,8 +19,24 @@ module Qa::Authorities
|
|
20
19
|
|
21
20
|
private
|
22
21
|
|
23
|
-
def
|
24
|
-
|
22
|
+
def search_service(controller)
|
23
|
+
@search_service ||= Hyrax::SearchService.new(
|
24
|
+
config: controller.blacklight_config,
|
25
|
+
user_params: controller.params,
|
26
|
+
search_builder_class: search_builder_class,
|
27
|
+
scope: controller,
|
28
|
+
current_ability: controller.current_ability
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
def search_response(controller)
|
33
|
+
access = controller.params[:access] || 'read'
|
34
|
+
|
35
|
+
search_service(controller).search_results do |builder|
|
36
|
+
builder.where(controller.params[:q])
|
37
|
+
.with_access(access)
|
38
|
+
.rows(100)
|
39
|
+
end
|
25
40
|
end
|
26
41
|
end
|
27
42
|
end
|