hyrax 3.3.0 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +26 -17
  3. data/.dassie/.env +2 -1
  4. data/.dassie/Gemfile +1 -1
  5. data/.dassie/app/forms/collection_resource_form.rb +8 -0
  6. data/.dassie/app/indexers/collection_resource_indexer.rb +8 -0
  7. data/.dassie/app/models/collection_resource.rb +35 -0
  8. data/.dassie/config/initializers/file_services.rb +4 -0
  9. data/.dassie/config/initializers/hyrax.rb +12 -1
  10. data/.dassie/config/metadata/collection_resource.yaml +23 -0
  11. data/.dassie/db/seeds.rb +74 -17
  12. data/.dassie/spec/forms/collection_resource_form_spec.rb +13 -0
  13. data/.dassie/spec/indexers/collection_resource_indexer_spec.rb +14 -0
  14. data/.dassie/spec/models/collection_resource_spec.rb +13 -0
  15. data/.github/release.yml +26 -0
  16. data/.gitignore +3 -0
  17. data/.regen +1 -1
  18. data/.rubocop.yml +1 -1
  19. data/.rubocop_fixme.yml +22 -3
  20. data/CONTAINERS.md +18 -13
  21. data/Dockerfile +4 -3
  22. data/app/actors/hyrax/actors/file_actor.rb +6 -4
  23. data/app/actors/hyrax/actors/transfer_request_actor.rb +3 -7
  24. data/app/assets/javascripts/hyrax/analytics_events.js +8 -2
  25. data/app/assets/javascripts/hyrax/autocomplete/linked_data.es6 +1 -3
  26. data/app/assets/javascripts/hyrax/collections_v2.es6 +13 -0
  27. data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +1 -3
  28. data/app/controllers/concerns/hyrax/controller.rb +21 -0
  29. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +83 -59
  30. data/app/controllers/hyrax/admin/admin_sets_controller.rb +105 -19
  31. data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +12 -19
  32. data/app/controllers/hyrax/batch_edits_controller.rb +12 -3
  33. data/app/controllers/hyrax/batch_uploads_controller.rb +4 -0
  34. data/app/controllers/hyrax/citations_controller.rb +1 -1
  35. data/app/controllers/hyrax/dashboard/collections_controller.rb +176 -83
  36. data/app/controllers/hyrax/single_use_links_viewer_controller.rb +1 -1
  37. data/app/forms/hyrax/forms/administrative_set_form.rb +19 -1
  38. data/app/forms/hyrax/forms/batch_edit_form.rb +1 -1
  39. data/app/forms/hyrax/forms/collection_form.rb +1 -1
  40. data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +21 -6
  41. data/app/forms/hyrax/forms/pcdm_collection_form.rb +30 -2
  42. data/app/forms/hyrax/forms/permission_template_form.rb +17 -9
  43. data/app/forms/hyrax/forms/resource_form.rb +23 -5
  44. data/app/forms/hyrax/forms/widgets/admin_set_visibility.rb +1 -1
  45. data/app/helpers/hyrax/collections_helper.rb +14 -0
  46. data/app/helpers/hyrax/membership_helper.rb +1 -1
  47. data/app/helpers/hyrax/trophy_helper.rb +1 -1
  48. data/app/helpers/hyrax/url_helper.rb +1 -1
  49. data/app/indexers/hyrax/administrative_set_indexer.rb +8 -2
  50. data/app/indexers/hyrax/deep_indexing_service.rb +1 -1
  51. data/app/indexers/hyrax/file_set_indexer.rb +1 -0
  52. data/app/indexers/hyrax/pcdm_collection_indexer.rb +3 -2
  53. data/app/indexers/hyrax/thumbnail_indexer.rb +31 -0
  54. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +6 -6
  55. data/app/indexers/hyrax/valkyrie_indexer.rb +4 -2
  56. data/app/indexers/hyrax/valkyrie_work_indexer.rb +13 -0
  57. data/app/inputs/controlled_vocabulary_input.rb +2 -0
  58. data/app/jobs/change_depositor_event_job.rb +47 -0
  59. data/app/jobs/characterize_job.rb +43 -3
  60. data/app/jobs/concerns/hyrax/members_permission_job_behavior.rb +1 -1
  61. data/app/jobs/content_depositor_change_event_job.rb +2 -1
  62. data/app/jobs/hyrax/propagate_change_depositor_job.rb +32 -0
  63. data/app/jobs/import_url_job.rb +4 -6
  64. data/app/jobs/inherit_permissions_job.rb +1 -1
  65. data/app/jobs/valkyrie_create_derivatives_job.rb +25 -0
  66. data/app/jobs/valkyrie_ingest_job.rb +41 -35
  67. data/app/models/admin_set.rb +10 -2
  68. data/app/models/collection_branding_info.rb +8 -6
  69. data/app/models/concerns/hyrax/collection_behavior.rb +3 -3
  70. data/app/models/concerns/hyrax/file_set/characterization.rb +7 -1
  71. data/app/models/concerns/hyrax/solr_document/metadata.rb +1 -0
  72. data/app/models/concerns/hyrax/solr_document_behavior.rb +9 -3
  73. data/app/models/concerns/hyrax/user.rb +11 -0
  74. data/app/models/concerns/hyrax/work_behavior.rb +1 -1
  75. data/app/models/featured_work_list.rb +0 -1
  76. data/app/models/hyrax/administrative_set.rb +36 -1
  77. data/app/models/hyrax/collection_type.rb +2 -2
  78. data/app/models/hyrax/file_metadata.rb +37 -3
  79. data/app/models/hyrax/file_set.rb +43 -4
  80. data/app/models/hyrax/group.rb +19 -0
  81. data/app/models/hyrax/pcdm_collection.rb +56 -1
  82. data/app/models/hyrax/permission_template.rb +11 -5
  83. data/app/models/hyrax/work.rb +91 -0
  84. data/app/models/job_io_wrapper.rb +1 -1
  85. data/app/models/proxy_deposit_request.rb +1 -1
  86. data/app/presenters/hyrax/admin_set_presenter.rb +2 -2
  87. data/app/presenters/hyrax/member_presenter_factory.rb +2 -4
  88. data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +2 -2
  89. data/app/presenters/hyrax/work_show_presenter.rb +10 -6
  90. data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +2 -2
  91. data/app/search_builders/hyrax/dashboard/managed_search_filters.rb +44 -4
  92. data/app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb +2 -2
  93. data/app/search_builders/hyrax/my/collections_search_builder.rb +11 -4
  94. data/app/services/hyrax/access_control_list.rb +20 -6
  95. data/app/services/hyrax/adapters/nesting_index_adapter.rb +3 -3
  96. data/app/services/hyrax/admin_set_create_service.rb +21 -37
  97. data/app/services/hyrax/change_content_depositor_service.rb +2 -2
  98. data/app/services/hyrax/change_depositor_service.rb +70 -0
  99. data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +4 -6
  100. data/app/services/hyrax/collections/collection_member_service.rb +3 -5
  101. data/app/services/hyrax/collections/nested_collection_query_service.rb +24 -12
  102. data/app/services/hyrax/custom_queries/navigators/child_file_sets_navigator.rb +45 -0
  103. data/app/services/hyrax/custom_queries/navigators/child_filesets_navigator.rb +7 -2
  104. data/app/services/hyrax/custom_queries/navigators/parent_work_navigator.rb +54 -0
  105. data/app/services/hyrax/default_middleware_stack.rb +3 -0
  106. data/app/services/hyrax/file_set_derivatives_service.rb +21 -2
  107. data/app/services/hyrax/file_set_type_service.rb +2 -5
  108. data/app/services/hyrax/listeners/file_metadata_listener.rb +31 -1
  109. data/app/services/hyrax/listeners/member_cleanup_listener.rb +27 -11
  110. data/app/services/hyrax/listeners/metadata_index_listener.rb +39 -0
  111. data/app/services/hyrax/listeners/proxy_deposit_listener.rb +14 -8
  112. data/app/services/hyrax/location_service.rb +33 -0
  113. data/app/services/hyrax/multiple_membership_checker.rb +46 -1
  114. data/app/services/hyrax/resource_visibility_propagator.rb +1 -1
  115. data/app/services/hyrax/simple_schema_loader.rb +5 -1
  116. data/app/services/hyrax/solr_query_service.rb +12 -7
  117. data/app/services/hyrax/thumbnail_path_service.rb +1 -1
  118. data/app/services/hyrax/valkyrie_persist_derivatives.rb +50 -0
  119. data/app/services/hyrax/valkyrie_upload.rb +94 -0
  120. data/app/services/hyrax/work_uploads_handler.rb +0 -10
  121. data/app/services/hyrax/workflow/workflow_importer.rb +7 -9
  122. data/app/services/hyrax/workflow/workflow_schema.rb +3 -5
  123. data/app/strategies/hyrax/strategies/yaml_strategy.rb +4 -6
  124. data/app/uploaders/hyrax/uploaded_file_uploader.rb +4 -4
  125. data/app/utils/hyrax/data_destroyers/collection_branding_destroyer.rb +29 -0
  126. data/app/utils/hyrax/data_destroyers/collection_types_destroyer.rb +26 -0
  127. data/app/utils/hyrax/data_destroyers/default_admin_set_id_cache_destroyer.rb +26 -0
  128. data/app/utils/hyrax/data_destroyers/featured_works_destroyer.rb +27 -0
  129. data/app/utils/hyrax/data_destroyers/permission_templates_destroyer.rb +30 -0
  130. data/app/utils/hyrax/data_destroyers/repository_metadata_destroyer.rb +42 -0
  131. data/app/utils/hyrax/data_destroyers/stats_destroyer.rb +33 -0
  132. data/app/utils/hyrax/data_maintenance.rb +51 -0
  133. data/app/utils/hyrax/required_data_seeder.rb +21 -0
  134. data/app/utils/hyrax/required_data_seeders/collection_seeder.rb +26 -0
  135. data/app/utils/hyrax/required_data_seeders/collection_type_seeder.rb +36 -0
  136. data/app/utils/hyrax/test_data_seeder.rb +24 -0
  137. data/app/utils/hyrax/test_data_seeders/collection_seeder.rb +91 -0
  138. data/app/utils/hyrax/test_data_seeders/collection_type_seeder.rb +72 -0
  139. data/app/utils/hyrax/test_data_seeders/user_seeder.rb +52 -0
  140. data/app/validators/hyrax/collection_membership_validator.rb +39 -0
  141. data/app/views/catalog/_index_header_list_default.html.erb +8 -1
  142. data/app/views/catalog/_thumbnail_list_default.html.erb +8 -3
  143. data/app/views/collections/edit_fields/_based_near.html.erb +7 -7
  144. data/app/views/hyrax/admin/admin_sets/_form_participant_table.html.erb +2 -2
  145. data/app/views/hyrax/admin/admin_sets/_form_participants.html.erb +2 -2
  146. data/app/views/hyrax/admin/admin_sets/_form_visibility.html.erb +2 -2
  147. data/app/views/hyrax/admin/admin_sets/_form_workflow.erb +1 -1
  148. data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
  149. data/app/views/hyrax/base/_form.html.erb +1 -1
  150. data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -1
  151. data/app/views/hyrax/dashboard/collections/_default_group.html.erb +2 -2
  152. data/app/views/hyrax/dashboard/collections/_form.html.erb +24 -17
  153. data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +1 -0
  154. data/app/views/hyrax/dashboard/collections/_form_discovery.html.erb +6 -3
  155. data/app/views/hyrax/dashboard/collections/_form_share.html.erb +2 -2
  156. data/app/views/hyrax/dashboard/collections/_form_share_table.html.erb +3 -3
  157. data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +2 -2
  158. data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +1 -1
  159. data/app/views/hyrax/dashboard/works/_default_group.html.erb +1 -1
  160. data/app/views/hyrax/dashboard/works/_list_works.html.erb +1 -1
  161. data/app/views/hyrax/file_sets/_actions.html.erb +2 -2
  162. data/app/views/hyrax/my/_facet_pagination.html.erb +12 -9
  163. data/app/views/hyrax/my/_work_action_menu.html.erb +8 -9
  164. data/app/views/hyrax/my/collections/_default_group.html.erb +2 -2
  165. data/app/views/hyrax/my/collections/_list_collections.html.erb +2 -2
  166. data/app/views/hyrax/my/collections/index.html.erb +3 -2
  167. data/app/views/hyrax/my/works/_default_group.html.erb +1 -1
  168. data/app/views/hyrax/my/works/_list_works.html.erb +1 -2
  169. data/app/views/hyrax/my/works/_tabs.html.erb +6 -1
  170. data/app/views/hyrax/my/works/index.html.erb +4 -2
  171. data/chart/hyrax/Chart.yaml +11 -7
  172. data/chart/hyrax/README.md +22 -1
  173. data/chart/hyrax/templates/_helpers.tpl +4 -0
  174. data/chart/hyrax/templates/cron-embargo.yaml +5 -0
  175. data/chart/hyrax/templates/cron-lease.yaml +5 -0
  176. data/chart/hyrax/templates/deployment-worker.yaml +11 -0
  177. data/chart/hyrax/templates/ingress.yaml +7 -6
  178. data/chart/hyrax/values.yaml +152 -0
  179. data/config/features.rb +48 -50
  180. data/config/initializers/listeners.rb +0 -1
  181. data/config/initializers/{valkryrie_storage.rb → storage_adapter_initializer.rb} +5 -0
  182. data/config/locales/hyrax.de.yml +18 -17
  183. data/config/locales/hyrax.en.yml +30 -28
  184. data/config/locales/hyrax.es.yml +10 -9
  185. data/config/locales/hyrax.fr.yml +2 -1
  186. data/config/locales/hyrax.it.yml +3 -2
  187. data/config/locales/hyrax.pt-BR.yml +2 -1
  188. data/config/locales/hyrax.zh.yml +2 -1
  189. data/config/metadata/basic_metadata.yaml +2 -0
  190. data/config/metadata/core_metadata.yaml +1 -1
  191. data/docker-compose.yml +47 -42
  192. data/documentation/developing-your-hyrax-based-app.md +1 -1
  193. data/documentation/legacyREADME.md +1 -1
  194. data/hyrax.gemspec +5 -3
  195. data/lib/generators/hyrax/collection_resource/USAGE +20 -0
  196. data/lib/generators/hyrax/collection_resource/collection_resource_generator.rb +133 -0
  197. data/lib/generators/hyrax/collection_resource/templates/collection.rb.erb +34 -0
  198. data/lib/generators/hyrax/collection_resource/templates/collection_form.rb.erb +7 -0
  199. data/lib/generators/hyrax/collection_resource/templates/collection_form_spec.rb.erb +13 -0
  200. data/lib/generators/hyrax/collection_resource/templates/collection_indexer.rb.erb +7 -0
  201. data/lib/generators/hyrax/collection_resource/templates/collection_indexer_spec.rb.erb +13 -0
  202. data/lib/generators/hyrax/collection_resource/templates/collection_metadata.yaml +22 -0
  203. data/lib/generators/hyrax/collection_resource/templates/collection_spec.rb.erb +12 -0
  204. data/lib/generators/hyrax/install_generator.rb +9 -0
  205. data/lib/hyrax/administrative_set_name.rb +18 -0
  206. data/lib/hyrax/collection_name.rb +2 -0
  207. data/lib/hyrax/configuration.rb +22 -0
  208. data/lib/hyrax/controlled_vocabularies/location.rb +9 -2
  209. data/lib/hyrax/controlled_vocabularies/resource_label_caching.rb +42 -0
  210. data/lib/hyrax/controlled_vocabularies.rb +1 -0
  211. data/lib/hyrax/publisher.rb +49 -0
  212. data/lib/hyrax/schema.rb +16 -13
  213. data/lib/hyrax/specs/capybara.rb +1 -1
  214. data/lib/hyrax/specs/shared_specs/hydra_works.rb +11 -5
  215. data/lib/hyrax/specs/shared_specs/indexers.rb +117 -3
  216. data/lib/hyrax/transactions/admin_set_create.rb +2 -1
  217. data/lib/hyrax/transactions/admin_set_destroy.rb +22 -0
  218. data/lib/hyrax/transactions/admin_set_update.rb +21 -0
  219. data/lib/hyrax/transactions/collection_destroy.rb +22 -0
  220. data/lib/hyrax/transactions/collection_update.rb +5 -2
  221. data/lib/hyrax/transactions/container.rb +97 -23
  222. data/lib/hyrax/transactions/create_work.rb +3 -0
  223. data/lib/hyrax/transactions/destroy_work.rb +3 -0
  224. data/lib/hyrax/transactions/steps/apply_collection_permission_template.rb +2 -0
  225. data/lib/hyrax/transactions/steps/apply_permission_template.rb +2 -0
  226. data/lib/hyrax/transactions/steps/apply_visibility.rb +2 -0
  227. data/lib/hyrax/transactions/steps/change_depositor.rb +46 -0
  228. data/lib/hyrax/transactions/steps/check_for_empty_admin_set.rb +36 -0
  229. data/lib/hyrax/transactions/steps/delete_access_control.rb +32 -0
  230. data/lib/hyrax/transactions/steps/delete_resource.rb +19 -3
  231. data/lib/hyrax/transactions/steps/destroy_work.rb +3 -1
  232. data/lib/hyrax/transactions/steps/ensure_permission_template.rb +2 -0
  233. data/lib/hyrax/transactions/steps/save.rb +24 -6
  234. data/lib/hyrax/transactions/steps/save_access_control.rb +2 -2
  235. data/lib/hyrax/transactions/steps/save_collection_banner.rb +59 -0
  236. data/lib/hyrax/transactions/steps/save_collection_logo.rb +109 -0
  237. data/lib/hyrax/transactions/steps/save_work.rb +3 -0
  238. data/lib/hyrax/transactions/steps/set_user_as_creator.rb +41 -0
  239. data/lib/hyrax/transactions/steps/update_work_members.rb +51 -0
  240. data/lib/hyrax/transactions/update_work.rb +4 -3
  241. data/lib/hyrax/transactions/work_create.rb +1 -1
  242. data/lib/hyrax/transactions/work_destroy.rb +2 -1
  243. data/lib/hyrax/transactions/work_update.rb +19 -0
  244. data/lib/hyrax/version.rb +1 -1
  245. data/lib/wings/active_fedora_converter/file_metadata_node.rb +48 -0
  246. data/lib/wings/active_fedora_converter/instance_builder.rb +68 -0
  247. data/lib/wings/active_fedora_converter.rb +3 -3
  248. data/lib/wings/attribute_transformer.rb +5 -1
  249. data/lib/wings/services/custom_queries/find_file_metadata.rb +19 -8
  250. data/lib/wings/setup.rb +3 -1
  251. data/lib/wings/valkyrie/persister.rb +2 -0
  252. data/lib/wings/valkyrie/query_service.rb +6 -7
  253. data/lib/wings/valkyrie/storage.rb +7 -1
  254. data/template.rb +1 -1
  255. metadata +99 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95d9c34fb76fd8e3ac06d6605962c16bbdad32ffa2c1f5ab24958740fc175507
