hyrax 4.0.0.rc3 → 5.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +116 -231
  3. data/.dassie/.env +3 -1
  4. data/.dassie/Gemfile +0 -2
  5. data/.dassie/config/analytics.yml +2 -2
  6. data/.dassie/config/environments/test.rb +1 -0
  7. data/.dassie/config/initializers/hyrax.rb +3 -1
  8. data/.dassie/config/initializers/redis_config.rb +0 -1
  9. data/.dassie/config/initializers/riiif.rb +13 -3
  10. data/.dassie/db/schema.rb +2 -2
  11. data/.dockerignore +6 -0
  12. data/.github/ISSUE_TEMPLATE.md +14 -9
  13. data/.github/PULL_REQUEST_TEMPLATE.md +25 -6
  14. data/.github/release.yml +5 -2
  15. data/.koppie/.env +3 -0
  16. data/.koppie/Gemfile +0 -2
  17. data/.koppie/README.md +11 -11
  18. data/.koppie/app/forms/collection_resource_form.rb +1 -0
  19. data/.koppie/app/indexers/collection_resource_indexer.rb +1 -0
  20. data/.koppie/app/models/collection_resource.rb +1 -0
  21. data/.koppie/config/analytics.yml +1 -0
  22. data/.koppie/config/environments/test.rb +1 -0
  23. data/.koppie/config/initializers/hyrax.rb +8 -2
  24. data/.koppie/config/initializers/redis_config.rb +0 -1
  25. data/.koppie/config/initializers/riiif.rb +13 -4
  26. data/.koppie/config/metadata/collection_resource.yaml +1 -128
  27. data/.koppie/yarn.lock +23 -23
  28. data/.regen +1 -1
  29. data/CONTAINERS.md +15 -15
  30. data/Dockerfile +6 -11
  31. data/app/actors/hyrax/actors/base_actor.rb +4 -3
  32. data/app/actors/hyrax/actors/embargo_actor.rb +5 -2
  33. data/app/actors/hyrax/actors/lease_actor.rb +5 -2
  34. data/app/assets/javascripts/hyrax/file_manager/sorting.es6 +3 -2
  35. data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +1 -1
  36. data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +74 -0
  37. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +14 -5
  38. data/app/controllers/hyrax/admin/workflows_controller.rb +48 -3
  39. data/app/controllers/hyrax/batch_edits_controller.rb +33 -4
  40. data/app/controllers/hyrax/downloads_controller.rb +8 -1
  41. data/app/controllers/hyrax/file_sets_controller.rb +1 -0
  42. data/app/forms/hyrax/forms/file_set_edit_form.rb +1 -1
  43. data/app/forms/hyrax/forms/permission_template_form.rb +2 -0
  44. data/app/forms/hyrax/forms/resource_batch_edit_form.rb +90 -0
  45. data/app/forms/hyrax/forms/work_embargo_form.rb +1 -0
  46. data/app/forms/hyrax/forms/work_form.rb +1 -1
  47. data/app/forms/hyrax/forms/work_lease_form.rb +1 -0
  48. data/app/helpers/hyrax/dashboard_helper_behavior.rb +17 -9
  49. data/app/helpers/hyrax/membership_helper.rb +13 -1
  50. data/app/helpers/hyrax/work_form_helper.rb +0 -107
  51. data/app/indexers/hyrax/file_set_indexer.rb +6 -0
  52. data/app/indexers/hyrax/pcdm_collection_indexer.rb +8 -0
  53. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +41 -5
  54. data/app/indexers/hyrax/valkyrie_work_indexer.rb +8 -2
  55. data/app/jobs/valkyrie_create_derivatives_job.rb +8 -7
  56. data/app/jobs/valkyrie_ingest_job.rb +0 -1
  57. data/app/models/admin_set.rb +1 -31
  58. data/app/models/concerns/hyrax/file_set/derivatives.rb +3 -2
  59. data/app/models/concerns/hyrax/solr_document_behavior.rb +1 -1
  60. data/app/models/hyrax/collection_type.rb +5 -14
  61. data/app/models/hyrax/file_metadata.rb +6 -7
  62. data/app/models/hyrax/file_set.rb +8 -0
  63. data/app/models/hyrax/resource.rb +30 -2
  64. data/app/presenters/hyrax/file_set_presenter.rb +6 -0
  65. data/app/presenters/hyrax/iiif_manifest_presenter.rb +3 -7
  66. data/app/presenters/hyrax/presenter_renderer.rb +0 -7
  67. data/app/presenters/hyrax/work_show_presenter.rb +6 -11
  68. data/app/search_builders/hyrax/file_set_search_builder.rb +1 -1
  69. data/app/search_builders/hyrax/valkyrie_abstract_type_relation.rb +37 -0
  70. data/app/search_builders/hyrax/valkyrie_work_relation.rb +9 -0
  71. data/app/services/hyrax/analytics/google.rb +23 -15
  72. data/app/services/hyrax/analytics/matomo.rb +4 -3
  73. data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +11 -9
  74. data/app/services/hyrax/custom_queries/find_by_date_range.rb +55 -0
  75. data/app/services/hyrax/custom_queries/find_count_by.rb +62 -0
  76. data/app/services/hyrax/custom_queries/find_file_metadata.rb +1 -1
  77. data/app/services/hyrax/custom_queries/find_models_by_access.rb +59 -0
  78. data/app/services/hyrax/derivative_bucketed_storage.rb +25 -0
  79. data/app/services/hyrax/derivative_path.rb +14 -4
  80. data/app/services/hyrax/embargo_manager.rb +76 -10
  81. data/app/services/hyrax/file_set_derivatives_service.rb +3 -2
  82. data/app/services/hyrax/lease_manager.rb +88 -8
  83. data/app/services/hyrax/listeners/file_metadata_listener.rb +2 -2
  84. data/app/services/hyrax/listeners/workflow_listener.rb +8 -11
  85. data/app/services/hyrax/persist_directly_contained_output_file_service.rb +24 -2
  86. data/app/services/hyrax/solr_query_service.rb +7 -6
  87. data/app/services/hyrax/statistics/depositors/summary.rb +1 -1
  88. data/app/services/hyrax/statistics/over_time.rb +1 -1
  89. data/app/services/hyrax/statistics/users/over_time.rb +3 -1
  90. data/app/services/hyrax/statistics/valkyrie_query_service.rb +49 -0
  91. data/app/services/hyrax/statistics/works/count.rb +1 -1
  92. data/app/services/hyrax/thumbnail_path_service.rb +5 -0
  93. data/app/services/hyrax/valkyrie_persist_derivatives.rb +16 -11
  94. data/app/services/hyrax/valkyrie_upload.rb +5 -3
  95. data/app/services/hyrax/versioning_service.rb +1 -0
  96. data/app/services/hyrax/visibility_intention.rb +1 -4
  97. data/app/services/hyrax/visibility_propagator.rb +1 -1
  98. data/app/services/hyrax/workflow/actionable_objects.rb +28 -3
  99. data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +1 -1
  100. data/app/services/hyrax/workflow/grant_read_to_depositor.rb +1 -1
  101. data/app/services/hyrax/workflow/permission_query.rb +23 -2
  102. data/app/views/hyrax/admin/workflows/_tabs.html.erb +9 -0
  103. data/app/views/hyrax/admin/workflows/index.html.erb +53 -76
  104. data/app/views/hyrax/base/_file_manager_members.html.erb +2 -2
  105. data/app/views/hyrax/base/_form.html.erb +0 -10
  106. data/app/views/hyrax/base/_form_files.html.erb +7 -2
  107. data/app/views/hyrax/base/_form_permission_embargo.html.erb +1 -1
  108. data/app/views/hyrax/base/_form_permission_lease.html.erb +1 -1
  109. data/app/views/hyrax/base/_form_visibility_component.html.erb +2 -2
  110. data/app/views/hyrax/base/_items.html.erb +1 -1
  111. data/app/views/hyrax/base/file_manager.html.erb +1 -1
  112. data/app/views/hyrax/base/show.json.jbuilder +2 -2
  113. data/app/views/hyrax/file_sets/_versioning.html.erb +1 -1
  114. data/app/views/hyrax/file_sets/show.html.erb +5 -3
  115. data/app/views/hyrax/homepage/_explore_collections.html.erb +1 -1
  116. data/chart/hyrax/Chart.yaml +18 -14
  117. data/chart/hyrax/README.md +34 -21
  118. data/chart/hyrax/templates/_helpers.tpl +26 -1
  119. data/chart/hyrax/templates/configmap-env.yaml +12 -2
  120. data/chart/hyrax/templates/secrets.yaml +1 -1
  121. data/chart/hyrax/values.yaml +36 -14
  122. data/config/initializers/listeners.rb +4 -10
  123. data/config/initializers/storage_adapter_initializer.rb +1 -1
  124. data/config/locales/hyrax.de.yml +11 -3
  125. data/config/locales/hyrax.en.yml +13 -2
  126. data/config/locales/hyrax.es.yml +4 -1
  127. data/config/locales/hyrax.fr.yml +4 -1
  128. data/config/locales/hyrax.it.yml +5 -2
  129. data/config/locales/hyrax.pt-BR.yml +9 -2
  130. data/config/locales/hyrax.zh.yml +4 -1
  131. data/config/metadata/file_set_metadata.yaml +1 -1
  132. data/docker-compose-koppie.yml +17 -4
  133. data/docker-compose.yml +19 -6
  134. data/documentation/developing-your-hyrax-based-app.md +6 -14
  135. data/documentation/legacyREADME.md +7 -5
  136. data/hyrax.gemspec +2 -2
  137. data/karma.conf.js +8 -9
  138. data/lib/generators/hyrax/templates/config/analytics.yml +1 -0
  139. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +1 -1
  140. data/lib/generators/hyrax/templates/config/initializers/redis_config.rb +0 -1
  141. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +15 -5
  142. data/lib/hyrax/active_fedora_dummy_model.rb +6 -1
  143. data/lib/hyrax/configuration.rb +6 -0
  144. data/lib/hyrax/engine.rb +2 -0
  145. data/lib/hyrax/publisher.rb +19 -3
  146. data/lib/hyrax/specs/capybara.rb +9 -4
  147. data/lib/hyrax/transactions/container.rb +5 -0
  148. data/lib/hyrax/transactions/steps/add_file_sets.rb +6 -0
  149. data/lib/hyrax/transactions/steps/apply_permission_template.rb +40 -0
  150. data/lib/hyrax/transactions/steps/save.rb +21 -0
  151. data/lib/hyrax/transactions/work_create.rb +1 -0
  152. data/lib/hyrax/version.rb +1 -1
  153. data/lib/hyrax.rb +1 -0
  154. data/lib/wings/active_fedora_converter/default_work.rb +7 -2
  155. data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
  156. data/lib/wings/active_fedora_converter.rb +47 -11
  157. data/lib/wings/model_transformer.rb +23 -4
  158. data/lib/wings/setup.rb +21 -1
  159. data/lib/wings/valkyrie/persister.rb +4 -2
  160. data/package.json +3 -1
  161. data/template.rb +1 -1
  162. metadata +15 -10
  163. data/app/forms/hyrax/forms/file_manager_form.rb +0 -35
  164. data/app/services/hyrax/collections/migration_service.rb +0 -113
  165. data/app/views/hyrax/base/_form_collections_error.html.erb +0 -1
  166. data/app/views/hyrax/base/_form_in_works_error.html.erb +0 -3
  167. data/app/views/hyrax/base/_form_ordered_members_error.html.erb +0 -3
  168. data/app/views/hyrax/base/_form_visibility_error.html.erb +0 -19
