hyrax 3.0.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +49 -19
- data/.dassie/.env +1 -2
- data/.dassie/Gemfile +18 -9
- data/.dassie/app/controllers/catalog_controller.rb +6 -0
- 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 +7 -0
- data/.dassie/config/role_map.yml +2 -0
- 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 +1 -1
- data/.dockerignore +3 -0
- data/.env +8 -6
- data/.github/workflows/main.yml +17 -0
- data/.github/workflows/release.yml +17 -0
- data/.gitignore +1 -0
- data/.regen +1 -1
- data/.rubocop.yml +4 -0
- data/CONTAINERS.md +33 -10
- data/Dockerfile +14 -9
- data/Gemfile +21 -27
- data/README.md +37 -0
- data/app/actors/hyrax/actors/base_actor.rb +2 -2
- data/app/actors/hyrax/actors/collections_membership_actor.rb +3 -3
- data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +85 -63
- data/app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb +7 -42
- data/app/actors/hyrax/actors/file_set_actor.rb +12 -5
- data/app/assets/javascripts/hyrax/admin/graphs.es6 +34 -37
- data/app/assets/javascripts/hyrax/analytics_events.js +69 -0
- 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/assets/stylesheets/hyrax/_styles.scss +5 -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/collections_controller_behavior.rb +30 -10
- data/app/controllers/concerns/hyrax/controller.rb +35 -2
- data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +21 -9
- data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +14 -5
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +22 -3
- data/app/controllers/hyrax/admin/admin_sets_controller.rb +2 -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 +5 -6
- data/app/controllers/hyrax/admin/workflows_controller.rb +8 -2
- data/app/controllers/hyrax/collections_controller.rb +6 -1
- data/app/controllers/hyrax/dashboard/collection_members_controller.rb +24 -17
- data/app/controllers/hyrax/dashboard/collections_controller.rb +112 -37
- data/app/controllers/hyrax/dashboard/nest_collections_controller.rb +75 -39
- data/app/controllers/hyrax/dashboard_controller.rb +8 -0
- data/app/controllers/hyrax/file_sets_controller.rb +49 -13
- data/app/controllers/hyrax/my_controller.rb +4 -4
- data/app/controllers/hyrax/permissions_controller.rb +3 -4
- data/app/controllers/hyrax/stats_controller.rb +3 -1
- data/app/controllers/hyrax/workflow_actions_controller.rb +11 -6
- data/app/forms/hyrax/forms/administrative_set_form.rb +62 -0
- data/app/forms/hyrax/forms/collection_form.rb +9 -5
- data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +38 -6
- data/app/forms/hyrax/forms/file_set_form.rb +46 -0
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +67 -0
- data/app/forms/hyrax/forms/permission.rb +23 -0
- data/app/forms/hyrax/forms/permission_template_form.rb +8 -2
- data/app/forms/hyrax/forms/resource_form.rb +34 -26
- data/app/forms/hyrax/forms/work_form.rb +5 -2
- data/app/forms/hyrax/forms/workflow_action_form.rb +4 -0
- data/app/helpers/hyrax/batch_edits_helper.rb +3 -1
- data/app/helpers/hyrax/collections_helper.rb +88 -2
- data/app/helpers/hyrax/dashboard_helper_behavior.rb +16 -5
- data/app/helpers/hyrax/embargo_helper.rb +4 -0
- data/app/helpers/hyrax/file_set_helper.rb +25 -6
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +9 -0
- data/app/helpers/hyrax/lease_helper.rb +4 -0
- data/app/helpers/hyrax/url_helper.rb +4 -1
- data/app/helpers/hyrax/work_form_helper.rb +53 -0
- data/app/indexers/hyrax/administrative_set_indexer.rb +18 -0
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +2 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +3 -1
- data/app/indexers/hyrax/valkyrie_indexer.rb +3 -3
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +1 -1
- data/app/inputs/controlled_vocabulary_input.rb +2 -5
- data/app/jobs/attach_files_to_work_job.rb +19 -10
- data/app/jobs/attach_files_to_work_with_ordered_members_job.rb +6 -5
- data/app/jobs/characterize_job.rb +28 -1
- data/app/jobs/ingest_local_file_job.rb +18 -2
- data/app/jobs/inherit_permissions_job.rb +9 -5
- data/app/jobs/valkyrie_ingest_job.rb +56 -0
- data/app/models/admin_set.rb +22 -30
- data/app/models/collection_branding_info.rb +25 -9
- data/app/models/concerns/hyrax/ability/admin_set_ability.rb +31 -7
- data/app/models/concerns/hyrax/ability/collection_ability.rb +35 -20
- data/app/models/concerns/hyrax/ability/collection_type_ability.rb +1 -1
- data/app/models/concerns/hyrax/ability.rb +31 -8
- data/app/models/concerns/hyrax/collection_behavior.rb +17 -44
- data/app/models/concerns/hyrax/embargoable.rb +24 -0
- data/app/models/concerns/hyrax/file_set/characterization.rb +18 -12
- data/app/models/concerns/hyrax/solr_document/metadata.rb +1 -0
- data/app/models/concerns/hyrax/solr_document_behavior.rb +11 -54
- data/app/models/concerns/hyrax/suppressible.rb +5 -0
- data/app/models/concerns/hyrax/user.rb +9 -3
- data/app/models/concerns/hyrax/work_behavior.rb +1 -1
- data/app/models/file_download_stat.rb +4 -4
- data/app/models/hyrax/administrative_set.rb +7 -1
- data/app/models/hyrax/default_administrative_set.rb +42 -0
- data/app/models/hyrax/file_set.rb +6 -0
- data/app/models/hyrax/pcdm_collection.rb +1 -0
- data/app/models/hyrax/permission.rb +1 -1
- data/app/models/hyrax/permission_template.rb +112 -12
- data/app/models/hyrax/statistic.rb +31 -4
- data/app/models/hyrax/virus_scanner.rb +27 -18
- data/app/models/hyrax/work.rb +1 -0
- data/app/models/hyrax/workflow_action_info.rb +16 -0
- data/app/models/sipity/agent.rb +1 -0
- data/app/models/sipity/comment.rb +17 -0
- data/app/models/sipity/entity.rb +30 -8
- data/app/models/sipity/workflow.rb +1 -0
- data/app/models/sipity.rb +53 -2
- 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_options_presenter.rb +12 -8
- data/app/presenters/hyrax/admin_set_presenter.rb +13 -4
- data/app/presenters/hyrax/admin_set_selection_presenter.rb +116 -0
- data/app/presenters/hyrax/collection_presenter.rb +34 -9
- data/app/presenters/hyrax/file_set_presenter.rb +8 -1
- data/app/presenters/hyrax/file_usage.rb +3 -2
- data/app/presenters/hyrax/menu_presenter.rb +4 -0
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +119 -0
- data/app/presenters/hyrax/stats_usage_presenter.rb +2 -1
- data/app/presenters/hyrax/trophy_presenter.rb +33 -4
- data/app/presenters/hyrax/user_profile_presenter.rb +11 -1
- data/app/presenters/hyrax/version_list_presenter.rb +19 -0
- data/app/presenters/hyrax/version_presenter.rb +3 -2
- data/app/presenters/hyrax/work_show_presenter.rb +37 -8
- data/app/presenters/hyrax/work_usage.rb +6 -3
- data/app/renderers/hyrax/renderers/attribute_renderer.rb +10 -2
- data/app/search_builders/hyrax/README.md +1 -1
- data/app/search_builders/hyrax/abstract_type_relation.rb +4 -2
- data/app/search_builders/hyrax/admin_set_search_builder.rb +1 -1
- data/app/search_builders/hyrax/collection_member_search_builder.rb +6 -1
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +1 -1
- data/app/search_builders/hyrax/exposed_models_relation.rb +1 -1
- data/app/search_builders/hyrax/filter_by_type.rb +1 -2
- data/app/search_builders/hyrax/my/collections_search_builder.rb +2 -2
- data/app/search_builders/hyrax/nested_collections_parent_search_builder.rb +1 -1
- data/app/search_builders/hyrax/single_collection_search_builder.rb +1 -1
- data/app/services/hyrax/admin_set_create_service.rb +199 -53
- 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/characterization/valkyrie_characterization_service.rb +134 -0
- data/app/services/hyrax/collection_types/permissions_service.rb +1 -1
- data/app/services/hyrax/collections/collection_member_search_service.rb +72 -0
- data/app/services/hyrax/collections/collection_member_service.rb +122 -27
- data/app/services/hyrax/collections/migration_service.rb +4 -2
- data/app/services/hyrax/collections/nested_collection_persistence_service.rb +12 -13
- data/app/services/hyrax/collections/nested_collection_query_service.rb +10 -3
- data/app/services/hyrax/collections/permissions_create_service.rb +82 -78
- data/app/services/hyrax/collections/permissions_service.rb +1 -1
- data/app/services/hyrax/contextual_path.rb +24 -1
- data/app/services/hyrax/curation_concern.rb +24 -2
- data/app/services/hyrax/custom_queries/find_file_metadata.rb +7 -5
- data/app/services/hyrax/custom_queries/navigators/parent_collections_navigator.rb +46 -0
- data/app/services/hyrax/default_middleware_stack.rb +11 -0
- data/app/services/hyrax/edit_permissions_service.rb +74 -41
- data/app/services/hyrax/ensure_well_formed_admin_set_service.rb +3 -3
- data/app/services/hyrax/find_objects_via_solr_service.rb +31 -0
- data/app/services/hyrax/listeners/acl_index_listener.rb +3 -1
- data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +4 -1
- data/app/services/hyrax/listeners/batch_notification_listener.rb +3 -1
- data/app/services/hyrax/listeners/file_metadata_listener.rb +19 -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 +3 -0
- data/app/services/hyrax/listeners/metadata_index_listener.rb +33 -11
- data/app/services/hyrax/listeners/object_lifecycle_listener.rb +9 -3
- data/app/services/hyrax/listeners/proxy_deposit_listener.rb +3 -1
- 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/multiple_membership_checker.rb +53 -29
- data/app/services/hyrax/permission_manager.rb +4 -4
- data/app/services/hyrax/resource_status.rb +7 -0
- data/app/services/hyrax/restriction_service.rb +4 -0
- data/app/services/hyrax/search_service.rb +4 -2
- data/app/services/hyrax/solr_query_builder_service.rb +45 -8
- data/app/services/hyrax/solr_query_service.rb +224 -0
- data/app/services/hyrax/solr_service.rb +9 -2
- data/app/services/hyrax/statistics/collections/over_time.rb +2 -1
- data/app/services/hyrax/statistics/depositors/summary.rb +2 -1
- 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/visibility_intention.rb +20 -2
- data/app/services/hyrax/work_uploads_handler.rb +21 -3
- data/app/services/hyrax/workflow/abstract_notification.rb +2 -2
- data/app/services/hyrax/workflow/action_taken_service.rb +16 -4
- data/app/services/hyrax/workflow/actionable_objects.rb +70 -0
- data/app/services/hyrax/workflow/activate_object.rb +5 -4
- data/app/services/hyrax/workflow/changes_required_notification.rb +5 -4
- data/app/services/hyrax/workflow/deactivate_object.rb +7 -5
- data/app/services/hyrax/workflow/deposited_notification.rb +8 -4
- data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +7 -3
- data/app/services/hyrax/workflow/grant_read_to_depositor.rb +10 -3
- data/app/services/hyrax/workflow/object_in_workflow_decorator.rb +31 -0
- data/app/services/hyrax/workflow/revoke_edit_from_depositor.rb +8 -2
- data/app/services/hyrax/workflow/status_list_service.rb +43 -13
- data/app/services/hyrax/workflow/workflow_action_service.rb +4 -1
- data/app/views/hyrax/admin/admin_sets/_form.html.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/stats/show.html.erb +1 -1
- data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -1
- data/app/views/hyrax/base/_form_relationships.html.erb +1 -2
- data/app/views/hyrax/base/_form_rendering.html.erb +1 -1
- data/app/views/hyrax/base/_form_representative.html.erb +1 -1
- data/app/views/hyrax/base/_form_thumbnail.html.erb +1 -1
- data/app/views/hyrax/base/_form_visibility_error.html.erb +2 -0
- data/app/views/hyrax/base/_guts4form.html.erb +3 -3
- data/app/views/hyrax/base/_relationships_parent_row.html.erb +0 -1
- data/app/views/hyrax/base/_representative_media.html.erb +1 -1
- data/app/views/hyrax/base/_show_actions.html.erb +2 -2
- data/app/views/hyrax/base/_work_button_row.html.erb +1 -1
- data/app/views/hyrax/base/show.html.erb +6 -0
- data/app/views/hyrax/batch_uploads/_form.html.erb +1 -1
- 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/_collection_title.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form.html.erb +6 -5
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/edit.html.erb +4 -2
- data/app/views/hyrax/dashboard/collections/new.html.erb +4 -2
- data/app/views/hyrax/dashboard/collections/show.html.erb +1 -1
- 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/file_sets/_actions.html.erb +4 -3
- data/app/views/hyrax/file_sets/edit.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
- data/app/views/hyrax/file_sets/show.html.erb +7 -1
- data/app/views/hyrax/homepage/index.html.erb +1 -1
- data/app/views/hyrax/my/_admin_set_action_menu.html.erb +0 -11
- data/app/views/hyrax/my/_collection_action_menu.html.erb +1 -2
- data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +3 -5
- data/app/views/hyrax/my/collections/_modal_collection_types_to_create.html.erb +1 -1
- data/app/views/hyrax/my/collections/index.html.erb +1 -1
- 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/layouts/hyrax/dashboard.html.erb +1 -0
- data/app/views/layouts/hyrax.html.erb +1 -0
- data/app/views/{_ga.html.erb → shared/_ga.html.erb} +3 -7
- data/app/views/shared/_matomo.html.erb +15 -0
- data/app/views/shared/_read_only.html.erb +5 -0
- data/bin/db-migrate-seed.sh +3 -1
- data/bin/hyrax-entrypoint.sh +0 -14
- data/bin/solrcloud-assign-configset.sh +11 -3
- data/bin/solrcloud-upload-configset.sh +17 -6
- data/chart/hyrax/Chart.yaml +9 -5
- data/chart/hyrax/README.md +52 -5
- data/chart/hyrax/templates/_helpers.tpl +15 -1
- data/chart/hyrax/templates/branding-pvc.yaml +2 -2
- data/chart/hyrax/templates/configmap-env.yaml +6 -2
- data/chart/hyrax/templates/deployment-worker.yaml +42 -5
- data/chart/hyrax/templates/deployment.yaml +53 -0
- data/chart/hyrax/templates/derivatives-pvc.yaml +2 -2
- data/chart/hyrax/templates/ingress.yaml +13 -4
- data/chart/hyrax/templates/secrets.yaml +8 -0
- data/chart/hyrax/templates/uploads-pvc.yaml +2 -2
- data/chart/hyrax/values.yaml +84 -2
- data/config/brakeman.ignore +2 -2
- data/config/features.rb +3 -0
- data/config/i18n-tasks.yml +2 -2
- data/config/initializers/1_healthz.rb +1 -0
- data/config/initializers/listeners.rb +5 -4
- data/config/initializers/valkryrie_storage.rb +7 -0
- data/config/locales/hyrax.de.yml +195 -1
- data/config/locales/hyrax.en.yml +192 -13
- data/config/locales/hyrax.es.yml +195 -1
- data/config/locales/hyrax.fr.yml +195 -1
- data/config/locales/hyrax.it.yml +195 -1
- data/config/locales/hyrax.pt-BR.yml +195 -1
- data/config/locales/hyrax.zh.yml +195 -1
- data/config/routes.rb +4 -0
- data/db/seeds.rb +1 -1
- data/docker-compose.yml +42 -9
- data/documentation/developing-your-hyrax-based-app.md +4 -4
- data/documentation/legacyREADME.md +4 -4
- data/hyrax.gemspec +4 -2
- data/lib/generators/hyrax/templates/catalog_controller.rb +3 -1
- data/lib/generators/hyrax/templates/config/analytics.yml +13 -7
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +15 -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 +4 -2
- data/lib/generators/hyrax/work_resource/templates/indexer_spec.rb.erb +1 -0
- data/lib/hyrax/active_fedora_dummy_model.rb +62 -0
- data/lib/hyrax/collection_name.rb +6 -2
- data/lib/hyrax/configuration.rb +114 -4
- data/lib/hyrax/engine.rb +9 -6
- data/lib/hyrax/errors.rb +2 -0
- data/lib/hyrax/form_fields.rb +1 -0
- data/lib/hyrax/publisher.rb +16 -0
- data/lib/hyrax/resource_name.rb +1 -0
- data/lib/hyrax/resource_sync/change_list_writer.rb +2 -2
- data/lib/hyrax/resource_sync/resource_list_writer.rb +2 -2
- data/lib/hyrax/specs/capybara.rb +5 -3
- data/lib/hyrax/specs/shared_specs/hydra_works.rb +2 -0
- data/lib/hyrax/specs/shared_specs/indexers.rb +6 -0
- data/lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb +9 -0
- data/lib/hyrax/transactions/admin_set_create.rb +22 -0
- data/lib/hyrax/transactions/collection_create.rb +25 -0
- data/lib/hyrax/transactions/collection_update.rb +20 -0
- data/lib/hyrax/transactions/container.rb +58 -0
- data/lib/hyrax/transactions/file_set_destroy.rb +21 -0
- data/lib/hyrax/transactions/steps/add_file_sets.rb +3 -2
- data/lib/hyrax/transactions/steps/add_to_collections.rb +13 -1
- data/lib/hyrax/transactions/steps/add_to_parent.rb +36 -0
- data/lib/hyrax/transactions/steps/apply_collection_type_permissions.rb +29 -0
- data/lib/hyrax/transactions/steps/remove_file_set_from_work.rb +47 -0
- data/lib/hyrax/transactions/steps/save.rb +18 -6
- data/lib/hyrax/transactions/steps/set_collection_type_gid.rb +35 -0
- data/lib/hyrax/transactions/work_create.rb +2 -1
- data/lib/hyrax/valkyrie_can_can_adapter.rb +1 -0
- data/lib/hyrax/valkyrie_simple_path_generator.rb +20 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +9 -0
- data/lib/tasks/collection_type_global_id.rake +1 -1
- data/lib/tasks/default_admin_set.rake +12 -11
- data/lib/tasks/regenerate_derivatives.rake +12 -0
- data/lib/wings/active_fedora_converter/default_work.rb +15 -0
- data/lib/wings/model_transformer.rb +17 -1
- data/lib/wings/orm_converter.rb +18 -2
- data/lib/wings/setup.rb +17 -0
- data/lib/wings/valkyrie/persister.rb +16 -0
- data/lib/wings/valkyrie/storage.rb +56 -1
- data/lib/wings.rb +0 -21
- 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 +120 -17
- 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: 95d9c34fb76fd8e3ac06d6605962c16bbdad32ffa2c1f5ab24958740fc175507
|
4
|
+
data.tar.gz: 8be6a02dc887f93076d84a5dc47b8e4cc7ecf916415e23fd00df24078f20ebbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6e519190cda4bdcdb4a68577b682ad6fd138756da25ce69228429755e3ee3a2fb3ac95d9140831d623f75e0aa8a9115d378abafe8f301850c200fb8080b9942
|
7
|
+
data.tar.gz: 90610095bd1b82e79bc7ebaa8de11a2f3c8452803a15d60a4595308b67ab85724b118c7343b2a46fb2bafb3a138365fdb94540e948965cc1a96d4259fd8b07d6
|
data/.circleci/config.yml
CHANGED
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
default: 1.17.3
|
13
13
|
rails_version:
|
14
14
|
type: string
|
15
|
-
default: '5.2.
|
15
|
+
default: '5.2.6'
|
16
16
|
executor:
|
17
17
|
name: 'samvera/ruby'
|
18
18
|
ruby_version: << parameters.ruby_version >>
|
@@ -22,10 +22,20 @@ jobs:
|
|
22
22
|
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
|
23
23
|
steps:
|
24
24
|
- samvera/cached_checkout
|
25
|
-
|
25
|
+
|
26
|
+
- run:
|
27
|
+
name: Check for a branch named 'master'
|
28
|
+
command: |
|
29
|
+
git fetch --all --quiet --prune --prune-tags
|
30
|
+
if [[ -n "$(git branch --all --list master */master)" ]]; then
|
31
|
+
echo "A branch named 'master' was found. Please remove it."
|
32
|
+
echo "$(git branch --all --list master */master)"
|
33
|
+
fi
|
34
|
+
[[ -z "$(git branch --all --list master */master)" ]]
|
35
|
+
|
36
|
+
- samvera/bundle:
|
26
37
|
ruby_version: << parameters.ruby_version >>
|
27
38
|
bundler_version: << parameters.bundler_version >>
|
28
|
-
project: hyrax
|
29
39
|
|
30
40
|
# Run rubocop in parallel with caching
|
31
41
|
# This should get added to the orb once proven here
|
@@ -63,7 +73,7 @@ jobs:
|
|
63
73
|
default: 1.17.3
|
64
74
|
rails_version:
|
65
75
|
type: string
|
66
|
-
default: '5.2.
|
76
|
+
default: '5.2.6'
|
67
77
|
executor:
|
68
78
|
name: 'samvera/ruby_fcrepo_solr_redis_postgres'
|
69
79
|
ruby_version: << parameters.ruby_version >>
|
@@ -78,10 +88,9 @@ jobs:
|
|
78
88
|
at: ~/
|
79
89
|
- samvera/engine_cart_generate:
|
80
90
|
cache_key: v1-internal-test-app-{{ checksum "hyrax.gemspec" }}-{{ checksum ".regen" }}-{{ checksum ".circleci/config.yml" }}-<< parameters.rails_version >>-<< parameters.ruby_version >>
|
81
|
-
- samvera/
|
91
|
+
- samvera/bundle:
|
82
92
|
ruby_version: << parameters.ruby_version >>
|
83
93
|
bundler_version: << parameters.bundler_version >>
|
84
|
-
project: hyrax
|
85
94
|
- persist_to_workspace:
|
86
95
|
root: ~/
|
87
96
|
paths:
|
@@ -117,24 +126,38 @@ jobs:
|
|
117
126
|
solr_config_path: .internal_test_app/solr/conf
|
118
127
|
core_name: hyrax-valkyrie-test
|
119
128
|
# Rerun bundler in case this is a different ruby version than bundle and build steps
|
120
|
-
- samvera/
|
129
|
+
- samvera/bundle:
|
121
130
|
ruby_version: << parameters.ruby_version >>
|
122
131
|
bundler_version: << parameters.bundler_version >>
|
123
|
-
project: hyrax
|
124
132
|
- run:
|
125
133
|
command: bundle exec rake app:db:migrate
|
126
134
|
- samvera/parallel_rspec
|
127
135
|
|
136
|
+
# Trigger a workflow on the nurax repository that will deploy the most recent hyrax gem code to https://nurax-dev.curationexperts.com/
|
137
|
+
deploy:
|
138
|
+
docker:
|
139
|
+
- image: ubuntu
|
140
|
+
steps:
|
141
|
+
- run:
|
142
|
+
name: Install curl
|
143
|
+
command: apt-get update && apt-get install -y curl
|
144
|
+
- run:
|
145
|
+
name: "Trigger Nurax deploy"
|
146
|
+
command: |
|
147
|
+
curl -X POST https://circleci.com/api/v2/project/gh/curationexperts/nurax/pipeline \
|
148
|
+
--header "Circle-Token: $NURAX_CIRCLECI_TOKEN" \
|
149
|
+
--header 'Accept: text/plain' \
|
150
|
+
--header 'Content-Type: application/json'
|
128
151
|
workflows:
|
129
152
|
version: 2
|
130
153
|
ruby2-5-8:
|
131
154
|
jobs:
|
132
155
|
- bundle:
|
133
156
|
ruby_version: "2.5.8"
|
134
|
-
rails_version: "5.2.
|
157
|
+
rails_version: "5.2.6"
|
135
158
|
- build:
|
136
159
|
ruby_version: "2.5.8"
|
137
|
-
rails_version: "5.2.
|
160
|
+
rails_version: "5.2.6"
|
138
161
|
requires:
|
139
162
|
- bundle
|
140
163
|
- test:
|
@@ -146,10 +169,10 @@ workflows:
|
|
146
169
|
jobs:
|
147
170
|
- bundle:
|
148
171
|
ruby_version: "2.6.6"
|
149
|
-
rails_version: "5.2.
|
172
|
+
rails_version: "5.2.6"
|
150
173
|
- build:
|
151
174
|
ruby_version: "2.6.6"
|
152
|
-
rails_version: "5.2.
|
175
|
+
rails_version: "5.2.6"
|
153
176
|
requires:
|
154
177
|
- bundle
|
155
178
|
- test:
|
@@ -163,21 +186,28 @@ workflows:
|
|
163
186
|
hyrax_valkyrie: "true"
|
164
187
|
requires:
|
165
188
|
- build
|
166
|
-
ruby2-7-
|
189
|
+
ruby2-7-4:
|
167
190
|
jobs:
|
168
191
|
- bundle:
|
169
|
-
ruby_version: "2.7.
|
170
|
-
rails_version: "5.2.
|
192
|
+
ruby_version: "2.7.4"
|
193
|
+
rails_version: "5.2.6"
|
171
194
|
bundler_version: "2.1.4"
|
172
195
|
- build:
|
173
|
-
ruby_version: "2.7.
|
174
|
-
rails_version: "5.2.
|
196
|
+
ruby_version: "2.7.4"
|
197
|
+
rails_version: "5.2.6"
|
175
198
|
bundler_version: "2.1.4"
|
176
199
|
requires:
|
177
200
|
- bundle
|
178
201
|
- test:
|
179
|
-
name: "ruby2-7-
|
180
|
-
ruby_version: "2.7.
|
202
|
+
name: "ruby2-7-4"
|
203
|
+
ruby_version: "2.7.4"
|
181
204
|
bundler_version: "2.1.4"
|
182
205
|
requires:
|
183
206
|
- build
|
207
|
+
nurax-dev_deploy:
|
208
|
+
jobs:
|
209
|
+
- deploy:
|
210
|
+
filters:
|
211
|
+
branches:
|
212
|
+
only:
|
213
|
+
- main
|
data/.dassie/.env
CHANGED
data/.dassie/Gemfile
CHANGED
@@ -1,14 +1,21 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Attempts to determine if a global gem source has ready been added by another Gemfile
|
3
|
+
if @sources.global_rubygems_source == Bundler::SourceList.new.global_rubygems_source
|
4
|
+
Bundler.ui.info '[Dassie] Adding global rubygems source.'
|
5
|
+
source 'https://rubygems.org'
|
6
|
+
else
|
7
|
+
Bundler.ui.info "[Dassie] Global rubygems source already set: #{@sources.global_rubygems_source.inspect}"
|
8
|
+
end
|
2
9
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
10
|
|
4
|
-
ruby '2.7.
|
11
|
+
ruby '2.7.4'
|
5
12
|
|
6
13
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
7
14
|
gem 'rails', '~> 5.2.4', '>= 5.2.4.4'
|
8
15
|
# Use postgresql as the database for Active Record
|
9
16
|
gem 'pg', '>= 0.18', '< 2.0'
|
10
17
|
# Use Puma as the app server
|
11
|
-
gem 'puma', '~> 3.
|
18
|
+
gem 'puma', '~> 4.3.8'
|
12
19
|
# Use SCSS for stylesheets
|
13
20
|
gem 'sass-rails', '~> 5.0'
|
14
21
|
# Use Uglifier as compressor for JavaScript assets
|
@@ -43,15 +50,17 @@ end
|
|
43
50
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
44
51
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
45
52
|
|
46
|
-
|
47
|
-
gem 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
|
48
|
-
rescue; end
|
53
|
+
gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
|
49
54
|
|
50
|
-
gem 'rsolr', '>= 1.0', '< 3'
|
51
55
|
gem 'bootstrap-sass', '~> 3.0'
|
52
|
-
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
|
53
|
-
gem 'jquery-rails'
|
54
56
|
gem 'devise'
|
55
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'
|
56
63
|
gem 'riiif', '~> 2.1'
|
64
|
+
gem 'rsolr', '>= 1.0', '< 3'
|
57
65
|
gem 'sidekiq', '~> 6.0'
|
66
|
+
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
|
@@ -5,6 +5,8 @@ class CatalogController < ApplicationController
|
|
5
5
|
|
6
6
|
# This filter applies the hydra access controls
|
7
7
|
before_action :enforce_show_permissions, only: :show
|
8
|
+
# Allow all search options when in read-only mode
|
9
|
+
skip_before_action :check_read_only
|
8
10
|
|
9
11
|
def self.uploaded_field
|
10
12
|
"system_create_dtsi"
|
@@ -28,6 +30,10 @@ class CatalogController < ApplicationController
|
|
28
30
|
config.view.gallery.partials = [:index_header, :index]
|
29
31
|
config.view.slideshow.partials = [:index]
|
30
32
|
|
33
|
+
# Because too many times on Samvera tech people raise a problem regarding a failed query to SOLR.
|
34
|
+
# Often, it's because they inadvertently exceeded the character limit of a GET request.
|
35
|
+
config.http_method = :post
|
36
|
+
|
31
37
|
## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
|
32
38
|
config.default_solr_params = {
|
33
39
|
qt: "search",
|
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`
|
@@ -39,6 +41,11 @@ Hyrax.config do |config|
|
|
39
41
|
##
|
40
42
|
# Set the system-wide virus scanner
|
41
43
|
config.virus_scanner = Hyrax::VirusScanner
|
44
|
+
|
45
|
+
##
|
46
|
+
# To index to the Valkyrie core, uncomment the following two lines.
|
47
|
+
# config.query_index_from_valkyrie = true
|
48
|
+
# config.index_adapter = :solr_index
|
42
49
|
end
|
43
50
|
|
44
51
|
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
|
data/.dassie/config/role_map.yml
CHANGED
@@ -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
@@ -6,7 +6,7 @@
|
|
6
6
|
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
7
7
|
# Character.create(name: 'Luke', movie: movies.first)
|
8
8
|
|
9
|
-
Hyrax::Engine.load_seed
|
9
|
+
Hyrax::Engine.load_seed unless ActiveModel::Type::Boolean.new.cast(ENV["SKIP_HYRAX_ENGINE_SEED"])
|
10
10
|
|
11
11
|
puts "\n== Loading users"
|
12
12
|
User.where(email: 'admin@example.com').first_or_create do |f|
|
data/.dockerignore
CHANGED
data/.env
CHANGED
@@ -1,15 +1,17 @@
|
|
1
|
-
|
1
|
+
ANALYTICS_START_DATE=2021-08-21
|
2
2
|
CHROME_HEADLESS_MODE=false
|
3
3
|
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
|
4
4
|
DATABASE_TEST_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax_test?pool=5
|
5
5
|
DATABASE_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax?pool=5
|
6
|
-
DB_PORT=5432
|
7
6
|
DB_HOST=postgres
|
8
|
-
|
7
|
+
DB_PORT=5432
|
9
8
|
FCREPO_HOST=fcrepo
|
10
|
-
|
9
|
+
FCREPO_PORT=8080
|
10
|
+
FCREPO_REST_PATH=rest
|
11
11
|
FCREPO_TEST_BASE_PATH=/test
|
12
12
|
HUB_URL=http://chrome:4444/wd/hub
|
13
|
+
HYRAX_ANALYTICS=false
|
14
|
+
HYRAX_ANALYTICS_PROVIDER=google
|
13
15
|
HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
|
14
16
|
HYRAX_ENGINE_PATH=/app/samvera/hyrax-engine
|
15
17
|
HYRAX_UPLOAD_PATH=/app/samvera/hyrax-webapp/uploads/
|
@@ -18,9 +20,9 @@ RACK_ENV=development
|
|
18
20
|
RAILS_ENV=development
|
19
21
|
RAILS_ROOT=.dassie
|
20
22
|
REDIS_HOST=redis
|
21
|
-
SOLR_PORT=8983
|
22
23
|
SOLR_HOST=solr
|
24
|
+
SOLR_PORT=8983
|
23
25
|
SOLR_TEST_URL=http://solr:8983/solr/hyrax_test
|
24
26
|
SOLR_URL=http://solr:8983/solr/hyrax
|
25
|
-
VALKYRIE_SOLR_PORT=8983
|
26
27
|
VALKYRIE_SOLR_HOST=solr
|
28
|
+
VALKYRIE_SOLR_PORT=8983
|
@@ -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
data/.regen
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
40
|
data/.rubocop.yml
CHANGED
data/CONTAINERS.md
CHANGED
@@ -1,14 +1,11 @@
|
|
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.
|
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.
|
7
5
|
|
8
|
-
|
9
|
-
towards. We need your help to keep pushing in this direction. So dig in and prepare to get your hands dirty.
|
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).
|
10
7
|
|
11
|
-
|
8
|
+
See the [Troubleshooting](#troubleshooting) section if you encounter any issues.
|
12
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
|
@@ -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`.
|
@@ -107,6 +102,34 @@ I (Jeremy) find myself wanting to debug the application. This requires a somewh
|
|
107
102
|
|
108
103
|
This advice comes from [Debugging Rails App With Docker Compose: How to use Byebug in a dockerized rails app](https://medium.com/gogox-technology/debugging-rails-app-with-docker-compose-39a3767962f4).
|
109
104
|
|
105
|
+
### Troubleshooting
|
106
|
+
|
107
|
+
#### Bad Address SOLR
|
108
|
+
|
109
|
+
With `docker-compose up` running, if you see the following, then there may be issues with file permissions:
|
110
|
+
|
111
|
+
```
|
112
|
+
db_migrate_1 | waiting for solr:8983
|
113
|
+
db_migrate_1 | nc: bad address 'solr'
|
114
|
+
```
|
115
|
+
|
116
|
+
Check the Docker application logs and look for permission errors:
|
117
|
+
|
118
|
+
```
|
119
|
+
Executing /opt/docker-solr/scripts/precreate-core hyrax_test /opt/solr/server/configsets/hyraxconf
|
120
|
+
cp: cannot create directory '/var/solr/data/hyrax_test': Permission denied
|
121
|
+
```
|
122
|
+
|
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._
|
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
|
+
|
110
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. -->
|
111
134
|
## Docker Image for Hyrax-based Applications
|
112
135
|
|
@@ -157,4 +180,4 @@ helm dependency update chart/hyrax
|
|
157
180
|
helm install -n hyrax --set image.tag=(git rev-parse HEAD) dassie chart/hyrax
|
158
181
|
```
|
159
182
|
|
160
|
-
[dockerhub-samveralabs]: https://hub.docker.com/r/samveralabs
|
183
|
+
[dockerhub-samveralabs]: https://hub.docker.com/r/samveralabs
|