4
- data.tar.gz: 8be6a02dc887f93076d84a5dc47b8e4cc7ecf916415e23fd00df24078f20ebbf
3
+ metadata.gz: 9b16b002450d8ab2e549a1e79a558df2cdcc5a4f906d5cad461a010de5d3083d
4
+ data.tar.gz: e31cfe1456a09806f220c3a80582c708ea04707fb927dce8bcd1fa897d738c94
5
5
  SHA512:
6
- metadata.gz: b6e519190cda4bdcdb4a68577b682ad6fd138756da25ce69228429755e3ee3a2fb3ac95d9140831d623f75e0aa8a9115d378abafe8f301850c200fb8080b9942
7
- data.tar.gz: 90610095bd1b82e79bc7ebaa8de11a2f3c8452803a15d60a4595308b67ab85724b118c7343b2a46fb2bafb3a138365fdb94540e948965cc1a96d4259fd8b07d6
6
+ metadata.gz: c559a06ad78eb3b2e13ab6f11cc7fd0a5ee94a0da1670b0c67557610cf0d65fde294a6998ce46c634bff1a24ad3a17d6eb4755ec7ddf87e7c339ef7c46a0e717
7
+ data.tar.gz: d95bd5690258a422be6913a1fb7bed33c225288948c74d6864ec3f7740d4791fd7dcca321b89f81efc33083048965102635281ff5b0de815701125a95c8e24f7
data/.circleci/config.yml CHANGED
@@ -6,7 +6,7 @@ jobs:
6
6
  parameters:
7
7
  ruby_version:
8
8
  type: string
9
- default: 2.5.8
9
+ default: 2.5.9
10
10
  bundler_version:
11
11
  type: string
12
12
  default: 1.17.3
@@ -67,7 +67,7 @@ jobs:
67
67
  parameters:
68
68
  ruby_version:
69
69
  type: string
70
- default: 2.5.8
70
+ default: 2.5.9
71
71
  bundler_version:
72
72
  type: string
73
73
  default: 1.17.3
@@ -86,6 +86,15 @@ jobs:
86
86
  steps:
87
87
  - attach_workspace:
88
88
  at: ~/
89
+ - when:
90
+ condition:
91
+ equal: [ '2.5.9', << parameters.ruby_version >> ]
92
+ steps:
93
+ - run:
94
+ name: "Lock browse everything for Ruby 2.5"
95
+ command: |
96
+ sed -i.bak "s/browse-everything.*/browse-everything\', \'1.1.2\'/" hyrax.gemspec
97
+ bundle
89
98
  - samvera/engine_cart_generate:
90
99
  cache_key: v1-internal-test-app-{{ checksum "hyrax.gemspec" }}-{{ checksum ".regen" }}-{{ checksum ".circleci/config.yml" }}-<< parameters.rails_version >>-<< parameters.ruby_version >>