@@ -1,16 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Hyrax.publisher.subscribe(Hyrax::Listeners::AclIndexListener.new)
4
3
  Hyrax.publisher.subscribe(Hyrax::Listeners::ActiveFedoraAclIndexListener.new) unless Hyrax.config.disable_wings
5
- Hyrax.publisher.subscribe(Hyrax::Listeners::BatchNotificationListener.new)
6
- Hyrax.publisher.subscribe(Hyrax::Listeners::FileMetadataListener.new)
7
- Hyrax.publisher.subscribe(Hyrax::Listeners::FileSetLifecycleListener.new)
8
- Hyrax.publisher.subscribe(Hyrax::Listeners::FileSetLifecycleNotificationListener.new)
9
- Hyrax.publisher.subscribe(Hyrax::Listeners::MemberCleanupListener.new)
10
- Hyrax.publisher.subscribe(Hyrax::Listeners::MetadataIndexListener.new)
11
- Hyrax.publisher.subscribe(Hyrax::Listeners::ObjectLifecycleListener.new)
12
- Hyrax.publisher.subscribe(Hyrax::Listeners::TrophyCleanupListener.new)
13
- Hyrax.publisher.subscribe(Hyrax::Listeners::WorkflowListener.new)
4
+
5
+ Hyrax.publisher.default_listeners.each do |listener|
6
+ Hyrax.publisher.subscribe(listener)
7
+ end
14
8
 
