hyrax 5.0.0.rc2 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +14 -0
  3. data/.dassie/app/listeners/hyrax_listener.rb +81 -0
  4. data/.dassie/config/environments/test.rb +0 -5
  5. data/.dassie/config/initializers/hyrax.rb +5 -0
  6. data/.dassie/config/initializers/publisher.rb +3 -0
  7. data/.dassie/config/initializers/riiif.rb +77 -0
  8. data/.gitignore +4 -0
  9. data/.koppie/.env +2 -2
  10. data/.koppie/app/forms/collection_resource_form.rb +1 -0
  11. data/.koppie/app/indexers/collection_resource_indexer.rb +1 -0
  12. data/.koppie/app/listeners/hyrax_listener.rb +81 -0
  13. data/.koppie/app/models/collection.rb +1 -1
  14. data/.koppie/app/models/collection_resource.rb +1 -0
  15. data/.koppie/config/analytics.yml +5 -5
  16. data/.koppie/config/initializers/publisher.rb +3 -0
  17. data/.koppie/config/initializers/riiif.rb +78 -0
  18. data/.koppie/config/metadata/collection_resource.yaml +8 -166
  19. data/.koppie/config/metadata/sample_metadata.yaml +4 -0
  20. data/CONTAINERS.md +39 -2
  21. data/Dockerfile +14 -11
  22. data/Gemfile +8 -7
  23. data/README.md +2 -0
  24. data/app/actors/hyrax/actors/base_actor.rb +6 -3
  25. data/app/actors/hyrax/actors/file_actor.rb +1 -1
  26. data/app/actors/hyrax/actors/lease_actor.rb +3 -6
  27. data/app/assets/javascripts/hyrax/save_work/uploaded_files.es6 +10 -2
  28. data/app/assets/stylesheets/hyrax/sidebar.scss +6 -1
  29. data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +1 -1
  30. data/app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb +12 -19
  31. data/app/controllers/concerns/hyrax/stream_file_downloads_controller_behavior.rb +54 -0
  32. data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +38 -9
  33. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +19 -14
  34. data/app/controllers/hyrax/admin/admin_sets_controller.rb +2 -2
  35. data/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +5 -5
  36. data/app/controllers/hyrax/dashboard/collections_controller.rb +2 -5
  37. data/app/controllers/hyrax/downloads_controller.rb +1 -0
  38. data/app/controllers/hyrax/file_sets_controller.rb +3 -2
  39. data/app/controllers/hyrax/my/collections_controller.rb +1 -1
  40. data/app/forms/concerns/hyrax/basic_metadata_form_fields_behavior.rb +1 -0
  41. data/app/forms/concerns/hyrax/contained_in_works_behavior.rb +24 -0
  42. data/app/forms/concerns/hyrax/deposit_agreement_behavior.rb +12 -0
  43. data/app/forms/concerns/hyrax/leaseability_behavior.rb +49 -0
  44. data/app/forms/concerns/hyrax/permission_behavior.rb +20 -0
  45. data/app/forms/hyrax/forms/administrative_set_form.rb +1 -5
  46. data/app/forms/hyrax/forms/collection_form.rb +19 -0
  47. data/app/forms/hyrax/forms/file_set_form.rb +5 -0
  48. data/app/forms/hyrax/forms/pcdm_collection_form.rb +1 -5
  49. data/app/forms/hyrax/forms/pcdm_object_form.rb +13 -22
  50. data/app/forms/hyrax/forms/resource_batch_edit_form.rb +7 -2
  51. data/app/forms/hyrax/forms/resource_form.rb +30 -100
  52. data/app/forms/hyrax/forms.rb +52 -0
  53. data/app/helpers/hyrax/hyrax_helper_behavior.rb +2 -0
  54. data/app/indexers/{hyrax → concerns/hyrax}/location_indexer.rb +1 -5
  55. data/app/indexers/{hyrax → concerns/hyrax}/permission_indexer.rb +2 -2
  56. data/app/indexers/{hyrax → concerns/hyrax}/visibility_indexer.rb +1 -1
  57. data/app/indexers/hyrax/administrative_set_indexer.rb +5 -17
  58. data/app/indexers/hyrax/indexers/administrative_set_indexer.rb +25 -0
  59. data/app/indexers/hyrax/indexers/file_set_indexer.rb +144 -0
  60. data/app/indexers/hyrax/indexers/pcdm_collection_indexer.rb +27 -0
  61. data/app/indexers/hyrax/indexers/pcdm_object_indexer.rb +72 -0
  62. data/app/indexers/hyrax/indexers/resource_indexer.rb +86 -0
  63. data/app/indexers/hyrax/indexers.rb +54 -0
  64. data/app/indexers/hyrax/pcdm_collection_indexer.rb +5 -18
  65. data/app/indexers/hyrax/valkyrie_collection_indexer.rb +6 -4
  66. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +5 -136
  67. data/app/indexers/hyrax/valkyrie_indexer.rb +8 -112
  68. data/app/indexers/hyrax/valkyrie_work_indexer.rb +5 -64
  69. data/app/indexers/hyrax/work_indexer.rb +1 -0
  70. data/app/jobs/create_work_job.rb +1 -0
  71. data/app/models/admin_set.rb +20 -1
  72. data/app/models/collection.rb +5 -0
  73. data/app/models/concerns/hyrax/ability/admin_set_ability.rb +13 -28
  74. data/app/models/concerns/hyrax/ability/collection_ability.rb +26 -28
  75. data/app/models/concerns/hyrax/ability/resource_ability.rb +19 -0
  76. data/app/models/concerns/hyrax/ability.rb +11 -9
  77. data/app/models/concerns/hyrax/collection_behavior.rb +8 -0
  78. data/app/models/concerns/hyrax/solr_document_behavior.rb +15 -5
  79. data/app/models/concerns/hyrax/work_behavior.rb +4 -0
  80. data/app/models/featured_work.rb +12 -4
  81. data/app/models/file_set.rb +5 -0
  82. data/app/models/hyrax/administrative_set.rb +1 -1
  83. data/app/models/hyrax/change_set.rb +2 -2
  84. data/app/models/hyrax/file_metadata.rb +34 -7
  85. data/app/models/hyrax/file_set.rb +2 -2
  86. data/app/models/hyrax/group.rb +9 -38
  87. data/app/models/hyrax/group_behavior.rb +58 -0
  88. data/app/models/hyrax/model_registry.rb +111 -0
  89. data/app/models/hyrax/pcdm_collection.rb +1 -7
  90. data/app/models/hyrax/resource.rb +66 -8
  91. data/app/models/hyrax/statistic.rb +1 -1
  92. data/app/models/hyrax/work.rb +1 -7
  93. data/app/presenters/hyrax/collapsable_section_presenter.rb +7 -3
  94. data/app/presenters/hyrax/file_set_presenter.rb +8 -6
  95. data/app/presenters/hyrax/lease_presenter.rb +4 -0
  96. data/app/presenters/hyrax/menu_presenter.rb +14 -2
  97. data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +1 -1
  98. data/app/presenters/hyrax/version_list_presenter.rb +6 -4
  99. data/app/search_builders/hyrax/admin_set_search_builder.rb +1 -1
  100. data/app/search_builders/hyrax/catalog_search_builder.rb +8 -2
  101. data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +5 -3
  102. data/app/search_builders/hyrax/exposed_models_relation.rb +1 -1
  103. data/app/search_builders/hyrax/file_set_search_builder.rb +1 -1
  104. data/app/search_builders/hyrax/filter_by_type.rb +3 -2
  105. data/app/search_builders/hyrax/member_with_files_search_builder.rb +1 -1
  106. data/app/search_builders/hyrax/my/collections_search_builder.rb +2 -2
  107. data/app/search_builders/hyrax/my/find_works_search_builder.rb +8 -3
  108. data/app/services/hyrax/access_control_list.rb +21 -4
  109. data/app/services/hyrax/action/create_valkyrie_work.rb +80 -0
  110. data/app/services/hyrax/admin_set_create_service.rb +7 -3
  111. data/app/services/hyrax/admin_set_service.rb +2 -2
  112. data/app/services/hyrax/collections/collection_member_search_service.rb +2 -0
  113. data/app/services/hyrax/collections/permissions_service.rb +27 -9
  114. data/app/services/hyrax/custom_queries/find_collections_by_type.rb +1 -1
  115. data/app/services/hyrax/custom_queries/find_file_metadata.rb +1 -1
  116. data/app/services/hyrax/custom_queries/navigators/find_files.rb +1 -1
  117. data/app/services/hyrax/custom_queries/navigators/parent_work_navigator.rb +1 -1
  118. data/app/services/hyrax/edit_permissions_service.rb +1 -1
  119. data/app/services/hyrax/embargo_manager.rb +1 -1
  120. data/app/services/hyrax/file_set_file_service.rb +21 -10
  121. data/app/services/hyrax/form_factory.rb +1 -1
  122. data/app/services/hyrax/lease_manager.rb +39 -16
  123. data/app/services/hyrax/lease_service.rb +12 -6
  124. data/app/services/hyrax/listeners/acl_index_listener.rb +1 -1
  125. data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +1 -1
  126. data/app/services/hyrax/listeners/member_cleanup_listener.rb +15 -1
  127. data/app/services/hyrax/listeners/object_lifecycle_listener.rb +5 -1
  128. data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +2 -1
  129. data/app/services/hyrax/listeners/workflow_listener.rb +13 -0
  130. data/app/services/hyrax/listeners.rb +2 -1
  131. data/app/services/hyrax/location_service.rb +3 -0
  132. data/app/services/hyrax/multiple_membership_checker.rb +1 -1
  133. data/app/services/hyrax/simple_schema_loader.rb +1 -1
  134. data/app/services/hyrax/solr_service.rb +19 -5
  135. data/app/services/hyrax/statistics/collections/over_time.rb +1 -1
  136. data/app/services/hyrax/statistics/query_service.rb +6 -0
  137. data/app/services/hyrax/valkyrie_persist_derivatives.rb +11 -4
  138. data/app/services/hyrax/valkyrie_upload.rb +1 -1
  139. data/app/services/hyrax/work_uploads_handler.rb +5 -4
  140. data/app/views/_user_util_links.html.erb +1 -1
  141. data/app/views/collections/edit_fields/_based_near.html.erb +11 -7
  142. data/app/views/hyrax/admin/admin_sets/_form_participants.html.erb +67 -67
  143. data/app/views/hyrax/admin/admin_sets/edit.html.erb +1 -1
  144. data/app/views/hyrax/admin/collection_types/_form_participants.html.erb +3 -1
  145. data/app/views/hyrax/base/_attribute_rows.html.erb +1 -0
  146. data/app/views/hyrax/base/_base_form_files_prepend.html.erb +4 -0
  147. data/app/views/hyrax/base/_form_files.html.erb +65 -64
  148. data/app/views/hyrax/base/show.html.erb +2 -3
  149. data/app/views/hyrax/collections/show.html.erb +7 -9
  150. data/app/views/hyrax/dashboard/_sidebar.html.erb +4 -3
  151. data/app/views/hyrax/dashboard/collections/_form_share_table.html.erb +2 -2
  152. data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
  153. data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
  154. data/app/views/hyrax/my/facet.html.erb +1 -1
  155. data/app/views/layouts/_head_tag_content.html.erb +1 -0
  156. data/app/views/shared/_footer.html.erb +1 -1
  157. data/chart/hyrax/Chart.yaml +3 -3
  158. data/chart/hyrax/templates/_tmplvalues.tpl +38 -0
  159. data/chart/hyrax/templates/deployment-worker.yaml +6 -2
  160. data/chart/hyrax/templates/deployment.yaml +9 -3
  161. data/chart/hyrax/values.yaml +9 -1
  162. data/config/initializers/listeners.rb +1 -1
  163. data/config/locales/hyrax.de.yml +5 -0
  164. data/config/locales/hyrax.en.yml +10 -0
  165. data/config/locales/hyrax.es.yml +5 -0
  166. data/config/locales/hyrax.fr.yml +5 -0
  167. data/config/locales/hyrax.it.yml +5 -0
  168. data/config/locales/hyrax.pt-BR.yml +5 -0
  169. data/config/locales/hyrax.zh.yml +5 -0
  170. data/config/metadata/basic_metadata.yaml +1 -0
  171. data/config/metadata/core_metadata.yaml +2 -0
  172. data/config/metadata/file_set_metadata.yaml +2 -0
  173. data/docker-compose-koppie.yml +3 -3
  174. data/docker-compose-sirenia.yml +3 -3
  175. data/documentation/developing-your-hyrax-based-app.md +89 -67
  176. data/hyrax.gemspec +9 -2
  177. data/lib/generators/hyrax/collection_resource/templates/collection_indexer.rb.erb +1 -1
  178. data/lib/generators/hyrax/config_generator.rb +12 -0
  179. data/lib/generators/hyrax/install_generator.rb +37 -7
  180. data/lib/generators/hyrax/listeners_generator.rb +18 -0
  181. data/lib/generators/hyrax/models_generator.rb +1 -10
  182. data/lib/generators/hyrax/riiif_generator.rb +6 -4
  183. data/lib/generators/hyrax/templates/.env +9 -0
  184. data/lib/generators/hyrax/templates/.lando.yml +50 -0
  185. data/lib/generators/hyrax/templates/app/listeners/hyrax_listener.rb +81 -0
  186. data/lib/generators/hyrax/templates/app/models/file_set.rb +1 -2
  187. data/lib/generators/hyrax/templates/config/initializers/1_valkyrie.rb +102 -0
  188. data/lib/generators/hyrax/templates/config/initializers/file_services.rb +6 -0
  189. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +41 -5
  190. data/lib/generators/hyrax/templates/config/initializers/publisher.rb +3 -0
  191. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +77 -0
  192. data/lib/generators/hyrax/templates/config/locales/hyrax.de.yml +1 -1
  193. data/lib/generators/hyrax/templates/config/locales/hyrax.en.yml +1 -1
  194. data/lib/generators/hyrax/templates/config/locales/hyrax.es.yml +1 -1
  195. data/lib/generators/hyrax/templates/config/locales/hyrax.fr.yml +1 -1
  196. data/lib/generators/hyrax/templates/config/locales/hyrax.it.yml +1 -1
  197. data/lib/generators/hyrax/templates/config/locales/hyrax.pt-BR.yml +1 -1
  198. data/lib/generators/hyrax/templates/config/locales/hyrax.zh.yml +1 -1
  199. data/lib/generators/hyrax/templates/config/redis.yml +3 -6
  200. data/lib/generators/hyrax/templates/config/valkyrie_index.yml +4 -9
  201. data/lib/generators/hyrax/work_resource/templates/indexer.rb.erb +1 -1
  202. data/lib/hyrax/configuration.rb +95 -7
  203. data/lib/hyrax/indexer.rb +1 -1
  204. data/lib/hyrax/publisher.rb +5 -2
  205. data/lib/hyrax/resource_sync/change_list_writer.rb +1 -1
  206. data/lib/hyrax/resource_sync/resource_list_writer.rb +1 -1
  207. data/lib/hyrax/specs/capybara.rb +1 -0
  208. data/lib/hyrax/specs/shared_specs/hydra_works.rb +78 -20
  209. data/lib/hyrax/specs/shared_specs/indexers.rb +1 -1
  210. data/lib/hyrax/transactions/admin_set_destroy.rb +2 -1
  211. data/lib/hyrax/transactions/container.rb +5 -0
  212. data/lib/hyrax/transactions/steps/add_to_parent.rb +1 -0
  213. data/lib/hyrax/transactions/steps/check_for_default_admin_set.rb +32 -0
  214. data/lib/hyrax/transactions/steps/check_for_empty_admin_set.rb +1 -1
  215. data/lib/hyrax/transactions/steps/save.rb +2 -1
  216. data/lib/hyrax/transactions/steps/set_user_as_creator.rb +1 -1
  217. data/lib/hyrax/transactions/steps/update_work_members.rb +2 -0
  218. data/lib/hyrax/version.rb +1 -1
  219. data/lib/hyrax.rb +1 -0
  220. data/lib/tasks/embargo_lease.rake +1 -0
  221. data/lib/valkyrie/indexing/solr/indexing_adapter.rb +21 -7
  222. data/lib/wings/active_fedora_converter/default_work.rb +4 -5
  223. data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
  224. data/lib/wings/model_registry.rb +8 -0
  225. data/lib/wings/model_transformer.rb +19 -2
  226. data/lib/wings/orm_converter.rb +4 -0
  227. data/lib/wings/services/custom_queries/find_ids_by_model.rb +2 -2
  228. data/lib/wings/valkyrie/query_service.rb +5 -2
  229. data/lib/wings.rb +3 -0
  230. data/spec/factories/access_control.rb +12 -0
  231. data/spec/factories/admin_sets.rb +32 -0
  232. data/spec/factories/admin_sets_lw.rb +222 -0
  233. data/spec/factories/administrative_sets.rb +79 -0
  234. data/spec/factories/api_items.rb +92 -0
  235. data/spec/factories/collection_branding_infos.rb +12 -0
  236. data/spec/factories/collection_type_participants.rb +9 -0
  237. data/spec/factories/collection_types.rb +139 -0
  238. data/spec/factories/collections.rb +282 -0
  239. data/spec/factories/collections_factory.rb +107 -0
  240. data/spec/factories/content_blocks.rb +5 -0
  241. data/spec/factories/counter_metrics.rb +12 -0
  242. data/spec/factories/featured_works.rb +5 -0
  243. data/spec/factories/file_sets.rb +45 -0
  244. data/spec/factories/generic_works.rb +200 -0
  245. data/spec/factories/hyrax_collection.rb +92 -0
  246. data/spec/factories/hyrax_default_admin_set.rb +7 -0
  247. data/spec/factories/hyrax_embargo.rb +18 -0
  248. data/spec/factories/hyrax_file_metadata.rb +92 -0
  249. data/spec/factories/hyrax_file_set.rb +129 -0
  250. data/spec/factories/hyrax_lease.rb +18 -0
  251. data/spec/factories/hyrax_resource.rb +15 -0
  252. data/spec/factories/hyrax_work.rb +221 -0
  253. data/spec/factories/object_id.rb +7 -0
  254. data/spec/factories/operations.rb +22 -0
  255. data/spec/factories/permission.rb +7 -0
  256. data/spec/factories/permission_template_accesses.rb +17 -0
  257. data/spec/factories/permission_templates.rb +111 -0
  258. data/spec/factories/proxy_deposit_requests.rb +7 -0
  259. data/spec/factories/single_use_links.rb +14 -0
  260. data/spec/factories/sipity_entities.rb +17 -0
  261. data/spec/factories/uploaded_files.rb +11 -0
  262. data/spec/factories/users.rb +52 -0
  263. data/spec/factories/workflow_actions.rb +7 -0
  264. data/spec/factories/workflow_states.rb +7 -0
  265. data/spec/factories/workflows.rb +7 -0
  266. data/spec/support/book_resource.rb +36 -0
  267. data/spec/support/can_can_overrides.rb +43 -0
  268. data/spec/support/clean_solr.rb +7 -0
  269. data/spec/support/controller_level_helpers.rb +27 -0
  270. data/spec/support/factory_helpers.rb +94 -0
  271. data/spec/support/fakes/fake_actor.rb +22 -0
  272. data/spec/support/fakes/fake_authority.rb +14 -0
  273. data/spec/support/fakes/fake_search_builder_scope.rb +44 -0
  274. data/spec/support/fakes/indexing_adapter.rb +17 -0
  275. data/spec/support/fakes/test_hydra_group_service.rb +55 -0
  276. data/spec/support/features/batch_edit_actions.rb +37 -0
  277. data/spec/support/features/session_helpers.rb +15 -0
  278. data/spec/support/features/workflow.rb +10 -0
  279. data/spec/support/features.rb +11 -0
  280. data/spec/support/form_with_validations.rb +15 -0
  281. data/spec/support/input_support.rb +12 -0
  282. data/spec/support/logging_formatter.rb +67 -0
  283. data/spec/support/matchers/api_responses.rb +27 -0
  284. data/spec/support/matchers/collection_type_property_matchers.rb +30 -0
  285. data/spec/support/matchers/embargo.rb +9 -0
  286. data/spec/support/matchers/lease.rb +9 -0
  287. data/spec/support/matchers/match_valkyrie_ids_with_af_ids.rb +12 -0
  288. data/spec/support/matchers/pcdm_matchers.rb +34 -0
  289. data/spec/support/matchers/permission.rb +31 -0
  290. data/spec/support/matchers/response_matchers.rb +8 -0
  291. data/spec/support/optional_example.rb +17 -0
  292. data/spec/support/rake.rb +42 -0
  293. data/spec/support/selectors.rb +112 -0
  294. data/spec/support/shared_examples_for_collection_presenter.rb +44 -0
  295. data/spec/support/simple_work.rb +28 -0
  296. data/spec/support/spec_statistic.rb +24 -0
  297. data/spec/support/speedup.rb +7 -0
  298. data/spec/support/statistic_helper.rb +10 -0
  299. data/spec/support/valkyrie_indexing.rb +2 -0
  300. data/spec/support/wings_models.rb +9 -0
  301. data/template.rb +1 -3
  302. metadata +113 -30
  303. data/app/indexers/hyrax/resource_indexer.rb +0 -15
  304. data/app/models/concerns/hyrax/riiif_file.rb +0 -30
  305. data/app/services/hyrax/characterization/model_wrapper.rb +0 -0
  306. data/app/services/hyrax/custom_queries/find_by_collection_type.rb +0 -0
  307. data/app/services/hyrax/query_service.rb +0 -0
  308. data/app/services/hyrax/riiif_file_resolver.rb +0 -50
  309. data/lib/hyrax/specs/disable_animations_in_test_environment.rb +0 -53
  310. /data/app/indexers/{hyrax → concerns/hyrax}/thumbnail_indexer.rb +0 -0