91
100
  - samvera/bundle:
@@ -101,7 +110,7 @@ jobs:
101
110
  parameters:
102
111
  ruby_version:
103
112
  type: string
104
- default: 2.5.8
113
+ default: 2.5.9
105
114
  bundler_version:
106
115
  type: string
107
116
  default: 1.17.3
@@ -150,43 +159,43 @@ jobs:
150
159
  --header 'Content-Type: application/json'
151
160
  workflows:
152
161
  version: 2
153
- ruby2-5-8:
162
+ ruby2-5:
154
163
  jobs:
155
164
  - bundle:
156
- ruby_version: "2.5.8"
165
+ ruby_version: "2.5.9"
157
166
  rails_version: "5.2.6"
158
167
  - build:
159
- ruby_version: "2.5.8"
168
+ ruby_version: "2.5.9"
160
169
  rails_version: "5.2.6"
161
170
  requires:
162
171
  - bundle
163
172
  - test:
164
- name: "ruby2-5-8"
165
- ruby_version: "2.5.8"
173
+ name: "ruby2-5"
174
+ ruby_version: "2.5.9"
166
175
  requires:
167
176
  - build
168
- ruby2-6-6:
177
+ ruby2-6:
169
178
  jobs:
170
179
  - bundle:
171
- ruby_version: "2.6.6"
180
+ ruby_version: "2.6.7"
172
181
  rails_version: "5.2.6"
173
182
  - build:
174
- ruby_version: "2.6.6"
183
+ ruby_version: "2.6.7"
175
184
  rails_version: "5.2.6"
176
185
  requires:
177
186
  - bundle
178
187
  - test:
179
- name: "ruby2-6-6"
180
- ruby_version: "2.6.6"
188
+ name: "ruby2-6"
189
+ ruby_version: "2.6.7"
181
190
  requires:
182
191
  - build
183
192
  - test:
184
- name: "ruby2-6-6-valkyrie"
185
- ruby_version: "2.6.6"
193
+ name: "ruby2-6-valkyrie"
194
+ ruby_version: "2.6.7"
186
195
  hyrax_valkyrie: "true"
187
196
  requires:
188
197
  - build
189
- ruby2-7-4:
198
+ ruby2-7:
190
199
  jobs:
191
200
  - bundle:
192
201
  ruby_version: "2.7.4"
@@ -199,7 +208,7 @@ workflows:
199
208
  requires:
200
209
  - bundle
201
210
  - test:
202
- name: "ruby2-7-4"
211
+ name: "ruby2-7"
203
212
  ruby_version: "2.7.4"
204
213
  bundler_version: "2.1.4"
205
214
  requires:
data/.dassie/.env CHANGED
@@ -1,3 +1,4 @@
1
1
  MEMCACHED_HOST=memcached
2
2
  REDIS_PROVIDER=SIDEKIQ_REDIS_URL