15
9
  # Publish events from old style Hyrax::Callbacks to trigger the listeners
16
10
  # When callbacks are removed and replaced with direct event publication, drop these blocks
@@ -7,6 +7,6 @@ Valkyrie::StorageAdapter.register(
7
7
  )
8
8
 
9
9
  Valkyrie::StorageAdapter.register(
10
- Valkyrie::Storage::Disk.new(base_path: Hyrax.config.derivatives_path),
10
+ Valkyrie::Storage::Disk.new(base_path: Hyrax.config.derivatives_path, path_generator: Hyrax::DerivativeBucketedStorage),
11
11
  :derivatives_disk
12
12
  )
@@ -542,8 +542,16 @@ de:
542
542
  add_folder: Ordner hinzufügen
543
543
  cancel_upload: Upload abbrechen
544
544
  dropzone: Dateien hier hinziehen.
545
- local_upload_browse_everything_html: "<p>Sie können eine oder mehre Dateien von Ihrem lokalen System oder einem Cloudanbieter hinzufügen, welche mit dieser Arbeit\nverknüpft werden sollen.</p>\n<p>Bitte beachten Sie, dass der Cloud-Anbieter möglicherweise nicht in der Lage ist Ihrer Anfrage nachzukommen, wenn Sie eine große Anzahl von Dateien\ninnerhalb einer kurzen Zeitspanne hochladen. \nWenn Sie\nirgendwelche Fehler beim Hochladen aus der Cloud erhalten, teilen Sie uns dies \nbitte über %{contact_href} mit.</p>\n"
546
- local_upload_html: "<p> Sie können eine oder mehrere Dateien hinzufügen, die dieser Arbeit zugeordnet werden sollen. </p>"
545
+ local_upload_browse_everything_html: |
546
+ <p>Sie können eine oder mehre Dateien von Ihrem lokalen System oder einem Cloudanbieter hinzufügen, welche mit
547
+ dieser Arbeit verknüpft werden sollen.</p>
548
+ <p>Bitte beachten Sie, dass der Cloud-Anbieter möglicherweise nicht in der Lage ist Ihrer Anfrage
549
+ nachzukommen, wenn Sie eine große Anzahl von Dateien innerhalb einer kurzen Zeitspanne hochladen.
550
+ Wenn Sie irgendwelche Fehler beim Hochladen aus der Cloud erhalten, teilen Sie uns dies bitte über %{contact_href} mit.</p>
551
+ <p>Das Hochladen ist auf %{upload_file_limit} Dateien mit jeweils %{upload_size_limit} MB begrenzt.</p>
552
+ local_upload_html: |
553
+ <p>Sie können eine oder mehrere Dateien hinzufügen, die dieser Arbeit zugeordnet werden sollen.</p>
554
+ <p>Das Hochladen ist auf %{upload_file_limit} Dateien mit jeweils %{upload_size_limit} MB begrenzt.</p>
547
555
  form_member_of_collections:
548
556
  actions:
549
557
  remove: Aus der Sammlung entfernen
@@ -1301,7 +1309,7 @@ de:
1301
1309
  restore: Vorherige Version wiederherstellen
1302
1310
  restore_from: Wiederherstellen von
1303
1311
  save: Überarbeitete Version speichern
1304
- save_your_note: Sie müssen auf & quot; Revision speichern & quot; klicken. um eine frühere Version dieser Datei wiederherzustellen
1312
+ save_your_note: Sie müssen auf "Revision speichern" klicken. um eine frühere Version dieser Datei wiederherzustellen
1305
1313
  upload: Neue Version hochladen
1306
1314
  help:
1307
1315
  header: Benutzer-Support
@@ -459,6 +459,14 @@ en:
459
459
  workflows:
460
460
  index:
461
461
  header: Review Submissions
