hyrax 3.2.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -6
- data/.dassie/.env +1 -1
- data/.dassie/Gemfile +7 -3
- data/.dassie/app/models/user.rb +0 -2
- data/.dassie/config/analytics.yml +12 -5
- data/.dassie/config/environments/development.rb +2 -0
- data/.dassie/config/initializers/hyrax.rb +13 -1
- data/.dassie/db/migrate/20210921150120_enable_uuid_extension.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150121_create_orm_resources.valkyrie_engine.rb +19 -0
- data/.dassie/db/migrate/20210921150122_add_model_type_to_orm_resources.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150123_change_model_type_to_internal_model.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150124_create_path_gin_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150125_create_internal_resource_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150126_create_updated_at_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150127_add_optimistic_locking_to_orm_resources.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20211130181150_create_default_administrative_set.rb +8 -0
- data/.dassie/db/schema.rb +20 -1
- data/.dassie/db/seeds.rb +70 -15
- data/.env +7 -4
- data/.github/release.yml +26 -0
- data/.github/workflows/main.yml +17 -0
- data/.github/workflows/release.yml +17 -0
- data/.gitignore +4 -0
- data/.regen +1 -1
- data/.rubocop_fixme.yml +3 -1
- data/CONTAINERS.md +13 -10
- data/Dockerfile +2 -1
- data/README.md +37 -0
- data/app/actors/hyrax/actors/file_actor.rb +6 -4
- data/app/actors/hyrax/actors/transfer_request_actor.rb +3 -7
- data/app/assets/javascripts/hyrax/admin/graphs.es6 +34 -37
- data/app/assets/javascripts/hyrax/analytics_events.js +75 -0
- data/app/assets/javascripts/hyrax/autocomplete/linked_data.es6 +1 -3
- data/app/assets/javascripts/hyrax/collapse.js +24 -0
- data/app/assets/javascripts/hyrax/collections.js +1 -2
- data/app/assets/javascripts/hyrax/ga_events.js +2 -8
- data/app/assets/javascripts/hyrax/reports-buttons.js +33 -0
- data/app/assets/javascripts/hyrax.js +2 -1
- data/app/assets/stylesheets/_bootstrap-default-overrides.scss +9 -0
- data/app/authorities/qa/authorities/collections.rb +4 -5
- data/app/authorities/qa/authorities/find_works.rb +1 -1
- data/app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb +26 -0
- data/app/controllers/concerns/hyrax/breadcrumbs_for_works_analytics.rb +26 -0
- data/app/controllers/concerns/hyrax/controller.rb +43 -0
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +83 -59
- data/app/controllers/hyrax/admin/admin_sets_controller.rb +105 -19
- data/app/controllers/hyrax/admin/analytics/analytics_controller.rb +40 -0
- data/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb +61 -0
- data/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +122 -0
- data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +12 -19
- data/app/controllers/hyrax/batch_edits_controller.rb +12 -3
- data/app/controllers/hyrax/batch_uploads_controller.rb +4 -0
- data/app/controllers/hyrax/citations_controller.rb +1 -1
- data/app/controllers/hyrax/collections_controller.rb +4 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +34 -16
- data/app/controllers/hyrax/dashboard_controller.rb +8 -0
- data/app/controllers/hyrax/stats_controller.rb +3 -1
- data/app/forms/hyrax/forms/administrative_set_form.rb +19 -1
- data/app/forms/hyrax/forms/batch_edit_form.rb +1 -1
- data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +21 -6
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +4 -0
- data/app/forms/hyrax/forms/permission_template_form.rb +17 -9
- data/app/forms/hyrax/forms/resource_form.rb +9 -5
- data/app/helpers/hyrax/collections_helper.rb +14 -0
- data/app/helpers/hyrax/membership_helper.rb +1 -1
- data/app/helpers/hyrax/trophy_helper.rb +1 -1
- data/app/helpers/hyrax/url_helper.rb +1 -1
- data/app/indexers/hyrax/administrative_set_indexer.rb +8 -2
- data/app/indexers/hyrax/deep_indexing_service.rb +1 -1
- data/app/indexers/hyrax/file_set_indexer.rb +1 -0
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +3 -1
- data/app/indexers/hyrax/thumbnail_indexer.rb +31 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +7 -7
- data/app/indexers/hyrax/valkyrie_indexer.rb +4 -2
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +13 -0
- data/app/inputs/controlled_vocabulary_input.rb +2 -0
- data/app/jobs/change_depositor_event_job.rb +47 -0
- data/app/jobs/characterize_job.rb +66 -3
- data/app/jobs/concerns/hyrax/members_permission_job_behavior.rb +1 -1
- data/app/jobs/content_depositor_change_event_job.rb +2 -1
- data/app/jobs/hyrax/propagate_change_depositor_job.rb +32 -0
- data/app/jobs/inherit_permissions_job.rb +1 -1
- data/app/jobs/valkyrie_create_derivatives_job.rb +25 -0
- data/app/jobs/valkyrie_ingest_job.rb +124 -0
- data/app/models/admin_set.rb +2 -2
- data/app/models/collection_branding_info.rb +8 -6
- data/app/models/concerns/hyrax/ability.rb +26 -5
- data/app/models/concerns/hyrax/collection_behavior.rb +2 -2
- data/app/models/concerns/hyrax/file_set/characterization.rb +7 -1
- data/app/models/concerns/hyrax/solr_document/metadata.rb +2 -0
- data/app/models/concerns/hyrax/solr_document_behavior.rb +9 -3
- data/app/models/file_download_stat.rb +4 -4
- data/app/models/hyrax/administrative_set.rb +36 -1
- data/app/models/hyrax/collection_type.rb +2 -2
- data/app/models/hyrax/default_administrative_set.rb +42 -0
- data/app/models/hyrax/file_metadata.rb +5 -1
- data/app/models/hyrax/file_set.rb +42 -1
- data/app/models/hyrax/pcdm_collection.rb +56 -0
- data/app/models/hyrax/permission_template.rb +11 -5
- data/app/models/hyrax/statistic.rb +31 -4
- data/app/models/hyrax/work.rb +91 -0
- data/app/models/proxy_deposit_request.rb +1 -1
- data/app/presenters/hyrax/admin/dashboard_presenter.rb +8 -6
- data/app/presenters/hyrax/admin/repository_growth_presenter.rb +10 -5
- data/app/presenters/hyrax/admin/user_activity_presenter.rb +8 -12
- data/app/presenters/hyrax/admin_set_presenter.rb +2 -2
- data/app/presenters/hyrax/file_set_presenter.rb +2 -0
- data/app/presenters/hyrax/menu_presenter.rb +4 -0
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +3 -3
- data/app/presenters/hyrax/work_show_presenter.rb +9 -2
- data/app/presenters/hyrax/work_usage.rb +1 -0
- data/app/search_builders/hyrax/README.md +1 -1
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +2 -2
- data/app/search_builders/hyrax/dashboard/managed_search_filters.rb +44 -4
- data/app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb +2 -2
- data/app/search_builders/hyrax/my/collections_search_builder.rb +12 -5
- data/app/services/hyrax/access_control_list.rb +13 -0
- data/app/services/hyrax/admin_set_create_service.rb +94 -48
- data/app/services/hyrax/analytics/google/events.rb +37 -0
- data/app/services/hyrax/analytics/google/events_daily.rb +72 -0
- data/app/services/hyrax/analytics/google/visits.rb +44 -0
- data/app/services/hyrax/analytics/google/visits_daily.rb +49 -0
- data/app/services/hyrax/analytics/google.rb +204 -0
- data/app/services/hyrax/analytics/matomo.rb +193 -0
- data/app/services/hyrax/analytics/results.rb +79 -0
- data/app/services/hyrax/analytics.rb +12 -82
- data/app/services/hyrax/change_content_depositor_service.rb +2 -2
- data/app/services/hyrax/change_depositor_service.rb +70 -0
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +134 -0
- data/app/services/hyrax/collections/nested_collection_query_service.rb +32 -15
- data/app/services/hyrax/custom_queries/navigators/child_file_sets_navigator.rb +45 -0
- data/app/services/hyrax/custom_queries/navigators/child_filesets_navigator.rb +7 -2
- data/app/services/hyrax/custom_queries/navigators/parent_work_navigator.rb +54 -0
- data/app/services/hyrax/default_middleware_stack.rb +3 -0
- data/app/services/hyrax/file_set_derivatives_service.rb +21 -2
- data/app/services/hyrax/file_set_type_service.rb +2 -5
- data/app/services/hyrax/listeners/acl_index_listener.rb +3 -1
- data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +3 -1
- data/app/services/hyrax/listeners/batch_notification_listener.rb +3 -1
- data/app/services/hyrax/listeners/file_metadata_listener.rb +38 -0
- data/app/services/hyrax/listeners/file_set_lifecycle_listener.rb +6 -2
- data/app/services/hyrax/listeners/file_set_lifecycle_notification_listener.rb +6 -2
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +26 -3
- data/app/services/hyrax/listeners/metadata_index_listener.rb +48 -3
- data/app/services/hyrax/listeners/object_lifecycle_listener.rb +9 -3
- data/app/services/hyrax/listeners/proxy_deposit_listener.rb +16 -8
- data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +3 -0
- data/app/services/hyrax/listeners/workflow_listener.rb +3 -1
- data/app/services/hyrax/listeners.rb +8 -0
- data/app/services/hyrax/location_service.rb +33 -0
- data/app/services/hyrax/multiple_membership_checker.rb +44 -1
- data/app/services/hyrax/resource_visibility_propagator.rb +1 -1
- data/app/services/hyrax/restriction_service.rb +4 -0
- data/app/services/hyrax/simple_schema_loader.rb +5 -1
- data/app/services/hyrax/solr_query_service.rb +12 -7
- data/app/services/hyrax/statistics/users/over_time.rb +8 -5
- data/app/services/hyrax/statistics/works/over_time.rb +10 -0
- data/app/services/hyrax/thumbnail_path_service.rb +1 -1
- data/app/services/hyrax/work_uploads_handler.rb +2 -9
- data/app/utils/hyrax/data_destroyers/collection_branding_destroyer.rb +29 -0
- data/app/utils/hyrax/data_destroyers/collection_types_destroyer.rb +26 -0
- data/app/utils/hyrax/data_destroyers/default_admin_set_id_cache_destroyer.rb +26 -0
- data/app/utils/hyrax/data_destroyers/featured_works_destroyer.rb +27 -0
- data/app/utils/hyrax/data_destroyers/permission_templates_destroyer.rb +30 -0
- data/app/utils/hyrax/data_destroyers/repository_metadata_destroyer.rb +42 -0
- data/app/utils/hyrax/data_destroyers/stats_destroyer.rb +33 -0
- data/app/utils/hyrax/data_maintenance.rb +51 -0
- data/app/utils/hyrax/required_data_seeder.rb +21 -0
- data/app/utils/hyrax/required_data_seeders/collection_seeder.rb +26 -0
- data/app/utils/hyrax/required_data_seeders/collection_type_seeder.rb +36 -0
- data/app/utils/hyrax/test_data_seeder.rb +24 -0
- data/app/utils/hyrax/test_data_seeders/collection_seeder.rb +91 -0
- data/app/utils/hyrax/test_data_seeders/collection_type_seeder.rb +72 -0
- data/app/utils/hyrax/test_data_seeders/user_seeder.rb +52 -0
- data/app/validators/hyrax/collection_membership_validator.rb +38 -0
- data/app/views/catalog/_index_header_list_hyrax_pcdm_collection.html.erb +4 -0
- data/app/views/hyrax/admin/admin_sets/_form_participant_table.html.erb +2 -2
- data/app/views/hyrax/admin/admin_sets/_form_participants.html.erb +2 -2
- data/app/views/hyrax/admin/admin_sets/_form_visibility.html.erb +2 -2
- data/app/views/hyrax/admin/admin_sets/_form_workflow.erb +1 -1
- data/app/views/hyrax/admin/analytics/_date_range_form.html.erb +11 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_custom_range.html.erb +39 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_monthly_summary.html.erb +48 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_summary.html.erb +55 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_top_collections.html.erb +55 -0
- data/app/views/hyrax/admin/analytics/collection_reports/index.html.erb +70 -0
- data/app/views/hyrax/admin/analytics/collection_reports/show.html.erb +94 -0
- data/app/views/hyrax/admin/analytics/work_reports/_custom_range.html.erb +43 -0
- data/app/views/hyrax/admin/analytics/work_reports/_monthly_summary.html.erb +35 -0
- data/app/views/hyrax/admin/analytics/work_reports/_summary.html.erb +60 -0
- data/app/views/hyrax/admin/analytics/work_reports/_top_file_set_downloads.html.erb +33 -0
- data/app/views/hyrax/admin/analytics/work_reports/_top_works.html.erb +40 -0
- data/app/views/hyrax/admin/analytics/work_reports/_work_counts.html.erb +18 -0
- data/app/views/hyrax/admin/analytics/work_reports/_work_files.html.erb +41 -0
- data/app/views/hyrax/admin/analytics/work_reports/index.html.erb +77 -0
- data/app/views/hyrax/admin/analytics/work_reports/show.html.erb +90 -0
- data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
- data/app/views/hyrax/admin/stats/show.html.erb +1 -1
- data/app/views/hyrax/base/_form.html.erb +1 -1
- data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -1
- data/app/views/hyrax/base/_relationships_parent_row.html.erb +0 -1
- data/app/views/hyrax/base/show.html.erb +6 -0
- data/app/views/hyrax/collections/show.html.erb +4 -0
- data/app/views/hyrax/dashboard/_repository_growth.html.erb +5 -5
- data/app/views/hyrax/dashboard/_resource_type_graph.html.erb +41 -0
- data/app/views/hyrax/dashboard/_sidebar.html.erb +4 -1
- data/app/views/hyrax/dashboard/_tabs.html.erb +11 -0
- data/app/views/hyrax/dashboard/_user_activity.html.erb +17 -23
- data/app/views/hyrax/dashboard/_user_activity_graph.html.erb +55 -0
- data/app/views/hyrax/dashboard/_visibility_graph.html.erb +31 -0
- data/app/views/hyrax/dashboard/_work_type_graph.html.erb +41 -0
- data/app/views/hyrax/dashboard/collections/_default_group.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_form.html.erb +23 -16
- data/app/views/hyrax/dashboard/collections/_form_discovery.html.erb +6 -3
- data/app/views/hyrax/dashboard/collections/_form_share.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_form_share_table.html.erb +3 -3
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +2 -2
- data/app/views/hyrax/dashboard/show_admin.html.erb +24 -45
- data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +22 -0
- data/app/views/hyrax/dashboard/works/_default_group.html.erb +1 -1
- data/app/views/hyrax/dashboard/works/_list_works.html.erb +1 -1
- data/app/views/hyrax/file_sets/_actions.html.erb +4 -3
- data/app/views/hyrax/file_sets/show.html.erb +6 -0
- data/app/views/hyrax/my/_facet_pagination.html.erb +12 -9
- data/app/views/hyrax/my/_work_action_menu.html.erb +8 -9
- data/app/views/hyrax/my/collections/_default_group.html.erb +2 -2
- data/app/views/hyrax/my/collections/_list_collections.html.erb +2 -2
- data/app/views/hyrax/my/collections/index.html.erb +4 -3
- data/app/views/hyrax/my/works/_default_group.html.erb +1 -1
- data/app/views/hyrax/my/works/_list_works.html.erb +1 -2
- data/app/views/hyrax/my/works/index.html.erb +4 -2
- data/app/views/hyrax/stats/_downloads.html.erb +18 -0
- data/app/views/hyrax/stats/_pageviews.html.erb +18 -0
- data/app/views/hyrax/stats/work.html.erb +17 -9
- data/app/views/layouts/_head_tag_content.html.erb +7 -2
- data/app/views/{_ga.html.erb → shared/_ga.html.erb} +3 -7
- data/app/views/shared/_matomo.html.erb +15 -0
- data/chart/hyrax/Chart.yaml +2 -2
- data/chart/hyrax/README.md +22 -1
- data/chart/hyrax/values.yaml +1 -1
- data/config/i18n-tasks.yml +2 -2
- data/config/initializers/listeners.rb +5 -6
- data/config/locales/hyrax.de.yml +200 -5
- data/config/locales/hyrax.en.yml +201 -21
- data/config/locales/hyrax.es.yml +204 -9
- data/config/locales/hyrax.fr.yml +196 -1
- data/config/locales/hyrax.it.yml +197 -2
- data/config/locales/hyrax.pt-BR.yml +196 -1
- data/config/locales/hyrax.zh.yml +196 -1
- data/config/metadata/basic_metadata.yaml +2 -0
- data/config/metadata/core_metadata.yaml +1 -1
- data/config/routes.rb +4 -0
- data/docker-compose.yml +48 -42
- data/documentation/developing-your-hyrax-based-app.md +2 -2
- data/documentation/legacyREADME.md +1 -1
- data/hyrax.gemspec +3 -1
- data/lib/generators/hyrax/templates/config/analytics.yml +13 -7
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +0 -13
- data/lib/generators/hyrax/templates/db/migrate/20211130181150_create_default_administrative_set.rb.erb +8 -0
- data/lib/generators/hyrax/work/templates/feature_spec.rb.erb +3 -1
- data/lib/hyrax/administrative_set_name.rb +18 -0
- data/lib/hyrax/collection_name.rb +2 -0
- data/lib/hyrax/configuration.rb +77 -5
- data/lib/hyrax/controlled_vocabularies/location.rb +9 -2
- data/lib/hyrax/controlled_vocabularies/resource_label_caching.rb +42 -0
- data/lib/hyrax/controlled_vocabularies.rb +1 -0
- data/lib/hyrax/engine.rb +7 -6
- data/lib/hyrax/publisher.rb +49 -0
- data/lib/hyrax/schema.rb +16 -13
- data/lib/hyrax/specs/capybara.rb +1 -1
- data/lib/hyrax/specs/shared_specs/hydra_works.rb +11 -4
- data/lib/hyrax/specs/shared_specs/indexers.rb +117 -3
- data/lib/hyrax/transactions/admin_set_create.rb +23 -0
- data/lib/hyrax/transactions/admin_set_destroy.rb +22 -0
- data/lib/hyrax/transactions/admin_set_update.rb +21 -0
- data/lib/hyrax/transactions/collection_destroy.rb +22 -0
- data/lib/hyrax/transactions/collection_update.rb +3 -2
- data/lib/hyrax/transactions/container.rb +97 -22
- data/lib/hyrax/transactions/create_work.rb +3 -0
- data/lib/hyrax/transactions/destroy_work.rb +3 -0
- data/lib/hyrax/transactions/steps/apply_collection_permission_template.rb +2 -0
- data/lib/hyrax/transactions/steps/apply_permission_template.rb +2 -0
- data/lib/hyrax/transactions/steps/apply_visibility.rb +2 -0
- data/lib/hyrax/transactions/steps/change_depositor.rb +46 -0
- data/lib/hyrax/transactions/steps/check_for_empty_admin_set.rb +36 -0
- data/lib/hyrax/transactions/steps/delete_access_control.rb +32 -0
- data/lib/hyrax/transactions/steps/delete_resource.rb +19 -3
- data/lib/hyrax/transactions/steps/destroy_work.rb +3 -1
- data/lib/hyrax/transactions/steps/ensure_permission_template.rb +2 -0
- data/lib/hyrax/transactions/steps/save.rb +24 -6
- data/lib/hyrax/transactions/steps/save_access_control.rb +2 -2
- data/lib/hyrax/transactions/steps/save_work.rb +3 -0
- data/lib/hyrax/transactions/steps/set_user_as_creator.rb +41 -0
- data/lib/hyrax/transactions/steps/update_work_members.rb +51 -0
- data/lib/hyrax/transactions/update_work.rb +4 -3
- data/lib/hyrax/transactions/work_create.rb +1 -1
- data/lib/hyrax/transactions/work_destroy.rb +2 -1
- data/lib/hyrax/transactions/work_update.rb +19 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/tasks/regenerate_derivatives.rake +1 -1
- data/lib/wings/attribute_transformer.rb +5 -1
- data/lib/wings/setup.rb +18 -1
- data/lib/wings/valkyrie/persister.rb +18 -0
- data/lib/wings/valkyrie/query_service.rb +2 -1
- data/lib/wings/valkyrie/storage.rb +7 -1
- data/template.rb +1 -1
- data/vendor/assets/javascripts/morris/morris.min.js +1 -7
- data/vendor/assets/stylesheets/morris.js/0.5.1/morris.css +1 -1
- metadata +124 -11
- data/app/views/hyrax/dashboard/_repository_objects.html.erb +0 -28
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 865d623446e36dc64e73cf82ef855955e83d8d8f730a65f439b9b89664641c3f
|
|
4
|
+
data.tar.gz: 87aec067e009093bbd119d6d39639c5c6927b2b26173088ca7000b1241f71caa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d75dbf03372ee072f394a88af8449ff947ff42b21de9b10a83428ac98af5d01783f21e7f123ee00e3c0dd7b6d3808d4e7d59f0238e1fda703da8358d2b567447
|
|
7
|
+
data.tar.gz: 6dae952fde3a2f2fdc329775d8efe14929e23c0f92284d1848abfa8a7a8a041e4b5a197a4fa0581d3934ddc9267d0e3ca64c455a5f65b81f5287bde8110fb19e
|
data/.circleci/config.yml
CHANGED
|
@@ -33,10 +33,9 @@ jobs:
|
|
|
33
33
|
fi
|
|
34
34
|
[[ -z "$(git branch --all --list master */master)" ]]
|
|
35
35
|
|
|
36
|
-
- samvera/
|
|
36
|
+
- samvera/bundle:
|
|
37
37
|
ruby_version: << parameters.ruby_version >>
|
|
38
38
|
bundler_version: << parameters.bundler_version >>
|
|
39
|
-
project: hyrax
|
|
40
39
|
|
|
41
40
|
# Run rubocop in parallel with caching
|
|
42
41
|
# This should get added to the orb once proven here
|
|
@@ -89,10 +88,9 @@ jobs:
|
|
|
89
88
|
at: ~/
|
|
90
89
|
- samvera/engine_cart_generate:
|
|
91
90
|
cache_key: v1-internal-test-app-{{ checksum "hyrax.gemspec" }}-{{ checksum ".regen" }}-{{ checksum ".circleci/config.yml" }}-<< parameters.rails_version >>-<< parameters.ruby_version >>
|
|
92
|
-
- samvera/
|
|
91
|
+
- samvera/bundle:
|
|
93
92
|
ruby_version: << parameters.ruby_version >>
|
|
94
93
|
bundler_version: << parameters.bundler_version >>
|
|
95
|
-
project: hyrax
|
|
96
94
|
- persist_to_workspace:
|
|
97
95
|
root: ~/
|
|
98
96
|
paths:
|
|
@@ -128,10 +126,9 @@ jobs:
|
|
|
128
126
|
solr_config_path: .internal_test_app/solr/conf
|
|
129
127
|
core_name: hyrax-valkyrie-test
|
|
130
128
|
# Rerun bundler in case this is a different ruby version than bundle and build steps
|
|
131
|
-
- samvera/
|
|
129
|
+
- samvera/bundle:
|
|
132
130
|
ruby_version: << parameters.ruby_version >>
|
|
133
131
|
bundler_version: << parameters.bundler_version >>
|
|
134
|
-
project: hyrax
|
|
135
132
|
- run:
|
|
136
133
|
command: bundle exec rake app:db:migrate
|
|
137
134
|
- samvera/parallel_rspec
|
data/.dassie/.env
CHANGED
data/.dassie/Gemfile
CHANGED
|
@@ -52,11 +52,15 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
|
|
52
52
|
|
|
53
53
|
gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
|
|
54
54
|
|
|
55
|
-
gem 'rsolr', '>= 1.0', '< 3'
|
|
56
55
|
gem 'bootstrap-sass', '~> 3.0'
|
|
57
|
-
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
|
|
58
|
-
gem 'jquery-rails'
|
|
59
56
|
gem 'devise'
|
|
60
57
|
gem 'devise-guests', '~> 0.6'
|
|
58
|
+
gem 'jquery-rails'
|
|
59
|
+
gem 'pry-byebug'
|
|
60
|
+
gem 'pry-doc'
|
|
61
|
+
gem 'pry-rails'
|
|
62
|
+
gem 'pry-rescue'
|
|
61
63
|
gem 'riiif', '~> 2.1'
|
|
64
|
+
gem 'rsolr', '>= 1.0', '< 3'
|
|
62
65
|
gem 'sidekiq', '~> 6.0'
|
|
66
|
+
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
|
data/.dassie/app/models/user.rb
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
analytics:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
google:
|
|
3
|
+
analytics_id: <%= ENV['GOOGLE_ANALYTICS_ID'] %>
|
|
4
|
+
app_name: <%= ENV['GOOGLE_OAUTH_APP_NAME'] %>
|
|
5
|
+
app_version: <%= ENV['GOOGLE_OAUTH_APP_VERSION'] %>
|
|
6
|
+
privkey_path: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_PATH'] %>
|
|
7
|
+
privkey_secret: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_SECRET'] %>
|
|
8
|
+
client_email: <%= ENV['GOOGLE_OAUTH_CLIENT_EMAIL'] %>
|
|
9
|
+
matomo:
|
|
10
|
+
base_url: <%= ENV['MATOMO_BASE_URL'] %>
|
|
11
|
+
site_id: <%= ENV['MATOMO_SITE_ID'] %>
|
|
12
|
+
auth_token: <%= ENV['MATOMO_AUTH_TOKEN'] %>
|
|
13
|
+
|
|
@@ -29,6 +29,8 @@ Rails.application.configure do
|
|
|
29
29
|
config.cache_store = :null_store
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
config.web_console.whitelisted_ips = ['172.18.0.0/16', '172.27.0.0/16', '0.0.0.0/0']
|
|
33
|
+
|
|
32
34
|
# Store uploaded files on the local file system (see config/storage.yml for options)
|
|
33
35
|
config.active_storage.service = :local
|
|
34
36
|
|
|
@@ -5,6 +5,8 @@ Hyrax.config do |config|
|
|
|
5
5
|
# Defaults to false. See README for more info
|
|
6
6
|
config.arkivo_api = true
|
|
7
7
|
|
|
8
|
+
config.analytics = ActiveModel::Type::Boolean.new.cast(ENV.fetch('HYRAX_ANALYTICS', 'false'))
|
|
9
|
+
config.analytics_provider = ENV.fetch('HYRAX_ANALYTICS_PROVIDER', 'google')
|
|
8
10
|
# Injected via `rails g hyrax:work GenericWork`
|
|
9
11
|
config.register_curation_concern :generic_work
|
|
10
12
|
# Injected via `rails g hyrax:work NamespacedWorks::NestedWork`
|
|
@@ -13,6 +15,8 @@ Hyrax.config do |config|
|
|
|
13
15
|
config.register_curation_concern :monograph
|
|
14
16
|
|
|
15
17
|
config.iiif_image_server = true
|
|
18
|
+
config.work_requires_files = false
|
|
19
|
+
config.citations = true
|
|
16
20
|
|
|
17
21
|
# Returns a URL that resolves to an image provided by a IIIF image server
|
|
18
22
|
config.iiif_image_url_builder = lambda do |file_id, base_url, size, format|
|
|
@@ -36,14 +40,22 @@ Hyrax.config do |config|
|
|
|
36
40
|
config.browse_everything = nil
|
|
37
41
|
end
|
|
38
42
|
|
|
43
|
+
# config.geonames_username = ''
|
|
44
|
+
|
|
39
45
|
##
|
|
40
46
|
# Set the system-wide virus scanner
|
|
41
47
|
config.virus_scanner = Hyrax::VirusScanner
|
|
42
48
|
|
|
43
49
|
##
|
|
44
|
-
# To index to the Valkyrie core, uncomment the following
|
|
50
|
+
# To index to the Valkyrie core, uncomment the following lines.
|
|
45
51
|
# config.query_index_from_valkyrie = true
|
|
46
52
|
# config.index_adapter = :solr_index
|
|
53
|
+
|
|
54
|
+
##
|
|
55
|
+
# NOTE: To Valkyrie works, use Monograph which is_a Hyrax::Work is_a Valkyrie::Resource
|
|
56
|
+
# To use Valkyrie models, uncomment the following lines.
|
|
57
|
+
# config.collection_model = 'Hyrax::PcdmCollection'
|
|
58
|
+
# config.admin_set_model = 'Hyrax::AdministrativeSet'
|
|
47
59
|
end
|
|
48
60
|
|
|
49
61
|
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This migration comes from valkyrie_engine (originally 20161007101725)
|
|
3
|
+
class CreateOrmResources < ActiveRecord::Migration[5.0]
|
|
4
|
+
def options
|
|
5
|
+
if ENV["VALKYRIE_ID_TYPE"] == "string"
|
|
6
|
+
{ id: :text, default: -> { '(uuid_generate_v4())::text' } }
|
|
7
|
+
else
|
|
8
|
+
{ id: :uuid }
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def change
|
|
13
|
+
create_table :orm_resources, **options do |t|
|
|
14
|
+
t.jsonb :metadata, null: false, default: {}
|
|
15
|
+
t.timestamps
|
|
16
|
+
end
|
|
17
|
+
add_index :orm_resources, :metadata, using: :gin
|
|
18
|
+
end
|
|
19
|
+
end
|
data/.dassie/db/schema.rb
CHANGED
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
#
|
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
|
12
12
|
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
|
13
|
+
ActiveRecord::Schema.define(version: 2021_11_30_181150) do
|
|
14
14
|
|
|
15
15
|
# These are extensions that must be enabled in order to support this database
|
|
16
16
|
enable_extension "plpgsql"
|
|
17
|
+
enable_extension "uuid-ossp"
|
|
17
18
|
|
|
18
19
|
create_table "bookmarks", id: :serial, force: :cascade do |t|
|
|
19
20
|
t.integer "user_id", null: false
|
|
@@ -139,6 +140,12 @@ ActiveRecord::Schema.define(version: 2020_08_21_212903) do
|
|
|
139
140
|
t.index ["machine_id"], name: "index_hyrax_collection_types_on_machine_id", unique: true
|
|
140
141
|
end
|
|
141
142
|
|
|
143
|
+
create_table "hyrax_default_administrative_set", force: :cascade do |t|
|
|
144
|
+
t.string "default_admin_set_id", null: false
|
|
145
|
+
t.datetime "created_at", null: false
|
|
146
|
+
t.datetime "updated_at", null: false
|
|
147
|
+
end
|
|
148
|
+
|
|
142
149
|
create_table "hyrax_features", force: :cascade do |t|
|
|
143
150
|
t.string "key", null: false
|
|
144
151
|
t.boolean "enabled", default: false, null: false
|
|
@@ -225,6 +232,18 @@ ActiveRecord::Schema.define(version: 2020_08_21_212903) do
|
|
|
225
232
|
t.index ["namespace"], name: "index_minter_states_on_namespace", unique: true
|
|
226
233
|
end
|
|
227
234
|
|
|
235
|
+
create_table "orm_resources", id: :uuid, default: -> { "uuid_generate_v4()" }, force: :cascade do |t|
|
|
236
|
+
t.jsonb "metadata", default: {}, null: false
|
|
237
|
+
t.datetime "created_at", null: false
|
|
238
|
+
t.datetime "updated_at", null: false
|
|
239
|
+
t.string "internal_resource"
|
|
240
|
+
t.integer "lock_version"
|
|
241
|
+
t.index ["internal_resource"], name: "index_orm_resources_on_internal_resource"
|
|
242
|
+
t.index ["metadata"], name: "index_orm_resources_on_metadata", using: :gin
|
|
243
|
+
t.index ["metadata"], name: "index_orm_resources_on_metadata_jsonb_path_ops", opclass: :jsonb_path_ops, using: :gin
|
|
244
|
+
t.index ["updated_at"], name: "index_orm_resources_on_updated_at"
|
|
245
|
+
end
|
|
246
|
+
|
|
228
247
|
create_table "permission_template_accesses", force: :cascade do |t|
|
|
229
248
|
t.bigint "permission_template_id"
|
|
230
249
|
t.string "agent_type"
|
data/.dassie/db/seeds.rb
CHANGED
|
@@ -1,22 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
# Examples:
|
|
5
|
-
#
|
|
6
|
-
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
|
7
|
-
# Character.create(name: 'Luke', movie: movies.first)
|
|
1
|
+
wipe_data = ActiveModel::Type::Boolean.new.cast(ENV.fetch('WIPE_DATA', false))
|
|
2
|
+
seed_release_testing = ActiveModel::Type::Boolean.new.cast(ENV.fetch('SEED_RELEASE_TESTING', false))
|
|
3
|
+
seed_dassie = ActiveModel::Type::Boolean.new.cast(ENV.fetch('SEED_DASSIE', false))
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
unless wipe_data || seed_release_testing
|
|
6
|
+
puts 'NAME'
|
|
7
|
+
puts ' rails db:seed (Hyrax)'
|
|
8
|
+
puts
|
|
9
|
+
puts 'SYNOPSIS'
|
|
10
|
+
puts ' bundle exec rails db:seed [WIPE_DATA=true|false] [SEED_RELEASE_TESTING=true|false] [SEED_DASSIE=true|false]'
|
|
11
|
+
puts
|
|
12
|
+
puts 'DESCRIPTION'
|
|
13
|
+
puts ' Hyrax defined db:seed provides a means to clear repository metadata from the datastore (e.g. Fedora, Postgres) and from Solr.'
|
|
14
|
+
puts ' Seeds can be run to pre-populate metadata to help with release testing and local development testing.'
|
|
15
|
+
puts
|
|
16
|
+
puts ' NOTE: Options can be passed in with the command on the command line or set as ENV variables.'
|
|
17
|
+
puts
|
|
18
|
+
puts ' The options are as follows:'
|
|
19
|
+
puts
|
|
20
|
+
puts ' WIPE_DATA'
|
|
21
|
+
puts ' USE WITH CAUTION - Deleted data cannot be recovered.'
|
|
22
|
+
puts
|
|
23
|
+
puts ' When true, it will clear all repository metadata from the datastore (e.g. Fedora, Postgres) and from Solr. It also'
|
|
24
|
+
puts ' clears data from the application database that are tightly coupled to repository metadata. See Hyrax::DataMaintenance'
|
|
25
|
+
puts ' for more information on what data will be destroyed by this process.'
|
|
26
|
+
puts
|
|
27
|
+
puts ' The wipe_data process will also restore required repository metadata including collection types and the default admin'
|
|
28
|
+
puts ' set. See Hyrax::RequiredDataSeeder for more information on what data will be created by this process.'
|
|
29
|
+
puts
|
|
30
|
+
puts ' SEED_RELEASE_TESTING'
|
|
31
|
+
puts ' When true, it will run the set of seeds for release testing creating a repository metadata and support data, including'
|
|
32
|
+
puts ' test users, collection types, collections, and works with and without files. See Hyrax::TestDataSeeder for more information'
|
|
33
|
+
puts ' on what data will be created by this process.'
|
|
34
|
+
puts
|
|
35
|
+
puts ' SEED_DASSIE'
|
|
36
|
+
puts ' When true, it will run a minimal set of seeds for dassie test app, including required collection types, default admin set,'
|
|
37
|
+
puts ' and test users.'
|
|
38
|
+
puts
|
|
39
|
+
puts ' ALLOW_RELEASE_SEEDING_IN_PRODUCTION'
|
|
40
|
+
puts ' USE WITH EXTERME CAUTION WHEN USED IN PRODUCTION - Deleted data cannot be recovered. Attempts are made to not overwrite'
|
|
41
|
+
puts ' existing data, but use in production is not recommended.'
|
|
42
|
+
puts
|
|
43
|
+
puts ' If this is NOT true, the process will abort when Rails environment is production.'
|
|
44
|
+
puts
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
allow_release_seeding_in_production = ActiveModel::Type::Boolean.new.cast(ENV.fetch('ALLOW_RELEASE_SEEDING_IN_PRODUCTION', false))
|
|
48
|
+
|
|
49
|
+
if Rails.env == 'production' && !allow_release_seeding_in_production
|
|
50
|
+
puts "Seeding data for release testing is not for use in production!"
|
|
51
|
+
exit
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
if wipe_data
|
|
55
|
+
puts '####################################################################################'
|
|
56
|
+
puts
|
|
57
|
+
puts 'WARNING: You are about to clear all repository metadata from the datastore and solr.'
|
|
58
|
+
puts 'Are you sure? [YES|n]'
|
|
59
|
+
answer = STDIN.gets.chomp
|
|
60
|
+
unless answer == 'YES'
|
|
61
|
+
puts ' Aborting!'
|
|
62
|
+
puts '####################################################################################'
|
|
63
|
+
exit
|
|
64
|
+
end
|
|
10
65
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
f.password = 'admin_password'
|
|
66
|
+
Hyrax::DataMaintenance.new.destroy_repository_metadata_and_related_data
|
|
67
|
+
Hyrax::RequiredDataSeeder.new.generate_seed_data
|
|
14
68
|
end
|
|
15
69
|
|
|
16
|
-
|
|
17
|
-
|
|
70
|
+
if seed_dassie
|
|
71
|
+
Hyrax::RequiredDataSeeder.new.generate_seed_data
|
|
72
|
+
Hyrax::TestDataSeeders::UserSeeder.generate_seeds
|
|
18
73
|
end
|
|
19
74
|
|
|
20
|
-
|
|
21
|
-
|
|
75
|
+
if seed_release_testing
|
|
76
|
+
Hyrax::TestDataSeeder.new.generate_seed_data
|
|
22
77
|
end
|
data/.env
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
ANALYTICS_START_DATE=2021-08-21
|
|
1
2
|
CHROME_HEADLESS_MODE=false
|
|
2
3
|
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
|
|
3
4
|
DATABASE_TEST_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax_test?pool=5
|
|
4
5
|
DATABASE_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax?pool=5
|
|
5
|
-
DB_PORT=5432
|
|
6
6
|
DB_HOST=postgres
|
|
7
|
-
|
|
7
|
+
DB_PORT=5432
|
|
8
8
|
FCREPO_HOST=fcrepo
|
|
9
|
+
FCREPO_PORT=8080
|
|
9
10
|
FCREPO_REST_PATH=rest
|
|
10
11
|
FCREPO_TEST_BASE_PATH=/test
|
|
11
12
|
HUB_URL=http://chrome:4444/wd/hub
|
|
13
|
+
HYRAX_ANALYTICS=false
|
|
14
|
+
HYRAX_ANALYTICS_PROVIDER=google
|
|
12
15
|
HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
|
|
13
16
|
HYRAX_ENGINE_PATH=/app/samvera/hyrax-engine
|
|
14
17
|
HYRAX_UPLOAD_PATH=/app/samvera/hyrax-webapp/uploads/
|
|
@@ -17,9 +20,9 @@ RACK_ENV=development
|
|
|
17
20
|
RAILS_ENV=development
|
|
18
21
|
RAILS_ROOT=.dassie
|
|
19
22
|
REDIS_HOST=redis
|
|
20
|
-
SOLR_PORT=8983
|
|
21
23
|
SOLR_HOST=solr
|
|
24
|
+
SOLR_PORT=8983
|
|
22
25
|
SOLR_TEST_URL=http://solr:8983/solr/hyrax_test
|
|
23
26
|
SOLR_URL=http://solr:8983/solr/hyrax
|
|
24
|
-
VALKYRIE_SOLR_PORT=8983
|
|
25
27
|
VALKYRIE_SOLR_HOST=solr
|
|
28
|
+
VALKYRIE_SOLR_PORT=8983
|
data/.github/release.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
changelog:
|
|
2
|
+
categories:
|
|
3
|
+
- title: Major Changes (Potentially breaking changes)
|
|
4
|
+
labels:
|
|
5
|
+
- notes-major
|
|
6
|
+
- title: New Features
|
|
7
|
+
labels:
|
|
8
|
+
- notes-minor
|
|
9
|
+
- title: Deprecations
|
|
10
|
+
labels:
|
|
11
|
+
- notes-deprecation
|
|
12
|
+
- title: Bug Fixes
|
|
13
|
+
labels:
|
|
14
|
+
- notes-bugfix
|
|
15
|
+
- title: Valkyrie Progress
|
|
16
|
+
labels:
|
|
17
|
+
- notes-valkyrie
|
|
18
|
+
- title: Documentation
|
|
19
|
+
labels:
|
|
20
|
+
- notes-docs
|
|
21
|
+
- title: Containerization
|
|
22
|
+
labels:
|
|
23
|
+
- notes-container
|
|
24
|
+
- title: Other
|
|
25
|
+
labels:
|
|
26
|
+
- "*"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Trigger Nurax build
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
push:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
trigger:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: peter-evans/repository-dispatch@v1
|
|
11
|
+
with:
|
|
12
|
+
token: ${{ secrets.NURAX_ACCESS_TOKEN }}
|
|
13
|
+
event-type: push
|
|
14
|
+
repository: curationexperts/nurax
|
|
15
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
|
16
|
+
|
|
17
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: Trigger Nurax build
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
release:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
trigger:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: peter-evans/repository-dispatch@v1
|
|
11
|
+
with:
|
|
12
|
+
token: ${{ secrets.NURAX_ACCESS_TOKEN }}
|
|
13
|
+
event-type: release
|
|
14
|
+
repository: curationexperts/nurax
|
|
15
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
|
16
|
+
|
|
17
|
+
|
data/.gitignore
CHANGED
|
@@ -49,6 +49,8 @@ coverage
|
|
|
49
49
|
rdoc
|
|
50
50
|
/.bundle
|
|
51
51
|
tmp
|
|
52
|
+
/.idea
|
|
53
|
+
|
|
52
54
|
|
|
53
55
|
*.log
|
|
54
56
|
*~
|
|
@@ -71,6 +73,7 @@ db/schema.rb
|
|
|
71
73
|
|
|
72
74
|
.*_app
|
|
73
75
|
.byebug_history
|
|
76
|
+
.tool-versions
|
|
74
77
|
|
|
75
78
|
## Carried over from hyrax-models (RIP)
|
|
76
79
|
*.gem
|
|
@@ -82,3 +85,4 @@ lib/bundler/man
|
|
|
82
85
|
spec/reports
|
|
83
86
|
/spec/examples.txt
|
|
84
87
|
node_modules
|
|
88
|
+
.env.*
|
data/.regen
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
41
|
data/.rubocop_fixme.yml
CHANGED
|
@@ -63,6 +63,7 @@ RSpec/ExampleLength:
|
|
|
63
63
|
- 'spec/jobs/content_restored_version_event_job_spec.rb'
|
|
64
64
|
- 'spec/jobs/content_new_version_event_job_spec.rb'
|
|
65
65
|
- 'spec/jobs/content_depositor_change_event_job_spec.rb'
|
|
66
|
+
- 'spec/jobs/change_depositor_event_job_spec.rb'
|
|
66
67
|
- 'spec/jobs/content_deposit_event_job_spec.rb'
|
|
67
68
|
- 'spec/jobs/content_delete_event_job_spec.rb'
|
|
68
69
|
- 'spec/jobs/ingest_file_job_spec.rb'
|
|
@@ -100,7 +101,6 @@ RSpec/SubjectStub:
|
|
|
100
101
|
- 'spec/models/hyrax/operation_spec.rb'
|
|
101
102
|
- 'spec/controllers/hyrax/accepts_batches_controller_spec.rb'
|
|
102
103
|
- 'spec/indexers/hyrax/repository_reindexer_spec.rb'
|
|
103
|
-
- 'spec/jobs/content_depositor_change_event_job_spec.rb'
|
|
104
104
|
- 'spec/lib/hyrax/analytics_spec.rb'
|
|
105
105
|
- 'spec/models/job_io_wrapper_spec.rb'
|
|
106
106
|
- 'spec/search_builders/hyrax/abstract_type_relation_spec.rb'
|
|
@@ -114,6 +114,8 @@ RSpec/AnyInstance:
|
|
|
114
114
|
- 'spec/controllers/hyrax/batch_edits_controller_spec.rb'
|
|
115
115
|
- 'spec/controllers/hyrax/stats_controller_spec.rb'
|
|
116
116
|
- 'spec/controllers/hyrax/users_controller_spec.rb'
|
|
117
|
+
- 'spec/hyrax/transactions/steps/delete_access_control_spec.rb'
|
|
118
|
+
- 'spec/hyrax/transactions/steps/save_access_control_spec.rb'
|
|
117
119
|
- 'spec/jobs/content_restored_version_event_job_spec.rb'
|
|
118
120
|
- 'spec/jobs/file_set_attached_event_job_spec.rb'
|
|
119
121
|
- 'spec/jobs/hyrax/grant_edit_to_members_job_spec.rb'
|
data/CONTAINERS.md
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
Hyrax-in-a-Container
|
|
2
2
|
====================
|
|
3
3
|
|
|
4
|
-
Our goal is to provide a practical, reusable
|
|
5
|
-
on on-ramp for Hyrax engine development. Then providing help with Hyrax-based application development. Finally,
|
|
6
|
-
providing better guidance around deployment.
|
|
7
|
-
|
|
8
|
-
Where are we at? It's complicated. What we have below is experimental support, but one that we want to push
|
|
9
|
-
towards. We need your help to keep pushing in this direction. So dig in and prepare to get your hands dirty.
|
|
4
|
+
Our goal is to provide a practical, reusable reference environment for applications. The first step is providing an on-ramp for Hyrax engine development. Then providing help with Hyrax-based application development. Finally, providing better guidance around deployment.
|
|
10
5
|
|
|
11
6
|
The [Hyrax Engine Development](#hyrax-engine-development) is further along than the [Docker Image for Hyrax-based Applications](#docker-image-for-hyrax-based-applications) which is further along than [Deploying to Production](#deploying-to-production).
|
|
12
7
|
|
|
8
|
+
See the [Troubleshooting](#troubleshooting) section if you encounter any issues.
|
|
9
|
+
|
|
13
10
|
<!-- NOTE: This title is referenced in the top-level README.md. Keep that in mind if you change it. -->
|
|
14
11
|
## Hyrax Engine Development
|
|
15
12
|
|
|
@@ -42,8 +39,6 @@ To stop the containers for the Hyrax-based application, type <kbd>Ctrl</kbd>+<kb
|
|
|
42
39
|
|
|
43
40
|
_**Note:** Starting and stopping Docker in this way will preserve your data between restarts._
|
|
44
41
|
|
|
45
|
-
_**Note:** I (Jeremy) encountered a problem using `docker-compose build`. I ran `bundle update` in `./hyrax` as well as within `./hyrax/.dassie`. That appeared to clear up the problem of a failure to build a gem._
|
|
46
|
-
|
|
47
42
|
### Code Changes and Testing
|
|
48
43
|
|
|
49
44
|
With `docker-compose up` running, any changes you make to your cloned Hyrax code-base should show up in `http://localhost:3000`; There may be cases where you need to restart your test application (e.g. stop the containers and start them up again).
|
|
@@ -99,7 +94,7 @@ In the two examples, note the difference in the `-w` switch. In the first case,
|
|
|
99
94
|
|
|
100
95
|
### Debugging
|
|
101
96
|
|
|
102
|
-
|
|
97
|
+
If you are interested in running Hyrax in debug mode, this requires a somewhat different approach than running Hyrax bare-metal. You need to use `docker attach` to debug the running docker instance.
|
|
103
98
|
|
|
104
99
|
1. With `docker-compose up` running open a new Terminal session.
|
|
105
100
|
2. In that new Terminal session, using `docker container ls` find the "CONTAINER ID" for the `hyrax-engine-dev`.
|
|
@@ -127,6 +122,14 @@ cp: cannot create directory '/var/solr/data/hyrax_test': Permission denied
|
|
|
127
122
|
|
|
128
123
|
The solution that appears to work is to `docker-compose down --volumes`; This will tear down the docker instance, and remove the volumes. You can then run `docker-compose up` to get back to work. _**Note:** the `--volumes` switch will remove all custom data._
|
|
129
124
|
|
|
125
|
+
#### Errors building the Docker image
|
|
126
|
+
|
|
127
|
+
If you encounter errors running `docker-compose build`, try running `bundle update` in `./hyrax` as well as within `./hyrax/.dassie`. That can help clear up the problem of a failure to build a particular gem.
|
|
128
|
+
|
|
129
|
+
#### Containers do not all start
|
|
130
|
+
|
|
131
|
+
If any of the services fail to start on `docker-compose up`, try clearing out any `Gemfile.lock` files that might exist in `./hyrax` or `./hyrax/.dassie` and run `docker-compose build` again, then `docker-compose up` again.
|
|
132
|
+
|
|
130
133
|
<!-- NOTE: This title is referenced in the top-level documentation/developing-your-hyrax-based-app.md. Keep that in mind if you change it. -->
|
|
131
134
|
## Docker Image for Hyrax-based Applications
|
|
132
135
|
|
|
@@ -177,4 +180,4 @@ helm dependency update chart/hyrax
|
|
|
177
180
|
helm install -n hyrax --set image.tag=(git rev-parse HEAD) dassie chart/hyrax
|
|
178
181
|
```
|
|
179
182
|
|
|
180
|
-
[dockerhub-samveralabs]: https://hub.docker.com/r/samveralabs
|
|
183
|
+
[dockerhub-samveralabs]: https://hub.docker.com/r/samveralabs
|
data/Dockerfile
CHANGED
|
@@ -7,6 +7,7 @@ ARG EXTRA_APK_PACKAGES="git"
|
|
|
7
7
|
RUN apk --no-cache upgrade && \
|
|
8
8
|
apk --no-cache add build-base \
|
|
9
9
|
curl \
|
|
10
|
+
gcompat \
|
|
10
11
|
imagemagick \
|
|
11
12
|
tzdata \
|
|
12
13
|
nodejs \
|
|
@@ -57,7 +58,7 @@ USER app
|
|
|
57
58
|
|
|
58
59
|
RUN mkdir -p /app/fits && \
|
|
59
60
|
cd /app/fits && \
|
|
60
|
-
wget https://github.com/harvard-lts/fits/releases/download/1.5.
|
|
61
|
+
wget https://github.com/harvard-lts/fits/releases/download/1.5.1/fits-1.5.1.zip -O fits.zip && \
|
|
61
62
|
unzip fits.zip && \
|
|
62
63
|
rm fits.zip && \
|
|
63
64
|
chmod a+x /app/fits/fits.sh
|
data/README.md
CHANGED
|
@@ -77,6 +77,43 @@ This is where you work on the code-base that will be used by yours and other Hyr
|
|
|
77
77
|
<p>By moving to Docker, we are encoding the documentation steps for standing up a Hyrax-engine development environment.</p>
|
|
78
78
|
</aside>
|
|
79
79
|
|
|
80
|
+
### Installing Analytics
|
|
81
|
+
|
|
82
|
+
Hyrax supports your choice of either Google Analytics or Matomo. To enable analytics tracking and reporting features, follow the directions below.
|
|
83
|
+
|
|
84
|
+
Enable Analytics Features
|
|
85
|
+
|
|
86
|
+
Analytics can be enabled and configured using environment variables. Set HYRAX_ANALYTICS to true, set either 'google' or 'matomo' for HYRAX_ANALYTICS_PROVIDER, and set the date you would like reporting to start (ANALYTICS_START_DATE).
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
HYRAX_ANALYTICS=true
|
|
90
|
+
HYRAX_ANALYTICS_PROVIDER=google
|
|
91
|
+
ANALYTICS_START_DATE=2021-08-21
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If using google, you'll also need the following ENV variables:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
GOOGLE_ANALYTICS_ID=UA-111111-1 # Universal ID (Currently Hyrax Analytics only works with Univeral (UA) accounts)
|
|
98
|
+
GOOGLE_OAUTH_APP_NAME=
|
|
99
|
+
GOOGLE_OAUTHAPP_VERSION=
|
|
100
|
+
GOOGLE_OAUTH_PRIVATE_KEY_PATH= # store the .p12 file in the root of your application
|
|
101
|
+
GOOGLE_OAUTH_PRIVATE_KEY_SECRET=
|
|
102
|
+
GOOGLE_OAUTH_CLIENT_EMAIL=
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Add these ENV variables if using Matomo:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
MATOMO_SITE_ID=
|
|
109
|
+
MATOMO_BASE_URL=
|
|
110
|
+
MATOMO_AUTH_TOKEN=
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
#### Analytics Features
|
|
114
|
+
|
|
115
|
+
Once analytics is enabled, Hyrax will automatically install the JS tracking code. Page views and downloads of a file set are recorded and sent to the selected analytics provider. Admin users will have access to an expanded dashboard with details about how many vistors viewed a page, and how many visitors downloaded a file. Easily find the top works by views, and most popular file downloads!
|
|
116
|
+
|
|
80
117
|
#### Contributing
|
|
81
118
|
|
|
82
119
|
We'd love to accept your contributions. Please see our guide to [contributing to Hyrax](./.github/CONTRIBUTING.md).
|