3
- SIDEKIQ_REDIS_URL=redis://redis:6379/0
3
+ SEED_DASSIE=true
4
+ SIDEKIQ_REDIS_URL=redis://redis:6379/0
data/.dassie/Gemfile CHANGED
@@ -8,7 +8,7 @@ else
8
8
  end
9
9
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
10
10
 
11
- ruby '2.7.4'
11
+ ruby '2.7.5'
12
12
 
13
13
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
14
14
  gem 'rails', '~> 5.2.4', '>= 5.2.4.4'
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated via
4
+ # `rails generate hyrax:collection_resource CollectionResource`
5
+ class CollectionResourceForm < Hyrax::Forms::PcdmCollectionForm
6
+ include Hyrax::FormFields(:basic_metadata)
7
+ include Hyrax::FormFields(:collection_resource)
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated via
4
+ # `rails generate hyrax:collection_resource CollectionResource`
5
+ class CollectionResourceIndexer < Hyrax::PcdmCollectionIndexer
6
+ include Hyrax::Indexer(:basic_metadata)
7
+ include Hyrax::Indexer(:collection_resource)
8
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated via
4
+ # `rails generate hyrax:collection_resource CollectionResource`
5
+ class CollectionResource < Hyrax::PcdmCollection
6
+ # @note Do not directly update `basic_metadata.yaml`. It is also used by works.
7
+ #
8
+ # To change metadata for collections
9
+ # * extend by adding fields to `/config/metadata/collection_resource.yaml`
10
+ # * remove all basic metadata
11
+ # * if you generated `with_basic_metadata` and now don't want any basic metadata,
12
+ # comment out or delete the schema include statement for `:basic_metadata`
13
+ # * update form and indexer classes to also remove the `:basic_metadata` schema include
14
+ # * remove some basic metadata
15
+ # * comment out or delete the schema include statement for `:basic_metadata`
16
+ # * update form and indexer classes to also remove the `:basic_metadata` schema include
17
+ # * copy fields you want to keep from `/config/metadata/basic_metadata.yaml`
18
+ # to `/config/metadata/collection_resource.yaml`
19
+ # * override some basic metadata
20
+ # * fields are not allowed to repeat, so to override any basic metadata, you
21
+ # must first comment out or delete the schema include statement for `:basic_metadata`
22
+ # * update form and indexer classes to also remove the `:basic_metadata` schema include
23
+ # * copy all fields you want to keep unchanged or to override from `/config/metadata/basic_metadata.yaml`
24
+ # to `/config/metadata/collection_resource.yaml`
25
+ # * update them in `config/metadata/collection_resource.yaml to have the desired
26
+ # characteristics
27
+ #
28
+ # Alternative:
29
+ # * comment out or delete schema include statements
30
+ # * add Valkyrie attributes to this class
31
+ # * update form and indexer to process the attributes
32
+ #
33
+ include Hyrax::Schema(:basic_metadata)
34
+ include Hyrax::Schema(:collection_resource)
35
+ end
@@ -0,0 +1,4 @@
1
+ ActiveSupport::Reloader.to_prepare do
2
+ Hydra::Derivatives.config.output_file_service = Hyrax::ValkyriePersistDerivatives
3
+ Hydra::Derivatives.config.source_file_service = Hyrax::LocalFileService
4
+ end
@@ -15,6 +15,8 @@ Hyrax.config do |config|
15
15
  config.register_curation_concern :monograph
16
16
 
17
17
  config.iiif_image_server = true
18
+ config.work_requires_files = false
19
+ config.citations = true
18
20
 
19
21
  # Returns a URL that resolves to an image provided by a IIIF image server
20
22
  config.iiif_image_url_builder = lambda do |file_id, base_url, size, format|
@@ -38,14 +40,23 @@ Hyrax.config do |config|
38
40
  config.browse_everything = nil
39
41
  end
40
42
 
43
+ # config.geonames_username = ''
44
+
41
45
  ##
42
46
  # Set the system-wide virus scanner
43
47
  config.virus_scanner = Hyrax::VirusScanner
44
48
 
45
49
  ##
46
- # To index to the Valkyrie core, uncomment the following two lines.
50
+ # To index to the Valkyrie core, uncomment the following lines.
47
51
  # config.query_index_from_valkyrie = true
48
52
  # config.index_adapter = :solr_index
53
+
54
+ ##
55
+ # NOTE: To Valkyrie works, use Monograph which is_a Hyrax::Work is_a Valkyrie::Resource
56
+ # To use Valkyrie models, uncomment the following lines.
57
+ # config.collection_model = 'Hyrax::PcdmCollection' # collection without basic metadata
58
+ # config.collection_model = 'CollectionResource' # collection with basic metadata
59
+ # config.admin_set_model = 'Hyrax::AdministrativeSet'
49
60
  end
50
61
 
51
62
  Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