462
+ heading:
463
+ work: Work
464
+ depositor: Depositor
465
+ submission_date: Submission Date
466
+ status: status
467
+ works_published: "<strong>%{total_count} works</strong> published"
468
+ works_under_review: "<strong>%{total_count} works</strong> under review"
469
+ works_listing: Works listing
462
470
  tabs:
463
471
  published: Published
464
472
  under_review: Under Review
@@ -535,7 +543,10 @@ en:
535
543
  files within a short period of time, the provider may not be able to
536
544
  accommodate your request. If you experience errors uploading from the
537
545
  cloud, let us know via the %{contact_href}.</p>
538
- local_upload_html: "<p>You can add one or more files to associate with this work.</p>"
546
+ <p>Uploads are limited to %{upload_file_limit} files, %{upload_size_limit} MB each.</p>
547
+ local_upload_html: |
548
+ <p>You can add one or more files to associate with this work.</p>
549
+ <p>Uploads are limited to %{upload_file_limit} files, %{upload_size_limit} MB each.</p>
539
550
  form_member_of_collections:
540
551
  actions:
541
552
  remove: Remove from collection
@@ -1290,7 +1301,7 @@ en:
1290
1301
  restore: Restore Previous Version
1291
1302
  restore_from: Restore From
1292
1303
  save: Save Revision
1293
- save_your_note: You must click &quot;Save Revision&quot; to revert a previous version of this file
1304
+ save_your_note: You must click "Save Revision" to revert a previous version of this file
1294
1305
  upload: Upload New Version
1295
1306
  help:
1296
1307
  header: User Support
@@ -548,7 +548,10 @@ es:
548
548
  de tiempo, el proveedor en la nube podría no ser capaz de resolver la
549
549
  petición. Si se experimentan errores durante la carga, por favor,
550
550
  comuníquese con nosotros a través de %{contact_href}.</p>
551
- local_upload_html: "<p>Puede agregar uno o más archivos para asociar con esta obra.</p>"
551
+ <p>Las cargas están limitadas a %{upload_file_limit} archivos, %{upload_size_limit} MB cada uno.</p>
552
+ local_upload_html: |
553
+ <p>Puede agregar uno o más archivos para asociar con esta obra.</p>
554
+ <p>Las cargas están limitadas a %{upload_file_limit} archivos, %{upload_size_limit} MB cada uno.</p>
552
555
  form_member_of_collections:
553
556
  actions:
554
557
  remove: Eliminar de la colección
@@ -549,7 +549,10 @@ fr:
549
549
  répondre à votre demande. Si vous rencontrez des erreurs de
550
550
  téléchargement depuis le nuage, faites-nous savoir via le
551
551
  %{contact_href}.</p>
552
- local_upload_html: "<p>Vous pouvez ajouter un ou plusieurs fichiers à associer à ce travail.</p>"
552
+ <p>Les téléchargements sont limités à %{upload_file_limit} fichiers de %{upload_size_limit} Mo chacun.</p>
553
+ local_upload_html: |
554
+ <p>Vous pouvez ajouter un ou plusieurs fichiers à associer à ce travail.</p>
555
+ <p>Les téléchargements sont limités à %{upload_file_limit} fichiers de %{upload_size_limit} Mo chacun.</p>
553
556
  form_member_of_collections:
554
557
  actions:
555
558
  remove: Supprimer de la collection
@@ -548,7 +548,10 @@ it:
548
548
  periodo di tempo, il provider di cloud potrebbe non essere in grado di
549
549
  accogliere la tua richiesta. Se si verificano errori di caricamento
550
550
  dalla nube, fateci sapere tramite %{contact_href}.</p>
551
- local_upload_html: "<p possibile aggiungere uno o più file da associare a questo lavoro.</p>"
551
+ <p>I caricamenti sono limitati a %{upload_file_limit} file, %{upload_size_limit} MB ciascuno.</p>
552
+ local_upload_html: |
553
+ <p>È possibile aggiungere uno o più file da associare a questo lavoro.</p>
554
+ <p>I caricamenti sono limitati a %{upload_file_limit} file, %{upload_size_limit} MB ciascuno.</p>
552
555
  form_member_of_collections:
553
556
  actions:
554
557
  remove: Rimuovi dalla raccolta
@@ -1306,7 +1309,7 @@ it:
1306
1309
  restore: Ripristina la versione precedente
1307
1310
  restore_from: Ripristina da
1308
1311
  save: Salva revisione
1309
- save_your_note: Devi fare clic su & quot; Salva revisione & quot; per ripristinare una versione precedente di questo file
1312
+ save_your_note: Devi fare clic su "Salva revisione" per ripristinare una versione precedente di questo file
1310
1313
  upload: Carica nuova versione
1311
1314
  help:
1312
1315
  header: Supporto utente
@@ -542,8 +542,15 @@ pt-BR:
542
542
  add_folder: Adicionar pasta
543
543
  cancel_upload: Cancelar upload
544
544
  dropzone: Largue os arquivos aqui.
545
- local_upload_browse_everything_html: "<p>Você pode associar um ou mais arquivos a esta obra. Associe arquivos de seu sistema local ou um provedor de nuvem.</p> <p>Note que se você carregar uma grande quantidade de arquivos dentro de um curto período de tempo, o fornecedor de nuvem pode não ser capaz de acomodar a sua solicitação. Se você tiver algum erro ao carregar da nuvem, avise-nos através do %{contact_href}.<p>"
546
- local_upload_html: "<p>Você pode acrescentar um ou mais arquivos para associar a esta obra.</p>"
545
+ local_upload_browse_everything_html: |
546
+ <p>Você pode associar um ou mais arquivos a esta obra. Associe arquivos de seu sistema local ou um provedor de nuvem.</p>
547
+ <p>Note que se você carregar uma grande quantidade de arquivos dentro de um curto período de tempo,
548
+ o fornecedor de nuvem pode não ser capaz de acomodar a sua solicitação. Se você tiver algum erro ao carregar
549
+ da nuvem, avise-nos através do %{contact_href}.<p>
550
+ <p>Os uploads são limitados a %{upload_file_limit} arquivos, %{upload_size_limit} MB cada.</p>
551
+ local_upload_html: |
552
+ <p>Você pode acrescentar um ou mais arquivos para associar a esta obra.</p>
553
+ <p>Os uploads são limitados a %{upload_file_limit} arquivos, %{upload_size_limit} MB cada.</p>
547
554
  form_member_of_collections:
548
555
  actions:
549
556
  remove: Remover da coleção
@@ -546,7 +546,10 @@ zh:
546
546
  <p>您可以添加一个或多个文件与该工作相关联。</p>
547
547
  <p>请注意如果您在短时间内上传了大量文件, 云提供商可能不能满足您的请求。
548
548
  如果您上传中遇到问题,请用%{contact_href}报告。</p>
549
- local_upload_html: "<p>您可以添加一个或多个文件与该工作相关联。</p>"
549
+ <p>上传限制为 %{upload_file_limit} 个文件,每个文件 %{upload_size_limit} MB。</p>
550
+ local_upload_html: |
551
+ <p>您可以添加一个或多个文件与该工作相关联。</p>
552
+ <p>上传限制为 %{upload_file_limit} 个文件,每个文件 %{upload_size_limit} MB。</p>
550
553
  form_member_of_collections:
551
554
  actions:
552
555
  remove: 从收藏中删除
@@ -16,7 +16,7 @@ attributes:
16
16
  type: string
17
17
  multiple: true
18
18
  form:
19
- required: true
19
+ required: false
20
20
  primary: true
21
21
 
22
22
  # Other attributes:
@@ -9,7 +9,7 @@ services:
9
9
  - EXTRA_APK_PACKAGES=git less chromium
10
10
  - APP_PATH=.koppie
11
11
  image: ghcr.io/samvera/koppie
12
- command: sh -l -c 'bundle && yarn && bundle exec puma -v -b tcp://0.0.0.0:3000'
12
+ command: sh -c 'bundle && yarn && bundle exec puma -v -b tcp://0.0.0.0:3000'
13
13
  stdin_open: true
14
14
  tty: true
15
15
  user: root
@@ -46,7 +46,7 @@ services:
46
46
  args:
47
47
  - APP_PATH=.koppie
48
48
  image: ghcr.io/samvera/koppie-worker
49
- command: sh -l -c 'bundle && bundle exec sidekiq'
49
+ command: sh -c 'bundle && bundle exec sidekiq'
50
50
  user: root
51
51
  env_file:
52
52
  - .koppie/.env
@@ -78,7 +78,7 @@ services:
78
78
  user: root
79
79
  env_file:
80
80
  - .koppie/.env
81
- command: sh -l -c 'bundle && db-migrate-seed.sh'
81
+ command: sh -c 'bundle && db-migrate-seed.sh'
82
82
  depends_on:
83
83
  - postgres
84
84
  volumes:
@@ -90,7 +90,9 @@ services:
90
90
  - koppie
91
91
 
92
92
  chrome:
93
- image: selenium/standalone-chrome:3.141
93
+ image: seleniarm/standalone-chromium:114.0
94
+ environment:
95
+ - START_XVFB=false
94
96
  logging:
95
97
  driver: none
96
98
  volumes:
@@ -113,6 +115,13 @@ services:
113
115
  networks:
114
116
  - koppie
115
117
 
118
+ fits:
119
+ image: harvardlts/fitsservlet_container:1.5.0
120
+ ports:
121
+ - 8080
122
+ networks:
123
+ - koppie
124
+
116
125
  memcached:
117
126
  image: bitnami/memcached
118
127
  ports:
@@ -140,6 +149,10 @@ services:
140
149
  volumes:
141
150
  - solr_home:/var/solr/data:cached
142
151
  - .koppie/solr/conf:/opt/solr/server/configsets/hyraxconf
152
+ ulimits:
153
+ nofile:
154
+ soft: 65536
155
+ hard: 524288
143
156
  networks:
144
157
  - koppie
145
158
 
data/docker-compose.yml CHANGED
@@ -8,7 +8,7 @@ services:
8
8
  args:
9
9
  - EXTRA_APK_PACKAGES=git less chromium
10
10
  image: ghcr.io/samvera/dassie
11
- command: sh -l -c 'bundle && bundle exec puma -v -b tcp://0.0.0.0:3000'
11
+ command: sh -c 'bundle && bundle exec puma -v -b tcp://0.0.0.0:3000'
12
12
  stdin_open: true
13
13
  tty: true
14
14
  user: root
@@ -42,7 +42,7 @@ services:
42
42
  context: .
43
43
  target: hyrax-engine-dev-worker
44
44
  image: ghcr.io/samvera/dassie-worker
45
- command: sh -l -c 'bundle && bundle exec sidekiq'
45
+ command: sh -c 'bundle && bundle exec sidekiq'
46
46
  user: root
47
47
  env_file:
48
48
  - .dassie/.env
@@ -73,7 +73,7 @@ services:
73
73
  user: root
74
74
  env_file:
75
75
  - .dassie/.env
76
- command: sh -l -c 'bundle && db-migrate-seed.sh'
76
+ command: sh -c 'bundle && db-migrate-seed.sh'
77
77
  depends_on:
78
78
  - postgres
79
79
  volumes:
@@ -85,15 +85,17 @@ services:
85
85
  - hyrax
86
86
 
87
87
  chrome:
88
- image: selenium/standalone-chrome:3.141
88
+ image: seleniarm/standalone-chromium:114.0
89
+ environment:
90
+ - START_XVFB=false
89
91
  logging:
90
92
  driver: none
91
93
  volumes:
92
94
  - /dev/shm:/dev/shm
93
95
  shm_size: 2G
94
96
  ports:
95
- - "4444:4444"
96
- - "5959:5900"
97
+ - "4445:4444"
98
+ - "5960:5900"
97
99
  networks:
98
100
  - hyrax
99
101
 
@@ -120,6 +122,13 @@ services:
120
122
  networks:
121
123
  - hyrax
122
124
 
125
+ fits:
126
+ image: harvardlts/fitsservlet_container:1.5.0
127
+ ports:
128
+ - 8080
129
+ networks:
130
+ - hyrax
131
+
123
132
  memcached:
124
133
  image: bitnami/memcached
125
134
  ports:
@@ -145,6 +154,10 @@ services:
145
154
  volumes:
146
155
  - solr_home:/var/solr/data:cached
147
156
  - .dassie/solr/conf:/opt/solr/server/configsets/hyraxconf
157
+ ulimits:
158
+ nofile:
159
+ soft: 65536
160
+ hard: 524288
148
161
  networks:
149
162
  - hyrax
150
163
 
@@ -30,7 +30,7 @@ A Hyrax-based application includes lots of dependencies. We provide a [Docker im
30
30
  You can also try [Running Hyrax-based application in local VM](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide#running-hyrax-based-application-in-local-vm) which uses Ubuntu.
31
31
 
32
32
  This document contains instructions specific to setting up an app with __Hyrax
33
- v4.0.0.rc1__. If you are looking for instructions on installing a different
33
+ v5.0.0.rc1__. If you are looking for instructions on installing a different
34
34
  version, be sure to select the appropriate branch or tag from the drop-down
35
35
  menu above.
36
36
 
@@ -95,7 +95,7 @@ Note here that the following commands assume you're setting up Hyrax in a develo
95
95
 
96
96
  First, you'll need a working Ruby installation. You can install this via your operating system's package manager -- you are likely to get farther with OSX, Linux, or UNIX than Windows but your mileage may vary -- but we recommend using a Ruby version manager such as [RVM](https://rvm.io/) or [rbenv](https://github.com/sstephenson/rbenv).
97
97
 
98
- Hyrax supports Ruby 2.5, 2.6, and 2.7. When starting a new project, we recommend using the latest Ruby 2.7 version.
98
+ Hyrax supports Ruby 3.2. When starting a new project, we recommend using the latest Ruby 3.2 version.
99
99
 
100
100
  ## Redis
101
101
 
@@ -105,11 +105,11 @@ Starting up Redis will depend on your operating system, and may in fact already
105
105
 
106
106
  ## Rails
107
107
 
108
- Hyrax requires Rails 5. We recommend the latest Rails 5.2 release.
108
+ Hyrax requires Rails 6. We recommend the latest Rails 6.1 release.
109
109
 
110
110
  ```
111
111
  # If you don't already have Rails at your disposal...
112
- gem install rails -v 5.2.6
112
+ gem install rails -v 6.1.7.6
113
113
  ```
114
114
 
115
115
  ### JavaScript runtime
@@ -125,7 +125,7 @@ NOTE: The steps need to be done in order to create a new Hyrax based app.
125
125
  Generate a new Rails application using the template.
126
126
 
127
127
  ```
128
- rails _6.1.7.3_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v4.0.0.rc1/template.rb
128
+ rails _6.1.7.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v5.0.0.rc1/template.rb
129
129
  ```
130
130
 
131
131
  Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
@@ -223,7 +223,7 @@ You may wish to [customize your work type](https://github.com/samvera/hyrax/wiki
223
223
 
224
224
  ### Enable notifications
225
225
 
226
- Hyrax 2 uses a WebSocket-based user notifications system, which requires Redis. To enable user notifications, make sure that you have configured ActionCable to use Redis as the adapter in your application's `config/cable.yml`. E.g., for the `development` Rails environment:
226
+ Hyrax 2+ uses a WebSocket-based user notifications system, which requires Redis. To enable user notifications, make sure that you have configured ActionCable to use Redis as the adapter in your application's `config/cable.yml`. E.g., for the `development` Rails environment:
227
227
 
228
228
  ```yaml
229
229
  development:
@@ -231,14 +231,6 @@ development:
231
231
  url: redis://localhost:6379
232
232
  ```
233
233
 
234
- Using Rails up to version 5.1.4, ActionCable will not work with the 4.x series of the `redis` gem, so you will also need to pin your application to a 3.x release by adding this to your `Gemfile`:
235
-
236
- ```ruby
237
- gem 'redis', '~> 3.0'
238
- ```
239
-
240
- And then run `bundle update redis`.
241
-
242
234
  Note that the Hyrax Management Guide contains additional information on [how to configure ActionCable in production environments](https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide#notifications).
243
235
 
244
236
  ## Managing a Hyrax-based app
@@ -1,6 +1,8 @@
1
1
  # Legacy README
2
2
 
3
- This is a deprecated document that might have some useful information.
3
+ ## Deprecated Document
4
+
5
+ This is a deprecated document that might have some useful information. **It is no longer being updated.**
4
6
 
5
7
  # Table of Contents
6
8
 
@@ -50,7 +52,7 @@ The Samvera community is here to help. Please see our [support guide](../.github
50
52
  # Getting started
51
53
 
52
54
  This document contains instructions specific to setting up an app with __Hyrax
53
- v4.0.0.rc3__. If you are looking for instructions on installing a different
55
+ v4.0.0__. If you are looking for instructions on installing a different
54
56
  version, be sure to select the appropriate branch or tag from the drop-down
55
57
  menu above.
56
58
 
@@ -139,11 +141,11 @@ Starting up Redis will depend on your operating system, and may in fact already
139
141
 
140
142
  ## Rails
141
143
 
142
- Hyrax requires Rails 5. We recommend the latest Rails 5.2 release.
144
+ Hyrax requires Rails 6. We recommend the latest Rails 6.1 release.
143
145
 
144
146
  ```
145
147
  # If you don't already have Rails at your disposal...
146
- gem install rails -v 5.2.6
148
+ gem install rails -v 6.1.7.3
147
149
  ```
148
150
 
149
151
  ### JavaScript runtime
@@ -159,7 +161,7 @@ NOTE: The steps need to be done in order to create a new Hyrax based app.
159
161
  Generate a new Rails application using the template.
160
162
 
161
163
  ```
162
- rails _6.1.7.3_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v4.0.0.rc3/template.rb
164
+ rails _6.1.7.3_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v4.0.0/template.rb
163
165
  ```
164
166
 
165
167
  Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
data/hyrax.gemspec CHANGED
@@ -17,7 +17,7 @@ SUMMARY
17
17
 
18
18
  spec.homepage = "http://github.com/samvera/hyrax"
19
19
 
20
- spec.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR).select { |f| File.dirname(f) !~ %r{\A"?spec\/?} }
20
+ spec.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR).select { |f| File.dirname(f) !~ %r{\A"?spec\/?} && f != 'bin/rails' }
21
21
  spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
22
22
  spec.name = "hyrax"
23
23
  spec.require_paths = ["lib"]
@@ -25,7 +25,7 @@ SUMMARY
25
25
  spec.license = 'Apache-2.0'
26
26
  spec.metadata = { "rubygems_mfa_required" => "true" }
27
27
 
28
- spec.required_ruby_version = '>= 2.7'
28
+ spec.required_ruby_version = '>= 3.2'
29
29
 
30
30
  # NOTE: rails does not follow sem-ver conventions, it's
31
31
  # minor version releases can include breaking changes; see
data/karma.conf.js CHANGED
@@ -66,6 +66,7 @@ module.exports = function(config) {
66
66
  },
67
67
 
68
68
  // web server port
69
+ hostname: process.env.KARMA_HOSTNAME || 'localhost', // This is the host the remote browser connects to
69
70
  port: 9876,
70
71
 
71
72
  // enable / disable colors in the output (reporters and logs)
@@ -80,16 +81,14 @@ module.exports = function(config) {
80
81
 
81
82
  // start these browsers
82
83
  // available browser launchers: https://www.npmjs.com/search?q=keywords:karma-launcher
83
- browsers: [process.env.KARMA_BROWSER],
84
+ browsers: [process.env.KARMA_BROWSER || 'ChromiumHeadless'],
84
85
 
85
86
  customLaunchers: {
86
- ChromiumHeadlessCustom: {
87
- base: 'ChromiumHeadless',
88
- flags: ['--no-sandbox']
89
- },
90
- ChromeHeadlessCustom: {
91
- base: 'ChromeHeadless',
92
- flags: ['--no-sandbox']
87
+ 'remote-chromium': {
88
+ base: 'SeleniumGrid',
89
+ gridUrl: process.env.HUB_URL || 'http://localhost:4444/wd/hub',
90
+ browserName: 'chrome',
91
+ arguments: [ '--headless=new']
93
92
  }
94
93
  },
95
94
 
@@ -99,6 +98,6 @@ module.exports = function(config) {
99
98
 
100
99
  // Concurrency level
101
100
  // how many browser instances should be started simultaneously
102
- concurrency: 4
101
+ concurrency: 1
103
102
  })
104
103
  }
@@ -6,6 +6,7 @@ analytics:
6
6
  analytics_id: <%= ENV['GOOGLE_ANALYTICS_ID'] %>
7
7
  app_name: <%= ENV['GOOGLE_OAUTH_APP_NAME'] %>
8
8
  app_version: <%= ENV['GOOGLE_OAUTH_APP_VERSION'] %>
9
+ privkey_value: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE'] %>
9
10
  privkey_path: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_PATH'] %>
10
11
  privkey_secret: <%= ENV['GOOGLE_OAUTH_PRIVATE_KEY_SECRET'] %>
11
12
  client_email: <%= ENV['GOOGLE_OAUTH_CLIENT_EMAIL'] %>
@@ -95,7 +95,7 @@ Hyrax.config do |config|
95
95
 
96
96
  # Location autocomplete uses geonames to search for named regions
97
97
  # Username for connecting to geonames
98
- # config.geonames_username = ''
98
+ config.geonames_username = ENV['GEONAMES_USERNAME'] || ''
99
99
 
100
100
  # Should the acceptance of the licence agreement be active (checkbox), or
101
101
  # implied when the save button is pressed? Set to true for active
@@ -2,7 +2,6 @@
2
2
  require 'redis'
3
3
  require 'connection_pool'
4
4
  config = YAML.safe_load(ERB.new(IO.read(Rails.root.join('config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
5
- config[:thread_safe] = true
6
5
 
7
6
  size = ENV.fetch("HYRAX_REDIS_POOL_SIZE", 5)
8
7
  timeout = ENV.fetch("HYRAX_REDIS_TIMEOUT", 5)
@@ -14,11 +14,21 @@ ActiveSupport::Reloader.to_prepare do
14
14
  { height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
15
15
  end
16
16
 
17
- Riiif::Image.file_resolver.id_to_uri = lambda do |id|
18
- Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
19
- Hyrax.logger.info "Riiif resolved #{id} to #{url}"
20
- end
21
- end
17
+ Riiif::Image.file_resolver.id_to_uri = if Hyrax.config.use_valkyrie?
18
+ # Use Valkyrie adapter to make sure file is available locally. Riiif will just open it then
19
+ # id comes in with the format "FILE_SET_ID/files/FILE_ID"
20
+ lambda do |id|
21
+ file_metadata = Hyrax.query_service.find_by(id: id.split('/').last)
22
+ file = Hyrax.storage_adapter.find_by(id: file_metadata.file_identifier)
23
+ file.disk_path.to_s
24
+ end
25
+ else
26
+ lambda do |id|
27
+ Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
28
+ Rails.logger.info "Riiif resolved #{id} to #{url}"
29
+ end
30
+ end
31
+ end
22
32
 
23
33
  Riiif::Image.authorization_service = Hyrax::IiifAuthorizationService
24
34
 
@@ -69,7 +69,12 @@ module Hyrax
69
69
  ##
70
70
  # @api public
71
71
  def to_global_id
72
- URI::GID.build app: GlobalID.app, model_name: model_name.name, model_id: @id
72
+ # this covers the use case of creating a non Valkyrie::Resource, while using Valkyrie
73
+ if model_name.name.constantize <= Valkyrie::Resource
74
+ URI::GID.build app: GlobalID.app, model_name: Hyrax::ValkyrieGlobalIdProxy.to_s, model_id: @id
75
+ else
76
+ URI::GID.build app: GlobalID.app, model_name: model_name.name, model_id: @id
77
+ end
73
78
  end
74
79
  end
75
80
  end
@@ -518,6 +518,12 @@ module Hyrax
518
518
  @characterization_proxy ||= :original_file
519
519
  end
520
520
 
521
+ ##
522
+ # Options to pass to the characterization service
523
+ # @!attribute [rw] characterization_options
524
+ # @return [Hash] of options like {ch12n_tool: :fits_servlet}
525
+ attr_accessor :characterization_options
526
+
521
527
  # Attributes for the lock manager which ensures a single process/thread is mutating a ore:Aggregation at once.
522
528
  # @!attribute [w] lock_retry_count
523
529
  # How many times to retry to acquire the lock before raising UnableToAcquireLockError
data/lib/hyrax/engine.rb CHANGED
@@ -20,6 +20,8 @@ module Hyrax
20
20
  require 'qa'
21
21
  require 'tinymce-rails'
22
22
  require 'valkyrie'
23
+ require 'cancancan'
24
+ require 'blacklight'
23
25
 
24
26
  require 'hydra/derivatives'
25
27
  require 'hyrax/active_fedora_dummy_model'
@@ -137,6 +137,10 @@ module Hyrax
137
137
  # a system user.
138
138
  register_event('file.metadata.updated')
139
139
 
140
+ # @since 5.0.0
141
+ # @macro a_registered_event
142
+ register_event('file.uploaded')
143
+
140
144
  # @since 3.0.0
141
145
  # @macro a_registered_event
142
146
  register_event('file.set.audited')
@@ -191,8 +195,20 @@ module Hyrax
191
195
  # `#member_ids`)
192
196
  register_event('object.metadata.updated')
193
197
 
194
- # @since 3.2.0
195
- # @macro a_registered_event
196
- register_event('object.file.uploaded')
198
+ ##
199
+ # @return Array[Object] the listeners Hyrax subscribes by default.
200
+ def default_listeners
201
+ @default_listeners ||=
202
+ [Hyrax::Listeners::AclIndexListener.new,
203
+ Hyrax::Listeners::BatchNotificationListener.new,
204
+ Hyrax::Listeners::FileMetadataListener.new,
205
+ Hyrax::Listeners::FileSetLifecycleListener.new,
206
+ Hyrax::Listeners::FileSetLifecycleNotificationListener.new,
207
+ Hyrax::Listeners::MemberCleanupListener.new,
208
+ Hyrax::Listeners::MetadataIndexListener.new,
209
+ Hyrax::Listeners::ObjectLifecycleListener.new,
210
+ Hyrax::Listeners::TrophyCleanupListener.new,
211
+ Hyrax::Listeners::WorkflowListener.new].freeze
212
+ end
197
213
  end
198
214
  end
@@ -20,10 +20,15 @@ require 'webdrivers' unless ENV['IN_DOCKER'].present? || ENV['HUB_URL'].present?
20
20
  Capybara.save_path = ENV['CI'] ? "/tmp/test-results" : Rails.root.join('tmp', 'capybara')
21
21
 
22
22
  if ENV['IN_DOCKER'].present? || ENV['HUB_URL'].present?
23
- args = %w[disable-gpu no-sandbox whitelisted-ips window-size=1400,1400]
24
- args.push('headless') if ActiveModel::Type::Boolean.new.cast(ENV['CHROME_HEADLESS_MODE'])
25
-
26
- options = Selenium::WebDriver::Options.chrome("goog:chromeOptions" => { args: args })
23
+ options = Selenium::WebDriver::Chrome::Options.new.tap do |opts|
24
+ opts.add_argument("--headless") if ENV["CHROME_HEADLESS_MODE"]
25
+ opts.add_argument("--disable-gpu") if Gem.win_platform?
26
+ # Workaround https://bugs.chromium.org/p/chromedriver/issues/detail?id=2650&q=load&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary
27
+ opts.add_argument("--disable-site-isolation-trials")
28
+ opts.add_argument("--window-size=1440,1440")
29
+ opts.add_argument("--enable-features=NetworkService,NetworkServiceInProcess")
30
+ opts.add_argument("--disable-features=VizDisplayCompositor")
31
+ end
27
32
 
28
33
  Capybara.register_driver :selenium_chrome_headless_sandboxless do |app|
29
34
  driver = Capybara::Selenium::Driver.new(app,