@@ -25,12 +25,14 @@
25
25
 
26
26
  A Hyrax-based application includes lots of dependencies. We provide a [Docker image for getting started with your Hyrax-based application](/CONTAINERS.md#docker-image-for-hyrax-based-applications).
27
27
 
28
- <aside><p><em><strong>Note:</em></strong> The Docker image describes the canonical dependencies. In a way, it is executable documentation. The following documentation is our best effort to transcribe that executable documentation into a narrative. In other words, this documentation may drift away from the Docker details.</p></aside>
28
+ **NOTE:** The Docker image describes the canonical dependencies. In a way, it is executable documentation. The following documentation is our best effort to transcribe that executable documentation into a narrative. In other words, this documentation may drift away from the Docker details.
29
29
 
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
+ During development, running only the dependent services in a container environment may be beneficial. This avoids potential headaches concerning file permissions and eases the use of debugging tools. The application generation instructions below use [Lando](https://lando.dev) to achieve this setup.
33
+
32
34
  This document contains instructions specific to setting up an app with __Hyrax
33
- v5.0.0.rc2__. If you are looking for instructions on installing a different
35
+ v5.0.0__. If you are looking for instructions on installing a different
34
36
  version, be sure to select the appropriate branch or tag from the drop-down
35
37
  menu above.
36
38
 
@@ -44,18 +46,23 @@ Prerequisites are required for both creating a Hyrax\-based app and contributing
44
46
  Hyrax requires the following software to work:
45
47
 
46
48
  1. [Solr](http://lucene.apache.org/solr/) version >= 5.x (tested up to 8.11.1, which includes the log4j library update)
47
- 1. [Fedora Commons](http://www.fedora-commons.org/) digital repository version >= 4.5.1 (tested up to 4.7.5)
48
- 1. A SQL RDBMS (MySQL, PostgreSQL), though **note** that SQLite will be used by default if you're looking to get up and running quickly
49
+ 1. [Fedora Commons](http://www.fedora-commons.org/) digital repository version >= 4.7.6 (if not using the Valkyrie Postgres adapter)
50
+ 1. A SQL RDBMS ([PostgreSQL](https://www.postgresql.org) recommended)
49
51
  1. [Redis](http://redis.io/), a key-value store
50
52
  1. [ImageMagick](http://www.imagemagick.org/) with JPEG-2000 support
51
53
  1. [FITS](#characterization) (tested up to version 1.5.0 -- avoid version 1.1.0)
52
54
  1. [LibreOffice](#derivatives)
53
55
  1. [ffmpeg](#transcoding)
54
56
 
55
- **NOTE: The [Hyrax Development Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide) has instructions for installing Solr and Fedora in a development environment.**
57
+ **NOTE:** The [Hyrax Development Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide) has instructions for installing Solr and Fedora in a development environment.
56
58
 
57
59
  ### Characterization
60
+ #### Servlet FITS
61
+ FITS can be run as a web service. This has the benefit of improved performance by avoiding the slow startup time inherent to the local option below.
62
+
63
+ A container image is available for this purpose: [ghcr.io/samvera/fitsservlet](https://ghcr.io/samvera/fitsservlet)
58
64
 
65
+ #### Local FITS
59
66
  FITS can be installed on OSX using Homebrew by running the command: `brew install fits`
60
67
 
61
68
  **OR**
@@ -89,7 +96,7 @@ Once ffmpeg has been installed, enable transcoding by setting `config.enable_ffm
89
96
 
90
97
  ## Environments
91
98
 
92
- Note here that the following commands assume you're setting up Hyrax in a development environment (using the Rails built-in development environment). If you're setting up a production or production-like environment, you may wish to tell Rails that by prepending `RAILS_ENV=production` to the commands that follow, e.g., `rails`, `rake`, `bundle`, and so on.
99
+ **NOTE:** The following commands assume you're setting up Hyrax in a development environment (using the Rails built-in development environment). If you're setting up a production or production-like environment, you may wish to tell Rails that by prepending `RAILS_ENV=production` to the commands that follow, e.g., `rails`, `rake`, `bundle`, and so on.
93
100
 
94
101
  ## Ruby
95
102
 
@@ -109,23 +116,39 @@ Hyrax requires Rails 6. We recommend the latest Rails 6.1 release.
109
116
 
110
117
  ```
111
118
  # If you don't already have Rails at your disposal...
112
- gem install rails -v 6.1.7.6
119
+ gem install rails -v 6.1.7.7
113
120
  ```
114
121
 
115
122
  ### JavaScript runtime
116
123
 
117
124
  Rails requires that you have a JavaScript runtime installed (e.g. nodejs or rubyracer). Either install nodejs or uncomment the `rubyracer` line in your Gemfile and run `bundle install` before running Hyrax's install generator.
118
125
 
119
- NOTE: [nodejs](https://nodejs.org/en/) is preinstalled on most Mac computers and doesn't require a gem. To test if nodejs is already installed, execute `node -v` in the terminal and the version of nodejs will be displayed if it is installed.
126
+ **NOTE:** [nodejs](https://nodejs.org/en/) is preinstalled on most Mac computers and doesn't require a gem. To test if nodejs is already installed, execute `node -v` in the terminal and the version of nodejs will be displayed if it is installed.
120
127
 
121
128
  ## Creating a Hyrax-based app
122
129
 
123
- NOTE: The steps need to be done in order to create a new Hyrax based app.
130
+ Create a new Hyrax-based application by following these steps in order.
131
+
132
+ **NOTE:** Starting with Hyrax v5, the generated application will use [Valkyrie](https://github.com/samvera/valkyrie) for repository persistence.
133
+ Use of [ActiveFedora](https://github.com/samvera/active_fedora) (instead of Valkyrie) is deprecated, but it should still be possible to reconfigure the generated application to use it.
134
+
135
+ ### Development Prerequisites
136
+
137
+ These instructions assume the use of [Lando](https://lando.dev) and [Docker](https://docker.io) to manage the backend services needed by your Hyrax application. Follow the Lando installation instructions before proceeding, or have alternate providers for the services listed in the generated `.lando.yml`:
138
+ - Solr
139
+ - Postgres
140
+ - Redis
141
+ - FITS servlet
142
+ - Fedora (if not using Postgres)
143
+
144
+ ### Generate the application
124
145
 
125
146
  Generate a new Rails application using the template.
126
147
 
127
- ```
128
- rails _6.1.7.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v5.0.0.rc2/template.rb
148
+ **NOTE:** `HYRAX_SKIP_WINGS` is needed here to avoid loading the Wings compatibility layer during the application generation process.
149
+
150
+ ```shell
151
+ HYRAX_SKIP_WINGS=true rails _6.1.7.7_ new my_app --database=postgresql -m https://raw.githubusercontent.com/samvera/hyrax/hyrax-v5.0.0/template.rb
129
152
  ```
130
153
 
131
154
  Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
@@ -133,23 +156,65 @@ Generating a new Rails application using Hyrax's template above takes cares of a
133
156
  * Adding Hyrax (and any of its dependencies) to your application `Gemfile`, to declare that Hyrax is a dependency of your application
134
157
  * Running `bundle install`, to install Hyrax and its dependencies
135
158
  * Running Hyrax's install generator, to add a number of files that Hyrax requires within your Rails app, including e.g. database migrations
159
+
160
+ ### Start Services
161
+
162
+ Start the background services managed by Lando. The
163
+
164
+ ```shell
165
+ cd my_app
166
+ lando start
167
+ ```
168
+
169
+ ### Run Migrations/Seeds
170
+
171
+ This performs the following actions:
172
+
136
173
  * Loading all of Hyrax's database migrations into your application's database
137
- * Loading Hyrax's default workflows into your application's database
138
174
  * Create default collection types (e.g. Admin Set, User Collection)
175
+ * Loading Hyrax's default workflows into your application's database
139
176
 
140
- ### Start servers
177
+ ```shell
178
+ rails db:migrate
179
+ rails db:seed
180
+ ```
141
181
 
142
- To test-drive your new Hyrax application in development mode, spin up the servers that Hyrax needs (Solr, Fedora, and Rails):
182
+ **NOTE**: You will want to run these commands the first time this code is deployed to a new environment as well.
143
183
 
184
+ This creates the default administrative set -- into which all works will be deposited unless assigned to other administrative sets.
185
+ This command also makes sure that Hyrax's built-in workflows are loaded for your application and available for the default administrative set.
186
+
187
+ ### Generate a work type
188
+
189
+ Using Hyrax requires generating at least one type of repository object, or "work type." Hyrax allows you to generate the work types required in your application by using a Rails generator-based tool. You may generate one or more of these work types.
190
+
191
+ Pass a (CamelCased) model name to Hyrax's work generator to get started, e.g.:
192
+
193
+ ```
194
+ rails generate hyrax:work_resource MovingImage
144
195
  ```
145
- bin/rails hydra:server
196
+
197
+ If your applications requires your work type to be namespaced, namespaces can be included by adding a slash to the model name which creates a new class called `MovingImage` within the `My` namespace:
198
+
199
+ ```shell
200
+ rails generate hyrax:work_resource My/MovingImage
201
+ ```
202
+
203
+ You may wish to [customize your work type](https://github.com/samvera/hyrax/wiki/Customizing-your-work-types) now that it's been generated.
204
+
205
+ ### Start Hyrax web server
206
+
207
+ Test-drive your new Hyrax application in development mode:
208
+
209
+ ```shell
210
+ rails s
146
211
  ```
147
212
 
148
213
  And now you should be able to browse to [localhost:3000](http://localhost:3000/) and see the application.
149
214
 
150
- Notes:
215
+ **NOTE:**
151
216
  * This web server is purely for development purposes. You will want to use a more fully featured [web server](https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide#web-server) for production-like environments.
152
- * You have the option to start each of these services individually. More information on [solr_wrapper](https://github.com/cbeer/solr_wrapper) and [fcrepo_wrapper](https://github.com/cbeer/fcrepo_wrapper) will help you set this up. Start rails with `rails s`.
217
+ * For a fresh start, the data persisted in Lando can be wiped using `lando destroy`.
153
218
 
154
219
  ### Start background workers
155
220
 
@@ -163,14 +228,10 @@ Many of the services performed by Hyrax are resource intensive, and therefore ar
163
228
 
164
229
  Hyrax implements these jobs using the Rails [ActiveJob](http://edgeguides.rubyonrails.org/active_job_basics.html) framework, allowing you to choose the message queue system of your choice.
165
230
 
166
- For initial development, it is recommended that you change the default ActiveJob adapter from `:async` to `:inline`. This adapter will execute jobs immediately (in the foreground) as they are received. This can be accomplished by adding the following to your `config/environments/development.rb`
231
+ For initial development, it is recommended that you change the default ActiveJob adapter from `:async` to `:inline`. This adapter will execute jobs immediately (in the foreground) as they are received. This can be accomplished by modifying the `.env` file:
167
232
 
168
- ```
169
- class Application < Rails::Application
170
- # ...
171
- config.active_job.queue_adapter = :inline
172
- # ...
173
- end
233
+ ```dotenv
234
+ HYRAX_ACTIVE_JOB_QUEUE=inline
174
235
  ```
175
236
 
176
237
  For testing, it is recommended that you use the [built-in `:test` adapter](http://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/TestAdapter.html) which stores enqueued and performed jobs, running only those configured to run during test setup. To do this, add the following to `config/environments/test.rb`:
@@ -185,54 +246,15 @@ end
185
246
 
186
247
  **For production applications** you will want to use a more robust message queue system such as [Sidekiq](http://sidekiq.org/). The Hyrax Development Guide has a detailed walkthrough of [installing and configuring Sidekiq](https://github.com/samvera/hyrax/wiki/Using-Sidekiq-with-Hyrax).
187
248
 
188
- ### Create default administrative set
189
-
190
- **After** Fedora and Solr are running, create the default administrative set -- into which all works will be deposited unless assigned to other administrative sets -- by running the following command:
191
-
192
- ```
193
- rails hyrax:default_admin_set:create
194
- ```
195
-
196
- This command also makes sure that Hyrax's built-in workflows are loaded for your application and available for the default administrative set.
197
-
198
- **NOTE**: You will want to run this command the first time this code is deployed to a new environment as well.
199
-
200
- ### Generate a work type
201
-
202
- Using Hyrax requires generating at least one type of repository object, or "work type." Hyrax allows you to generate the work types required in your application by using a Rails generator-based tool. You may generate one or more of these work types.
203
-
204
- Pass a (CamelCased) model name to Hyrax's work generator to get started, e.g.:
205
-
206
- ```
207
- rails generate hyrax:work Work
208
- ```
209
-
210
- or
211
-
212
- ```
213
- rails generate hyrax:work MovingImage
214
- ```
215
-
216
- If your applications requires your work type to be namespaced, namespaces can be included by adding a slash to the model name which creates a new class called `MovingImage` within the `My` namespace:
217
-
218
- ```
219
- rails generate hyrax:work My/MovingImage
220
- ```
221
-
222
- You may wish to [customize your work type](https://github.com/samvera/hyrax/wiki/Customizing-your-work-types) now that it's been generated.
223
-
224
- ### Enable notifications
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:
249
+ ### Create an Admin User
227
250
 
251
+ To access all of Hyrax's features you must be signed in as a user in the `admin` role. The default role management system uses the `config/role_map.yml` file to assign users to roles. For example:
228
252
  ```yaml
229
253
  development:
230
- adapter: redis
231
- url: redis://localhost:6379
254
+ admin:
255
+ - dev@test.internal
232
256
  ```
233
257
 
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).
235
-
236
258
  ## Managing a Hyrax-based app
237
259
 
238
260
  The [Hyrax Management Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide) provides tips for how to manage, customize, and enhance your Hyrax application, including guidance specific to:
data/hyrax.gemspec CHANGED
@@ -17,7 +17,15 @@ 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\/?} && f != 'bin/rails' }
20
+ spec.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR).reject do |f|
21
+ f == 'bin/rails' ||
22
+ # We want for downstream implementations to be able to leverage the various Hyrax factories.
23
+ # As such we need them to be available in the .gem file. See `./lib/hyrax/spec/factories.rb`
24
+ # for more details.
25
+ (File.dirname(f) =~ %r{\A"?spec\/?} &&
26
+ File.dirname(f) !~ %r{\A"?spec\/(factories|assets|support)\/?}
27
+ )
28
+ end
21
29
  spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
22
30
  spec.name = "hyrax"
23
31
  spec.require_paths = ["lib"]
@@ -48,7 +56,6 @@ SUMMARY
48
56
  spec.add_dependency 'dry-container', '~> 0.11'
49
57
  spec.add_dependency 'dry-events', '~> 1.0', '>= 1.0.1'
50
58
  spec.add_dependency 'dry-monads', '~> 1.6'
51
- spec.add_dependency 'dry-struct', '~> 1.6'
52
59
  spec.add_dependency 'dry-validation', '~> 1.10'
53
60
  spec.add_dependency 'flipflop', '~> 2.3'
54
61
  # Pin more tightly because 0.x gems are potentially unstable
@@ -2,6 +2,6 @@
2
2
 
3
3
  # Generated via
4
4
  # `rails generate hyrax:collection_resource <%= class_name %>`
5
- class <%= class_name %>Indexer < Hyrax::PcdmCollectionIndexer
5
+ class <%= class_name %>Indexer < Hyrax::Indexers::PcdmCollectionIndexer
6
6
  include Hyrax::Indexer(:<%= file_name %>)
7
7
  end
@@ -38,11 +38,23 @@ class Hyrax::ConfigGenerator < Rails::Generators::Base
38
38
  copy_file 'config/initializers/redis_config.rb'
39
39
  end
40
40
 
41
+ def configure_valkyrie
42
+ copy_file 'config/initializers/1_valkyrie.rb'
43
+ end
44
+
41
45
  def configure_valkyrie_index
42
46
  copy_file 'config/valkyrie_index.yml'
43
47
  copy_file 'config/solr_wrapper_valkyrie_test.yml'
44
48
  end
45
49
 
50
+ def metadata_dir
51
+ empty_directory 'config/metadata'
52
+ end
53
+
54
+ def derivatives_file_services
55
+ copy_file 'config/initializers/file_services.rb'
56
+ end
57
+
46
58
  def create_initializer_config_file
47
59
  copy_file 'config/initializers/hyrax.rb'
48
60
  end
@@ -26,13 +26,14 @@ module Hyrax
26
26
  * Generates mailboxer
27
27
  10. Adds Hyrax's abilities into the Ability class
28
28
  11. Adds controller behavior to the application controller
29
- 12. Copies the catalog controller into the local app
30
- 13. Installs hyrax assets
31
- 14. Updates simple_form to use browser validations
32
- 15. Installs Blacklight gallery (and removes it's scss)
33
- 16. Install jquery-datatables
34
- 17. Initializes the noid-rails database-backed minter
35
- 18. Generates RIIIF image server implementation
29
+ 12. Adds listener template and publisher initializer
30
+ 13. Copies the catalog controller into the local app
31
+ 14. Installs hyrax assets
32
+ 15. Updates simple_form to use browser validations
33
+ 16. Installs Blacklight gallery (and removes it's scss)
34
+ 17. Install jquery-datatables
35
+ 18. Initializes the noid-rails database-backed minter
36
+ 19. Generates RIIIF image server implementation
36
37
  """
37
38
 
38
39
  def run_required_generators
@@ -109,6 +110,12 @@ module Hyrax
109
110
  end
110
111
  end
111
112
 
113
+ # add listener code to provide developers a hint that listening to events
114
+ # is a good development pattern
115
+ def inject_listeners
116
+ generate "hyrax:listeners"
117
+ end
118
+
112
119
  # Add behaviors to the application controller
113
120
  def inject_hyrax_application_controller_behavior
114
121
  file_path = "app/controllers/application_controller.rb"
@@ -134,6 +141,12 @@ module Hyrax
134
141
  generate 'qa:local:tables'
135
142
  end
136
143
 
144
+ def inject_required_seeds
145
+ insert_into_file 'db/seeds.rb' do
146
+ 'Hyrax::RequiredDataSeeder.new.generate_seed_data'
147
+ end
148
+ end
149
+
137
150
  def install_assets
138
151
  generate "hyrax:assets"
139
152
  end
@@ -175,9 +188,26 @@ module Hyrax
175
188
  generate 'hyrax:riiif' unless options[:'skip-riiif']
176
189
  end
177
190
 
191
+ def insert_env_queue_adapter
192
+ insert_into_file 'config/application.rb', after: /config\.load_defaults [0-9.]+$/ do
193
+ "\n config.active_job.queue_adapter = ENV.fetch('HYRAX_ACTIVE_JOB_QUEUE') { 'async' }.to_sym\n"
194
+ end
195
+ end
196
+
178
197
  def universalviewer_files
179
198
  rake('hyrax:universal_viewer:install')
180
199
  rake('yarn:install')
181
200
  end
201
+
202
+ def lando
203
+ copy_file '.lando.yml'
204
+ end
205
+
206
+ def dotenv
207
+ copy_file '.env'
208
+ gem_group :development, :test do
209
+ gem 'dotenv-rails', '~> 2.8'
210
+ end
211
+ end
182
212
  end
183
213
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ require 'rails/generators'
3
+
4
+ class Hyrax::ListenersGenerator < Rails::Generators::Base
5
+ desc """
6
+ This generator adds templates for Hyrax::Publisher listeners to your application
7
+ """
8
+
9
+ source_root File.expand_path('../templates', __FILE__)
10
+
11
+ def inject_listener
12
+ copy_file 'app/listeners/hyrax_listener.rb', 'app/listeners/hyrax_listener.rb'
13
+ end
14
+
15
+ def inject_listener_initialier
16
+ copy_file 'config/initializers/publisher.rb', 'config/initializers/publisher.rb'
17
+ end
18
+ end
@@ -15,6 +15,7 @@ class Hyrax::ModelsGenerator < Rails::Generators::Base
15
15
  # Setup the database migrations
16
16
  def copy_migrations
17
17
  rake 'hyrax:install:migrations'
18
+ rake 'valkyrie_engine:install:migrations'
18
19
  end
19
20
 
20
21
  # Add behaviors to the user model
@@ -36,16 +37,6 @@ class Hyrax::ModelsGenerator < Rails::Generators::Base
36
37
  end
37
38
  # rubocop:enable Metrics/MethodLength
38
39
 
39
- def create_collection
40
- copy_file 'app/models/collection.rb', 'app/models/collection.rb'
41
- copy_file 'spec/models/collection_spec.rb', 'spec/models/collection_spec.rb' if rspec_installed?
42
- end
43
-
44
- def create_file_set
45
- copy_file 'app/models/file_set.rb', 'app/models/file_set.rb'
46
- copy_file 'spec/models/file_set_spec.rb', 'spec/models/file_set_spec.rb' if rspec_installed?
47
- end
48
-
49
40
  # Adds clamav initializtion
50
41
  def clamav
51
42
  generate 'hyrax:clamav'
@@ -18,10 +18,6 @@ class Hyrax::RiiifGenerator < Rails::Generators::Base
18
18
 
19
19
  def add_to_gemfile
20
20
  gem 'riiif', '~> 2.1'
21
-
22
- Bundler.with_clean_env do
23
- run "bundle install"
24
- end
25
21
  end
26
22
 
27
23
  def copy_initializer
@@ -32,6 +28,12 @@ class Hyrax::RiiifGenerator < Rails::Generators::Base
32
28
  route "mount Riiif::Engine => 'images', as: :riiif if Hyrax.config.iiif_image_server?"
33
29
  end
34
30
 
31
+ def enable_riiif_in_hyrax_config
32
+ insert_into_file 'config/initializers/hyrax.rb', before: /^ # config.iiif_image_server = false/ do
33
+ " config.iiif_image_server = true\n"
34
+ end
35
+ end
36
+
35
37
  def override_image_url_builder_in_hyrax_config
36
38
  insert_into_file 'config/initializers/hyrax.rb', before: /^ # config.iiif_image_url_builder/ do
37
39
  " config.iiif_image_url_builder = lambda do |file_id, base_url, size, format|\n" \
@@ -0,0 +1,9 @@
1
+ CH12N_TOOL=fits_servlet
2
+ DATABASE_URL=postgresql://postgres@localhost:5437/hyrax-dev?pool=5
3
+ FCREPO_URL=http://fedoraAdmin:fedoraAdmin@fcrepo:8989/fcrepo/rest
4
+ FITS_SERVLET_URL=http://localhost:8085/fits
5
+ HYRAX_ACTIVE_JOB_QUEUE=async
6
+ REDIS_URL=redis://localhost:6384
7
+ SOLR_URL=http://localhost:8988/solr/hyrax-dev
8
+ VALKYRIE_METADATA_ADAPTER=pg_metadata
9
+ VALKYRIE_STORAGE_ADAPTER=versioned_disk_storage
@@ -0,0 +1,50 @@
1
+ name: hyrax-app
2
+ app_mount: false
3
+ services:
4
+ solr:
5
+ app_mount: false
6
+ type: solr:8
7
+ portforward: 8988
8
+ core: hyrax-dev
9
+ config:
10
+ dir: solr/conf
11
+ database:
12
+ app_mount: false
13
+ type: postgres:15
14
+ portforward: 5437
15
+ creds:
16
+ database: hyrax-dev
17
+ redis:
18
+ app_mount: false
19
+ type: redis:6
20
+ portforward: 6384
21
+ persist: true
22
+ fits:
23
+ api: 3
24
+ type: lando
25
+ app_mount: false
26
+ services:
27
+ image: ghcr.io/samvera/fitsservlet:1.6.0
28
+ command:
29
+ - "catalina.sh"
30
+ - "run"
31
+ ports:
32
+ - 8085:8080
33
+ # fedora:
34
+ # api: 3
35
+ # type: lando
36
+ # app_mount: false
37
+ # volumes:
38
+ # fedora6:
39
+ # services:
40
+ # image: fcrepo/fcrepo:6.4.0
41
+ # command:
42
+ # - "catalina.sh"
43
+ # - "run"
44
+ # volumes:
45
+ # - fedora6:/data
46
+ # ports:
47
+ # - 8989:8080
48
+ # environment:
49
+ # CATALINA_OPTS: "-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
50
+ # JAVA_OPTS: "-Dfcrepo.dynamic.jms.port=61619 -Dfcrepo.dynamic.stomp.port=61615 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ # Generated by hyrax:listeners
5
+ #
6
+ # The Hyrax engine uses a publish/subscribe programming model to allow
7
+ # pluggable behavior in response to certain repository events. A range of events
8
+ # are published on a topic based event bus.
9
+ #
10
+ # This listener provides a template.
11
+ #
12
+ # For simple use cases, it's fine to add behavior to the `#on_*` methods in this
13
+ # Listener. If you have more than trivial behavior here, you probably want to add
14
+ # new classes that are named narrowly scoped and named for what the listener is
15
+ # for.
16
+ #
17
+ # When writing listener methods, it's important to carefully consider error,
18
+ # handling. Unhandled exceptions short-circuit behavior for other listeners,
19
+ # so it's a good idea to be paying attention to failure cases.
20
+ #
21
+ # @see https://github.com/samvera/hyrax/wiki/Hyrax's-Event-Bus-(Hyrax::Publisher)
22
+ # @see https://www.rubydoc.info/gems/hyrax/Hyrax/Publisher
23
+ # @see https://dry-rb.org/gems/dry-events
24
+ class HyraxListener
25
+ # def on_batch_created
26
+ # end
27
+
28
+ # def on_collection_deleted
29
+ # end
30
+
31
+ # def on_collection_metadata_updated
32
+ # end
33
+
34
+ # def on_collection_membership_update
35
+ # end
36
+
37
+ # def on_file_characterized
38
+ # end
39
+
40
+ # def on_file_downloaded
41
+ # end
42
+
43
+ # def on_file_metadata_updated
44
+ # end
45
+
46
+ # def on_file_metadata_deleted
47
+ # end
48
+
49
+ # def on_file_uploaded
50
+ # end
51
+
52
+ # def on_file_set_audited
53
+ # end
54
+
55
+ # def on_file_set_attached
56
+ # end
57
+
58
+ # def on_file_set_url_imported
59
+ # end
60
+
61
+ # def on_file_set_restored
62
+ # end
63
+
64
+ # def on_object_deleted
65
+ # end
66
+
67
+ # def on_object_failed_deposit
68
+ # end
69
+
70
+ # def on_object_deposited
71
+ # end
72
+
73
+ # def on_object_acl_updated
74
+ # end
75
+
76
+ # def on_object_membership_updated
77
+ # end
78
+
79
+ # def on_object_metadata_updated
80
+ # end
81
+ end
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  # Generated by hyrax:models:install
3
- class FileSet < ActiveFedora::Base
4
- include ::Hyrax::FileSetBehavior
3
+ class FileSet < Hyrax::FileSet
5
4
  end