@@ -0,0 +1,23 @@
1
+ # Simple yaml config-driven schema which is used to define model attributes,
2
+ # index key names, and form properties.
3
+ #
4
+ # Originally generated with no metadata via
5
+ # `rails generate hyrax:collection_resource CollectionResource`
6
+ #
7
+ # A few custom fields are added for testing purposes.
8
+
9
+ ---
10
+ attributes:
11
+ target_audience:
12
+ type: string
13
+ form:
14
+ primary: true
15
+ multiple: true
16
+ department:
17
+ type: string
18
+ form:
19
+ primary: true
20
+ course:
21
+ type: string
22
+ form:
23
+ primary: false
data/.dassie/db/seeds.rb CHANGED
@@ -1,22 +1,79 @@
1
- # This file should contain all the record creation needed to seed the database with its default values.
2
- # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
3
- #
4
- # Examples:
5
- #
6
- # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
7
- # Character.create(name: 'Luke', movie: movies.first)
8
-
9
- Hyrax::Engine.load_seed unless ActiveModel::Type::Boolean.new.cast(ENV["SKIP_HYRAX_ENGINE_SEED"])
10
-
11
- puts "\n== Loading users"
12
- User.where(email: 'admin@example.com').first_or_create do |f|
13
- f.password = 'admin_password'
1
+ wipe_data = ActiveModel::Type::Boolean.new.cast(ENV.fetch('WIPE_DATA', false))
2
+ seed_release_testing = ActiveModel::Type::Boolean.new.cast(ENV.fetch('SEED_RELEASE_TESTING', false))
3
+ seed_dassie = ActiveModel::Type::Boolean.new.cast(ENV.fetch('SEED_DASSIE', false))
4
+
5
+ unless wipe_data || seed_release_testing
6
+ puts 'NAME'
7
+ puts ' rails db:seed (Hyrax)'
8
+ puts
9
+ puts 'SYNOPSIS'
10
+ puts ' bundle exec rails db:seed [WIPE_DATA=true|false] [SEED_RELEASE_TESTING=true|false] [SEED_DASSIE=true|false]'
11
+ puts
12
+ puts 'DESCRIPTION'
13
+ puts ' Hyrax defined db:seed provides a means to clear repository metadata from the datastore (e.g. Fedora, Postgres) and from Solr.'
14
+ puts ' Seeds can be run to pre-populate metadata to help with release testing and local development testing.'
15
+ puts
16
+ puts ' NOTE: Options can be passed in with the command on the command line or set as ENV variables.'
17
+ puts
18
+ puts ' The options are as follows:'
19
+ puts
20
+ puts ' WIPE_DATA'
21
+ puts ' USE WITH CAUTION - Deleted data cannot be recovered.'
22
+ puts
23
+ puts ' When true, it will clear all repository metadata from the datastore (e.g. Fedora, Postgres) and from Solr. It also'
24
+ puts ' clears data from the application database that are tightly coupled to repository metadata. See Hyrax::DataMaintenance'
25
+ puts ' for more information on what data will be destroyed by this process.'
26
+ puts
27
+ puts ' The wipe_data process will also restore required repository metadata including collection types and the default admin'
28
+ puts ' set. See Hyrax::RequiredDataSeeder for more information on what data will be created by this process.'
29
+ puts
30
+ puts ' SEED_RELEASE_TESTING'
31
+ puts ' When true, it will run the set of seeds for release testing creating a repository metadata and support data, including'
32
+ puts ' test users, collection types, collections, and works with and without files. See Hyrax::TestDataSeeder for more information'
33
+ puts ' on what data will be created by this process.'
34
+ puts
35
+ puts ' SEED_DASSIE'
36
+ puts ' When true, it will run a minimal set of seeds for dassie test app, including required collection types, default admin set,'
37
+ puts ' and test users.'
38
+ puts
39
+ puts ' ALLOW_RELEASE_SEEDING_IN_PRODUCTION'
40
+ puts ' USE WITH EXTERME CAUTION WHEN USED IN PRODUCTION - Deleted data cannot be recovered. Attempts are made to not overwrite'
41
+ puts ' existing data, but use in production is not recommended.'
42
+ puts
43
+ puts ' If this is NOT true, the process will abort when Rails environment is production.'
44
+ puts
45
+ end
46
+
47
+ allow_release_seeding_in_production = ActiveModel::Type::Boolean.new.cast(ENV.fetch('ALLOW_RELEASE_SEEDING_IN_PRODUCTION', false))
48
+
49
+ if Rails.env == 'production' && !allow_release_seeding_in_production
50
+ puts "Seeding data for release testing is not for use in production!"
51
+ exit
14
52
  end
15
53
 
16
- User.where(email: 'basic_user@example.com').first_or_create do |f|
17
- f.password = 'password'
54
+ if wipe_data
55
+ puts '####################################################################################'
56
+ puts
57
+ puts 'WARNING: You are about to clear all repository metadata from the datastore and solr.'
58
+ puts 'Are you sure? [YES|n]'
59
+ answer = STDIN.gets.chomp
60
+ unless answer == 'YES'
61
+ puts ' Aborting!'
62
+ puts '####################################################################################'
63
+ exit
64
+ end
65
+
66
+ Hyrax::DataMaintenance.new.destroy_repository_metadata_and_related_data
67
+ Hyrax::RequiredDataSeeder.new.generate_seed_data
68
+ end
69
+
70
+ if seed_dassie
71
+ puts 'Seeding Dassie ...'
72
+
73
+ Hyrax::RequiredDataSeeder.new.generate_seed_data
74
+ Hyrax::TestDataSeeders::UserSeeder.generate_seeds
18
75
  end
19
76
 
20
- User.where(email: 'another_user@example.com').first_or_create do |f|
21
- f.password = 'password'
77
+ if seed_release_testing
78
+ Hyrax::TestDataSeeder.new.generate_seed_data
22
79
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated via
4
+ # `rails generate hyrax:collection_resource CollectionResource`
5
+ require 'rails_helper'
6
+ require 'valkyrie/specs/shared_specs'
7
+
8
+ RSpec.describe CollectionResourceForm do
9
+ let(:change_set) { described_class.new(resource) }
10
+ let(:resource) { CollectionResource.new }
11
+
12
+ it_behaves_like 'a Valkyrie::ChangeSet'
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated via
4
+ # `rails generate hyrax:collection_resource CollectionResource`
5
+ require 'rails_helper'
6
+ require 'hyrax/specs/shared_specs/indexers'
7
+
8
+ RSpec.describe CollectionResourceIndexer do
9
+ let(:indexer_class) { described_class }
10
+ let(:resource) { CollectionResource.new }
11
+
12
+ it_behaves_like 'a Hyrax::Resource indexer'
13
+ it_behaves_like 'a Basic metadata indexer'
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Generated via
4
+ # `rails generate hyrax:collection_resource CollectionResource`
5
+ require 'rails_helper'
6
+ require 'hyrax/specs/shared_specs/hydra_works'
7
+
8
+ RSpec.describe CollectionResource do
9
+ subject(:collection) { described_class.new }
10
+
11
+ it_behaves_like 'a Hyrax::PcdmCollection'
12
+ it_behaves_like 'a model with basic metadata'
13
+ end
@@ -0,0 +1,26 @@
1
+ changelog:
2
+ categories:
3
+ - title: Major Changes (Potentially breaking changes)
4
+ labels:
5
+ - notes-major
6
+ - title: New Features
7
+ labels:
8
+ - notes-minor
9
+ - title: Deprecations
10
+ labels:
11
+ - notes-deprecation
12
+ - title: Bug Fixes
13
+ labels:
14
+ - notes-bugfix
15
+ - title: Valkyrie Progress
16
+ labels:
17
+ - notes-valkyrie
18
+ - title: Documentation
19
+ labels:
20
+ - notes-docs
21
+ - title: Containerization
22
+ labels:
23
+ - notes-container
24
+ - title: Other
25
+ labels:
26
+ - "*"
data/.gitignore CHANGED
@@ -49,6 +49,8 @@ coverage
49
49
  rdoc
50
50
  /.bundle
51
51
  tmp
52
+ /.idea
53
+
52
54
 
53
55
  *.log
54
56
  *~
@@ -71,6 +73,7 @@ db/schema.rb
71
73
 
72
74
  .*_app
73
75
  .byebug_history
76
+ .tool-versions
74
77
 
75
78
  ## Carried over from hyrax-models (RIP)
76
79
  *.gem
data/.regen CHANGED
@@ -1 +1 @@
1
- 40
1
+ 46
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ inherit_gem:
5
5
  bixby: bixby_default.yml
6
6
 
7
7
  AllCops:
8
- TargetRubyVersion: 2.4
8
+ TargetRubyVersion: 2.5
9
9
  DisplayCopNames: true
10
10
  Exclude:
11
11
  - 'db/**/*'
data/.rubocop_fixme.yml CHANGED
@@ -63,6 +63,7 @@ RSpec/ExampleLength:
63
63
  - 'spec/jobs/content_restored_version_event_job_spec.rb'
64
64
  - 'spec/jobs/content_new_version_event_job_spec.rb'
65
65
  - 'spec/jobs/content_depositor_change_event_job_spec.rb'
66
+ - 'spec/jobs/change_depositor_event_job_spec.rb'
66
67
  - 'spec/jobs/content_deposit_event_job_spec.rb'
67
68
  - 'spec/jobs/content_delete_event_job_spec.rb'
68
69
  - 'spec/jobs/ingest_file_job_spec.rb'
@@ -100,7 +101,6 @@ RSpec/SubjectStub:
100
101
  - 'spec/models/hyrax/operation_spec.rb'
101
102
  - 'spec/controllers/hyrax/accepts_batches_controller_spec.rb'
102
103
  - 'spec/indexers/hyrax/repository_reindexer_spec.rb'
103
- - 'spec/jobs/content_depositor_change_event_job_spec.rb'
104
104
  - 'spec/lib/hyrax/analytics_spec.rb'
105
105
  - 'spec/models/job_io_wrapper_spec.rb'
106
106
  - 'spec/search_builders/hyrax/abstract_type_relation_spec.rb'
@@ -114,6 +114,8 @@ RSpec/AnyInstance:
114
114
  - 'spec/controllers/hyrax/batch_edits_controller_spec.rb'
115
115
  - 'spec/controllers/hyrax/stats_controller_spec.rb'
116
116
  - 'spec/controllers/hyrax/users_controller_spec.rb'
117
+ - 'spec/hyrax/transactions/steps/delete_access_control_spec.rb'
118
+ - 'spec/hyrax/transactions/steps/save_access_control_spec.rb'
117
119
  - 'spec/jobs/content_restored_version_event_job_spec.rb'
118
120
  - 'spec/jobs/file_set_attached_event_job_spec.rb'
119
121
  - 'spec/jobs/hyrax/grant_edit_to_members_job_spec.rb'
@@ -169,14 +171,31 @@ RSpec/RepeatedDescription:
169
171
  - 'spec/models/sipity/workflow_state_action_spec.rb'
170
172
  - 'spec/models/sipity/workflow_state_spec.rb'
171
173
 
172
- # Offense count: 1
174
+ # Offense count: 2
173
175
  # Configuration parameters: Include.
174
176
  # Include: app/models/**/*.rb
175
177
  Rails/HasManyOrHasOneDependent:
176
178
  Exclude:
177
179
  - 'app/models/admin_set.rb'
180
+ - 'app/models/hyrax/permission_template.rb'
178
181
 
179
182
  # Offense count: 1
180
- Style/MethodMissingSuper:
183
+ Rails/SkipsModelValidations:
184
+ Exclude:
185
+ - 'app/services/hyrax/works/migration_service.rb'
186
+
187
+ # Offense count: 12
188
+ Lint/MissingSuper:
181
189
  Exclude:
190
+ - 'app/actors/hyrax/actors/interpret_visibility_actor.rb'
191
+ - 'app/actors/hyrax/actors/ordered_members_actor.rb'
182
192
  - 'app/models/concerns/hyrax/file_set/characterization.rb'
193
+ - 'app/presenters/hyrax/file_usage.rb'
194
+ - 'app/presenters/hyrax/work_usage.rb'
195
+ - 'app/services/hyrax/batch_create_failure_service.rb'
196
+ - 'app/services/hyrax/batch_create_success_service.rb'
197
+ - 'app/services/hyrax/collection_types/create_service.rb'
198
+ - 'app/services/hyrax/solr_query_service.rb'
199
+ - 'lib/hyrax/form_fields.rb'
200
+ - 'lib/hyrax/health_checks/solr_check.rb'
201
+ - 'lib/hyrax/schema.rb'
data/CONTAINERS.md CHANGED
@@ -143,28 +143,32 @@ _This is for applications that mount Hyrax and is separate from the docker conta
143
143
 
144
144
  ### Maintaining
145
145
 
146
- We publish several Hyrax images to hub.docker.com under the
147
- [`samveralabs` group][dockerhub-samveralabs]. To build them, do:
146
+ We publish several Hyrax images to the [GitHub container registry][ghcr] under
147
+ the [Samvera organization][samvera-packages]. To build them:
148
148
 
149
149
  ```sh
150
- # build an image for an app using Postgresql (`gem 'pg'`)
151
- docker build --target hyrax --tag samveralabs/hyrax:(git rev-parse HEAD) .
152
- docker push samveralabs/hyrax:(git rev-parse HEAD)
150
+ export HYRAX_VERSION=v3.4.1 # or desired version
151
+ git checkout $HYRAX_VERSION
153
152
 
154
- # or; build a development image with sqlite
155
- docker build --target hyrax --tag samveralabs/hyrax:(git rev-parse HEAD)-sqlite --build-arg DATABASE_APK_PACKAGE="sqlite" .
156
- docker push samveralabs/hyrax:(git rev-parse HEAD)-sqlite
153
+ docker build --target hyrax-base --tag ghcr.io/samvera/hyrax/hyrax-base:$(git rev-parse HEAD) .
154
+
155
+ docker tag ghcr.io/samvera/hyrax/hyrax-base:$(git rev-parse HEAD) ghcr.io/samvera/hyrax/hyrax-base:$HYRAX_VERSION
156
+
157
+ docker push ghcr.io/samvera/hyrax/hyrax-base:$(git rev-parse HEAD)
158
+ docker push ghcr.io/samvera/hyrax/hyrax-base:$HYRAX_VERSION
157
159
  ```
158
160
 
161
+ Do the same for `hyrax-worker-base`.
162
+
159
163
  We also publish an image for the stable test application `dassie`:
160
164
 
161
165
  ```sh
162
- docker build --target hyrax-engine-dev --tag samveralabs/dassie:(git rev-parse HEAD) .
166
+ docker build --target hyrax-engine-dev --tag ghcr.io/samvera/hyrax/dassie:$(git rev-parse HEAD) .
163
167
 
164
- docker tag samveralabs/dassie:(git rev-parse HEAD) samveralabs/dassie:$HYRAX_VERSION
168
+ docker tag ghcr.io/samvera/hyrax/dassie:$(git rev-parse HEAD) ghcr.io/samvera/hyrax/dassie:$HYRAX_VERSION
165
169
 
166
- docker push samveralabs/dassie:(git rev-parse HEAD)
167
- docker push samveralabs/dassie:$HYRAX_VERSION
170
+ docker push ghcr.io/samvera/hyrax/dassie:$(git rev-parse HEAD)
171
+ docker push ghcr.io/samvera/hyrax/dassie:$HYRAX_VERSION
168
172
  ```
169
173
 
170
174
  ## Deploying to Production
@@ -180,4 +184,5 @@ helm dependency update chart/hyrax
180
184
  helm install -n hyrax --set image.tag=(git rev-parse HEAD) dassie chart/hyrax
181
185
  ```
182
186
 
183
- [dockerhub-samveralabs]: https://hub.docker.com/r/samveralabs
187
+ [ghcr]: https://docs.github.com/en/enterprise-cloud@latest/packages/working-with-a-github-packages-registry/working-with-the-container-registry
188
+ [samvera-packages]: https://github.com/orgs/samvera/packages
data/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
- ARG RUBY_VERSION=2.7.4
2
- FROM ruby:$RUBY_VERSION-alpine3.14 as hyrax-base
1
+ ARG RUBY_VERSION=2.7.5
2
+ FROM ruby:$RUBY_VERSION-alpine3.15 as hyrax-base
3
3
 
4
4
  ARG DATABASE_APK_PACKAGE="postgresql-dev"
5
5
  ARG EXTRA_APK_PACKAGES="git"
@@ -7,6 +7,7 @@ ARG EXTRA_APK_PACKAGES="git"
7
7
  RUN apk --no-cache upgrade && \
8
8
  apk --no-cache add build-base \
9
9
  curl \
10
+ gcompat \
10
11
  imagemagick \
11
12
  tzdata \
12
13
  nodejs \
@@ -57,7 +58,7 @@ USER app
57
58
 
58
59
  RUN mkdir -p /app/fits && \
59
60
  cd /app/fits && \
60
- wget https://github.com/harvard-lts/fits/releases/download/1.5.0/fits-1.5.0.zip -O fits.zip && \
61
+ wget https://github.com/harvard-lts/fits/releases/download/1.5.1/fits-1.5.1.zip -O fits.zip && \
61
62
  unzip fits.zip && \
62
63
  rm fits.zip && \
63
64
  chmod a+x /app/fits/fits.sh
@@ -76,6 +76,8 @@ module Hyrax
76
76
  end
77
77
 
78
78
  def perform_ingest_file_through_valkyrie(io) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
79
+ Deprecation.warn "FileActor support for Valkyrie was experimental and " \
80
+ "is slated to be removed in favor of WorkUploadsHandler."
79
81
  file =
80
82
  begin
81
83
  Hyrax.storage_adapter.upload(resource: file_set, file: io, original_filename: io.original_name, use: relation)
@@ -85,12 +87,12 @@ module Hyrax
85
87
  end
86
88
  file_metadata = Hyrax.custom_queries.find_file_metadata_by(id: file.id)
87
89
  create_version(file_metadata, user)
88
- id = file_metadata.file_identifier
89
- file_set.file_ids << id
90
- file_set.original_file_id = id
90
+
91
+ file_set.file_ids << file_metadata.id
92
+ file_set.original_file_id = file_metadata.id
91
93
  Hyrax.persister.save(resource: file_set)
92
94
  Hyrax.publisher.publish('object.metadata.updated', object: file_set, user: user)
93
- CharacterizeJob.perform_later(file_set, id.to_s, pathhint(io))
95
+ CharacterizeJob.perform_later(file_set, file_metadata.id.to_s, pathhint(io))
94
96
  file_metadata
95
97
  end
96
98
 
@@ -1,17 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
  module Hyrax
3
3
  module Actors
4
- ##
5
- # @deprecated transfer requests are now carried out in response to published
6
- # 'object.deposited' events.
7
- #
8
4
  # Notify the provided owner that their proxy wants to make a
9
5
  # deposit on their behalf
10
6
  class TransferRequestActor < AbstractActor
11
7
  # @param [Hyrax::Actors::Environment] env
12
8
  # @return [Boolean] true if create was successful
13
9
  def create(env)
14
- Deprecation.warn('Use Hyrax::Listeners::ProxyDepositListener instead.')
15
10
  next_actor.create(env) && create_proxy_deposit_request(env)
16
11
  end
17
12
 
@@ -20,8 +15,9 @@ module Hyrax
20
15
  def create_proxy_deposit_request(env)
21
16
  proxy = env.curation_concern.on_behalf_of
22
17
  return true if proxy.blank?
23
- ContentDepositorChangeEventJob.perform_later(env.curation_concern,
24
- ::User.find_by_user_key(proxy))
18
+ work = env.curation_concern
19
+ user = ::User.find_by_user_key(proxy)
20
+ Hyrax::ChangeDepositorService.call(work, user, false)
25
21
  true
26
22
  end
27
23
  end