hyrax 3.0.0.pre.rc4 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +41 -8
  3. data/.dassie/Gemfile +10 -5
  4. data/.dassie/config/cable.yml +1 -1
  5. data/.dassie/config/environments/development.rb +2 -0
  6. data/.dassie/config/environments/production.rb +1 -1
  7. data/.dassie/config/initializers/hyrax.rb +5 -0
  8. data/.dassie/config/initializers/riiif.rb +22 -20
  9. data/.dassie/config/redis.yml +1 -0
  10. data/.dassie/config/role_map.yml +2 -0
  11. data/.dassie/db/seeds.rb +9 -1
  12. data/.dassie/package.json +3 -5
  13. data/.dockerignore +4 -0
  14. data/.env +1 -2
  15. data/.rubocop.yml +4 -0
  16. data/CONTAINERS.md +21 -1
  17. data/Dockerfile +46 -17
  18. data/Gemfile +21 -27
  19. data/app/actors/hyrax/actors/base_actor.rb +1 -1
  20. data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +89 -41
  21. data/app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb +7 -42
  22. data/app/actors/hyrax/actors/file_actor.rb +4 -2
  23. data/app/actors/hyrax/actors/file_set_actor.rb +18 -11
  24. data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +20 -8
  25. data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +21 -9
  26. data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +14 -5
  27. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +38 -8
  28. data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +0 -4
  29. data/app/controllers/hyrax/admin/workflows_controller.rb +8 -2
  30. data/app/controllers/hyrax/dashboard/collection_members_controller.rb +13 -9
  31. data/app/controllers/hyrax/dashboard/collections_controller.rb +14 -14
  32. data/app/controllers/hyrax/file_sets_controller.rb +49 -13
  33. data/app/controllers/hyrax/permissions_controller.rb +3 -4
  34. data/app/controllers/hyrax/workflow_actions_controller.rb +3 -1
  35. data/app/forms/hyrax/forms/collection_form.rb +12 -6
  36. data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +24 -2
  37. data/app/forms/hyrax/forms/file_set_form.rb +46 -0
  38. data/app/forms/hyrax/forms/permission.rb +23 -0
  39. data/app/forms/hyrax/forms/permission_template_form.rb +8 -2
  40. data/app/forms/hyrax/forms/resource_form.rb +31 -13
  41. data/app/forms/hyrax/forms/work_form.rb +5 -2
  42. data/app/helpers/hyrax/batch_edits_helper.rb +3 -1
  43. data/app/helpers/hyrax/collections_helper.rb +88 -2
  44. data/app/helpers/hyrax/dashboard_helper_behavior.rb +16 -5
  45. data/app/helpers/hyrax/embargo_helper.rb +4 -0
  46. data/app/helpers/hyrax/file_set_helper.rb +25 -6
  47. data/app/helpers/hyrax/hyrax_helper_behavior.rb +8 -0
  48. data/app/helpers/hyrax/lease_helper.rb +4 -0
  49. data/app/helpers/hyrax/url_helper.rb +4 -1
  50. data/app/helpers/hyrax/work_form_helper.rb +53 -0
  51. data/app/indexers/hyrax/administrative_set_indexer.rb +18 -0
  52. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +118 -0
  53. data/app/indexers/hyrax/valkyrie_indexer.rb +10 -4
  54. data/app/indexers/hyrax/valkyrie_work_indexer.rb +3 -1
  55. data/app/inputs/controlled_vocabulary_input.rb +2 -5
  56. data/app/jobs/attach_files_to_work_job.rb +19 -10
  57. data/app/jobs/attach_files_to_work_with_ordered_members_job.rb +6 -5
  58. data/app/jobs/embargo_expiry_job.rb +7 -5
  59. data/app/jobs/file_set_attached_event_job.rb +6 -1
  60. data/app/jobs/ingest_local_file_job.rb +18 -2
  61. data/app/jobs/inherit_permissions_job.rb +9 -5
  62. data/app/jobs/lease_expiry_job.rb +6 -4
  63. data/app/models/admin_set.rb +6 -25
  64. data/app/models/collection_branding_info.rb +25 -9
  65. data/app/models/concerns/hyrax/ability.rb +14 -1
  66. data/app/models/concerns/hyrax/collection_behavior.rb +17 -44
  67. data/app/models/concerns/hyrax/embargoable.rb +24 -0
  68. data/app/models/concerns/hyrax/file_set/characterization.rb +18 -12
  69. data/app/models/concerns/hyrax/solr_document_behavior.rb +9 -46
  70. data/app/models/concerns/hyrax/suppressible.rb +5 -0
  71. data/app/models/concerns/hyrax/user.rb +9 -3
  72. data/app/models/concerns/hyrax/work_behavior.rb +1 -1
  73. data/app/models/hyrax/file_set.rb +7 -0
  74. data/app/models/hyrax/pcdm_collection.rb +1 -0
  75. data/app/models/hyrax/permission_template.rb +98 -12
  76. data/app/models/hyrax/virus_scanner.rb +27 -18
  77. data/app/models/hyrax/work.rb +2 -0
  78. data/app/models/job_io_wrapper.rb +1 -1
  79. data/app/models/sipity/agent.rb +1 -0
  80. data/app/models/sipity/entity.rb +30 -8
  81. data/app/models/sipity/workflow.rb +1 -0
  82. data/app/models/sipity.rb +42 -0
  83. data/app/presenters/hyrax/admin_set_options_presenter.rb +12 -8
  84. data/app/presenters/hyrax/admin_set_presenter.rb +5 -1
  85. data/app/presenters/hyrax/admin_set_selection_presenter.rb +116 -0
  86. data/app/presenters/hyrax/collection_presenter.rb +41 -20
  87. data/app/presenters/hyrax/file_set_presenter.rb +6 -1
  88. data/app/presenters/hyrax/file_usage.rb +3 -2
  89. data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +119 -0
  90. data/app/presenters/hyrax/stats_usage_presenter.rb +2 -1
  91. data/app/presenters/hyrax/trophy_presenter.rb +33 -4
  92. data/app/presenters/hyrax/user_profile_presenter.rb +11 -1
  93. data/app/presenters/hyrax/version_list_presenter.rb +19 -0
  94. data/app/presenters/hyrax/version_presenter.rb +3 -2
  95. data/app/presenters/hyrax/work_show_presenter.rb +30 -5
  96. data/app/presenters/hyrax/work_usage.rb +5 -3
  97. data/app/renderers/hyrax/renderers/attribute_renderer.rb +10 -2
  98. data/app/search_builders/hyrax/admin_set_search_builder.rb +1 -1
  99. data/app/search_builders/hyrax/collection_member_search_builder.rb +6 -1
  100. data/app/search_builders/hyrax/my/collections_search_builder.rb +2 -2
  101. data/app/search_builders/hyrax/nested_collections_parent_search_builder.rb +1 -1
  102. data/app/search_builders/hyrax/single_collection_search_builder.rb +1 -1
  103. data/app/services/hyrax/access_control_list.rb +1 -1
  104. data/app/services/hyrax/adapters/nesting_index_adapter.rb +1 -1
  105. data/app/services/hyrax/admin_set_create_service.rb +3 -1
  106. data/app/services/hyrax/collections/collection_member_search_service.rb +72 -0
  107. data/app/services/hyrax/collections/collection_member_service.rb +112 -27
  108. data/app/services/hyrax/collections/migration_service.rb +4 -2
  109. data/app/services/hyrax/collections/nested_collection_persistence_service.rb +12 -13
  110. data/app/services/hyrax/collections/nested_collection_query_service.rb +2 -0
  111. data/app/services/hyrax/collections/permissions_create_service.rb +6 -4
  112. data/app/services/hyrax/contextual_path.rb +24 -1
  113. data/app/services/hyrax/custom_queries/find_file_metadata.rb +7 -5
  114. data/app/services/hyrax/custom_queries/navigators/parent_collections_navigator.rb +46 -0
  115. data/app/services/hyrax/edit_permissions_service.rb +74 -41
  116. data/app/services/hyrax/embargo_manager.rb +1 -1
  117. data/app/services/hyrax/find_objects_via_solr_service.rb +31 -0
  118. data/app/services/hyrax/graph_exporter.rb +1 -1
  119. data/app/services/hyrax/listeners/member_cleanup_listener.rb +26 -0
  120. data/app/services/hyrax/listeners/metadata_index_listener.rb +18 -1
  121. data/app/services/hyrax/listeners/object_lifecycle_listener.rb +1 -1
  122. data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +17 -0
  123. data/app/services/hyrax/listeners.rb +2 -0
  124. data/app/services/hyrax/multiple_membership_checker.rb +53 -29
  125. data/app/services/hyrax/persist_derivatives.rb +3 -1
  126. data/app/services/hyrax/resource_status.rb +7 -0
  127. data/app/services/hyrax/search_service.rb +4 -2
  128. data/app/services/hyrax/solr_query_builder_service.rb +45 -8
  129. data/app/services/hyrax/solr_query_service.rb +224 -0
  130. data/app/services/hyrax/solr_service.rb +8 -1
  131. data/app/services/hyrax/statistics/depositors/summary.rb +2 -1
  132. data/app/services/hyrax/thumbnail_path_service.rb +1 -1
  133. data/app/services/hyrax/versioning_service.rb +1 -1
  134. data/app/services/hyrax/visibility_intention.rb +20 -2
  135. data/app/services/hyrax/visibility_propagator.rb +30 -1
  136. data/app/services/hyrax/work_uploads_handler.rb +22 -4
  137. data/app/services/hyrax/workflow/actionable_objects.rb +70 -0
  138. data/app/services/hyrax/workflow/object_in_workflow_decorator.rb +31 -0
  139. data/app/services/hyrax/workflow/status_list_service.rb +43 -13
  140. data/app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb +1 -1
  141. data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -1
  142. data/app/views/hyrax/base/_form_relationships.html.erb +1 -2
  143. data/app/views/hyrax/base/_form_rendering.html.erb +1 -1
  144. data/app/views/hyrax/base/_form_representative.html.erb +1 -1
  145. data/app/views/hyrax/base/_form_share.html.erb +1 -5
  146. data/app/views/hyrax/base/_form_thumbnail.html.erb +1 -1
  147. data/app/views/hyrax/base/_form_visibility_error.html.erb +2 -0
  148. data/app/views/hyrax/base/_guts4form.html.erb +3 -3
  149. data/app/views/hyrax/base/_representative_media.html.erb +1 -1
  150. data/app/views/hyrax/base/_show_actions.html.erb +2 -2
  151. data/app/views/hyrax/base/_work_button_row.html.erb +1 -1
  152. data/app/views/hyrax/base/_workflow_actions.html.erb +1 -1
  153. data/app/views/hyrax/batch_edits/edit.html.erb +2 -2
  154. data/app/views/hyrax/batch_uploads/_form.html.erb +1 -1
  155. data/app/views/hyrax/collections/_list_collections.html.erb +1 -1
  156. data/app/views/hyrax/collections/_search_form.html.erb +1 -1
  157. data/app/views/hyrax/collections/show.html.erb +1 -1
  158. data/app/views/hyrax/dashboard/collections/_form.html.erb +3 -3
  159. data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +1 -1
  160. data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
  161. data/app/views/hyrax/dashboard/collections/edit.html.erb +4 -2
  162. data/app/views/hyrax/dashboard/collections/new.html.erb +4 -2
  163. data/app/views/hyrax/dashboard/collections/show.html.erb +1 -1
  164. data/app/views/hyrax/file_sets/_actions.html.erb +10 -0
  165. data/app/views/hyrax/file_sets/edit.html.erb +1 -1
  166. data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
  167. data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
  168. data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
  169. data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +1 -1
  170. data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +1 -1
  171. data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
  172. data/app/views/hyrax/file_sets/show.html.erb +1 -1
  173. data/app/views/hyrax/my/_admin_set_action_menu.html.erb +0 -11
  174. data/app/views/hyrax/my/_collection_action_menu.html.erb +1 -2
  175. data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
  176. data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +3 -5
  177. data/app/views/hyrax/stats/file.html.erb +1 -1
  178. data/app/views/hyrax/stats/work.html.erb +1 -1
  179. data/app/views/hyrax/uploads/_js_templates.html.erb +4 -4
  180. data/app/views/hyrax/uploads/_js_templates_versioning.html.erb +4 -4
  181. data/app/views/hyrax/users/_contributions.html.erb +1 -1
  182. data/app/views/hyrax/users/_profile_tabs.html.erb +2 -2
  183. data/app/views/hyrax/users/_search_form.html.erb +1 -1
  184. data/app/views/hyrax/users/_user.html.erb +1 -1
  185. data/app/views/hyrax/users/_user_info.html.erb +9 -9
  186. data/bin/db-migrate-seed.sh +6 -2
  187. data/bin/hyrax-entrypoint.sh +0 -14
  188. data/bin/solrcloud-assign-configset.sh +35 -0
  189. data/bin/solrcloud-upload-configset.sh +42 -0
  190. data/chart/hyrax/Chart.yaml +12 -8
  191. data/chart/hyrax/README.md +94 -11
  192. data/chart/hyrax/templates/NOTES.txt +1 -1
  193. data/chart/hyrax/templates/_helpers.tpl +98 -0
  194. data/chart/hyrax/templates/branding-pvc.yaml +14 -0
  195. data/chart/hyrax/templates/configmap-env.yaml +21 -11
  196. data/chart/hyrax/templates/cron-embargo.yaml +24 -0
  197. data/chart/hyrax/templates/cron-lease.yaml +24 -0
  198. data/chart/hyrax/templates/deployment-worker.yaml +129 -0
  199. data/chart/hyrax/templates/deployment.yaml +125 -4
  200. data/chart/hyrax/templates/derivatives-pvc.yaml +14 -0
  201. data/chart/hyrax/templates/ingress.yaml +13 -4
  202. data/chart/hyrax/templates/secrets.yaml +12 -2
  203. data/chart/hyrax/templates/uploads-pvc.yaml +14 -0
  204. data/chart/hyrax/values.yaml +186 -2
  205. data/config/brakeman.ignore +2 -2
  206. data/config/features.rb +47 -43
  207. data/config/initializers/listeners.rb +4 -0
  208. data/config/initializers/valkryrie_storage.rb +7 -0
  209. data/config/locales/hyrax.de.yml +1 -1
  210. data/config/locales/hyrax.en.yml +1 -1
  211. data/config/locales/hyrax.es.yml +1 -1
  212. data/config/locales/hyrax.fr.yml +1 -1
  213. data/config/locales/hyrax.it.yml +1 -1
  214. data/config/locales/hyrax.pt-BR.yml +1 -1
  215. data/config/locales/hyrax.zh.yml +1 -1
  216. data/docker-compose.yml +39 -8
  217. data/documentation/developing-your-hyrax-based-app.md +4 -4
  218. data/documentation/legacyREADME.md +3 -3
  219. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +5 -0
  220. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +22 -20
  221. data/lib/hyrax/active_fedora_dummy_model.rb +62 -0
  222. data/lib/hyrax/configuration.rb +28 -0
  223. data/lib/hyrax/engine.rb +3 -1
  224. data/lib/hyrax/errors.rb +2 -0
  225. data/lib/hyrax/resource_name.rb +1 -0
  226. data/lib/hyrax/specs/capybara.rb +5 -3
  227. data/lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb +9 -0
  228. data/lib/hyrax/transactions/container.rb +32 -1
  229. data/lib/hyrax/transactions/file_set_destroy.rb +21 -0
  230. data/lib/hyrax/transactions/steps/add_file_sets.rb +3 -2
  231. data/lib/hyrax/transactions/steps/add_to_parent.rb +36 -0
  232. data/lib/hyrax/transactions/steps/delete_resource.rb +38 -0
  233. data/lib/hyrax/transactions/steps/destroy_work.rb +1 -0
  234. data/lib/hyrax/transactions/steps/remove_file_set_from_work.rb +47 -0
  235. data/lib/hyrax/transactions/work_create.rb +2 -1
  236. data/lib/hyrax/transactions/work_destroy.rb +20 -0
  237. data/lib/hyrax/valkyrie_can_can_adapter.rb +3 -0
  238. data/lib/hyrax/valkyrie_simple_path_generator.rb +20 -0
  239. data/lib/hyrax/version.rb +1 -1
  240. data/lib/hyrax.rb +9 -0
  241. data/lib/tasks/collection_type_global_id.rake +1 -1
  242. data/lib/tasks/embargo_lease.rake +27 -0
  243. data/lib/tasks/regenerate_derivatives.rake +12 -0
  244. data/lib/wings/active_fedora_converter/default_work.rb +19 -0
  245. data/lib/wings/attribute_transformer.rb +29 -19
  246. data/lib/wings/converter_value_mapper.rb +2 -2
  247. data/lib/wings/model_transformer.rb +21 -20
  248. data/lib/wings/orm_converter.rb +42 -23
  249. data/lib/wings/setup.rb +2 -0
  250. data/lib/wings/valkyrie/persister.rb +8 -5
  251. data/lib/wings/valkyrie/query_service.rb +96 -41
  252. data/lib/wings/valkyrie/storage.rb +56 -1
  253. data/lib/wings.rb +0 -21
  254. data/template.rb +1 -1
  255. metadata +41 -21
  256. data/chart/fcrepo/.gitignore +0 -2
  257. data/chart/fcrepo/.helmignore +0 -23
  258. data/chart/fcrepo/Chart.yaml +0 -11
  259. data/chart/fcrepo/README.md +0 -50
  260. data/chart/fcrepo/templates/NOTES.txt +0 -21
  261. data/chart/fcrepo/templates/_helpers.tpl +0 -68
  262. data/chart/fcrepo/templates/configmap-env.yaml +0 -19
  263. data/chart/fcrepo/templates/deployment.yaml +0 -109
  264. data/chart/fcrepo/templates/ingress.yaml +0 -41
  265. data/chart/fcrepo/templates/pvc.yaml +0 -20
  266. data/chart/fcrepo/templates/secret.yaml +0 -12
  267. data/chart/fcrepo/templates/service.yaml +0 -15
  268. data/chart/fcrepo/templates/serviceaccount.yaml +0 -12
  269. data/chart/fcrepo/templates/tests/test-connection.yaml +0 -15
  270. data/chart/fcrepo/values.yaml +0 -79
  271. data/chart/hyrax/templates/fcrepo-secret.yaml +0 -13
@@ -19,6 +19,7 @@ module Wings
19
19
  DEFAULT_CTYPE = 'application/octet-stream'
20
20
  LINK_HEADER = "<http://www.w3.org/ns/ldp#NonRDFSource>; rel=\"type\""
21
21
  FILES_PATH = 'files'
22
+ VERSIONS_SLUG = '/fcr:versions'
22
23
 
23
24
  attr_reader :sha1
24
25
 
@@ -27,6 +28,14 @@ module Wings
27
28
  super
28
29
  end
29
30
 
31
+ ##
32
+ # @param key [Symbol] the key for plugin behavior to check support for
33
+ #
34
+ # @return [Boolean] whether
35
+ def supports?(key)
36
+ key == :versions
37
+ end
38
+
30
39
  def upload(file:, original_filename:, resource:, content_type: DEFAULT_CTYPE, # rubocop:disable Metrics/ParameterLists
31
40
  resource_uri_transformer: default_resource_uri_transformer, use: Hydra::PCDM::Vocab::PCDMTerms.File,
32
41
  id_hint: 'original', **extra_arguments)
@@ -41,7 +50,49 @@ module Wings
41
50
  id_hint: id_hint, **extra_arguments)
42
51
  end
43
52
 
44
- find_by(id: ::Valkyrie::ID.new(id.to_s.sub(/^.+\/\//, PROTOCOL)))
53
+ find_by(id: cast_to_valkyrie_id(id))
54
+ end
55
+
56
+ ##
57
+ # @return [Enumerable<Version> ordered list of versions
58
+ def find_versions(id:)
59
+ response = connection.http.get(fedora_identifier(id: id) + VERSIONS_SLUG)
60
+ return [] if response.status == 404
61
+
62
+ reader = RDF::Reader.for(content_type: response.headers['content-type'])
63
+ version_graph = RDF::Graph.new << reader.new(response.body)
64
+
65
+ version_graph.query(predicate: RDF::Vocab::Fcrepo4.hasVersion).objects.map do |uri|
66
+ timestamp =
67
+ version_graph.query([uri, RDF::Vocab::Fcrepo4.created, :created])
68
+ .first_object
69
+ .object
70
+ Version.new(cast_to_valkyrie_id(uri.to_s), timestamp, self)
71
+ end.sort
72
+ end
73
+
74
+ ##
75
+ # abstractly, {Version} objects should have an {#id} and be orderable
76
+ # over {#<=>} (allowing e.g. `#sort` to define a consistent order---
77
+ # oldest to newest---for a collection of versions). the {#id} should be a
78
+ # globally unique identifier for the version.
79
+ #
80
+ # this implementation uses an orderable {#version_token}. in practice
81
+ # the token is the fcrepo created date for the version, as extracted from
82
+ # the versions graph.
83
+ Version = Struct.new(:id, :version_token, :adapter) do
84
+ include Comparable
85
+
86
+ ##
87
+ # @return [#read]
88
+ def io
89
+ adapter.find_by(id: id)
90
+ end
91
+
92
+ def <=>(other)
93
+ raise ArgumentError unless other.respond_to?(:version_token)
94
+ version_token <=> other.version_token
95
+ end
45
96
  end
46
97
 
47
98
  private
@@ -87,6 +138,10 @@ module Wings
87
138
 
88
139
  Hyrax.config.translate_id_to_uri.call(created_file.id)
89
140
  end
141
+
142
+ def cast_to_valkyrie_id(id)
143
+ ::Valkyrie::ID.new(id.to_s.sub(/^.+\/\//, PROTOCOL))
144
+ end
90
145
  end
91
146
  end
92
147
 
data/lib/wings.rb CHANGED
@@ -98,27 +98,6 @@ require 'wings/valkyrie/persister'
98
98
  require 'wings/valkyrie/storage'
99
99
  require 'wings/valkyrie/query_service'
100
100
 
101
- Hydra::AccessControl.send(:define_method, :valkyrie_resource) do
102
- attrs = attributes.symbolize_keys
103
- attrs[:new_record] = new_record?
104
- attrs[:created_at] = create_date
105
- attrs[:updated_at] = modified_date
106
-
107
- attrs[:permissions] = permissions.map do |permission|
108
- agent = permission.type == 'group' ? "group/#{permission.agent_name}" : permission.agent_name
109
-
110
- Hyrax::Permission.new(id: permission.id,
111
- mode: permission.access.to_sym,
112
- agent: agent,
113
- access_to: Valkyrie::ID.new(permission.access_to_id),
114
- new_record: permission.new_record?)
115
- end
116
-
117
- attrs[:access_to] = attrs[:permissions].find { |p| p.access_to&.id&.present? }&.access_to
118
-
119
- Hyrax::AccessControl.new(**attrs)
120
- end
121
-
122
101
  begin
123
102
  require 'wings/setup'
124
103
  rescue NameError, Hyrax::SimpleSchemaLoader::UndefinedSchemaError => err
data/template.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  # Hack for https://github.com/rails/rails/issues/35153
3
3
  gsub_file 'Gemfile', /^gem ["']sqlite3["']$/, 'gem "sqlite3", "~> 1.3.0"'
4
- gem 'hyrax', '3.0.0-rc4'
4
+ gem 'hyrax', '3.1.0'
5
5
  run 'bundle install'
6
6
  generate 'hyrax:install', '-f'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyrax
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre.rc4
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2021-03-11 00:00:00.000000000 Z
17
+ date: 2021-09-09 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails
@@ -1178,6 +1178,8 @@ executables:
1178
1178
  - db-migrate-seed.sh
1179
1179
  - db-wait.sh
1180
1180
  - hyrax-entrypoint.sh
1181
+ - solrcloud-assign-configset.sh
1182
+ - solrcloud-upload-configset.sh
1181
1183
  extensions: []
1182
1184
  extra_rdoc_files: []
1183
1185
  files:
@@ -1720,6 +1722,8 @@ files:
1720
1722
  - app/forms/hyrax/forms/failed_submission_form_wrapper.rb
1721
1723
  - app/forms/hyrax/forms/file_manager_form.rb
1722
1724
  - app/forms/hyrax/forms/file_set_edit_form.rb
1725
+ - app/forms/hyrax/forms/file_set_form.rb
1726
+ - app/forms/hyrax/forms/permission.rb
1723
1727
  - app/forms/hyrax/forms/permission_template_form.rb
1724
1728
  - app/forms/hyrax/forms/resource_form.rb
1725
1729
  - app/forms/hyrax/forms/widgets/admin_set_embargo_period.rb
@@ -1762,6 +1766,7 @@ files:
1762
1766
  - app/indexers/concerns/hyrax/indexes_basic_metadata.rb
1763
1767
  - app/indexers/concerns/hyrax/indexes_linked_metadata.rb
1764
1768
  - app/indexers/hyrax/admin_set_indexer.rb
1769
+ - app/indexers/hyrax/administrative_set_indexer.rb
1765
1770
  - app/indexers/hyrax/basic_metadata_indexer.rb
1766
1771
  - app/indexers/hyrax/collection_indexer.rb
1767
1772
  - app/indexers/hyrax/collection_with_basic_metadata_indexer.rb
@@ -1773,6 +1778,7 @@ files:
1773
1778
  - app/indexers/hyrax/repository_reindexer.rb
1774
1779
  - app/indexers/hyrax/resource_indexer.rb
1775
1780
  - app/indexers/hyrax/valkyrie_collection_indexer.rb
1781
+ - app/indexers/hyrax/valkyrie_file_set_indexer.rb
1776
1782
  - app/indexers/hyrax/valkyrie_indexer.rb
1777
1783
  - app/indexers/hyrax/valkyrie_work_indexer.rb
1778
1784
  - app/indexers/hyrax/visibility_indexer.rb
@@ -1832,6 +1838,7 @@ files:
1832
1838
  - app/models/concerns/hyrax/collection_behavior.rb
1833
1839
  - app/models/concerns/hyrax/collection_nesting.rb
1834
1840
  - app/models/concerns/hyrax/core_metadata.rb
1841
+ - app/models/concerns/hyrax/embargoable.rb
1835
1842
  - app/models/concerns/hyrax/file_set/belongs_to_works.rb
1836
1843
  - app/models/concerns/hyrax/file_set/characterization.rb
1837
1844
  - app/models/concerns/hyrax/file_set/derivatives.rb
@@ -1935,6 +1942,7 @@ files:
1935
1942
  - app/presenters/hyrax/admin/workflow_roles_presenter.rb
1936
1943
  - app/presenters/hyrax/admin_set_options_presenter.rb
1937
1944
  - app/presenters/hyrax/admin_set_presenter.rb
1945
+ - app/presenters/hyrax/admin_set_selection_presenter.rb
1938
1946
  - app/presenters/hyrax/admin_stats_presenter.rb
1939
1947
  - app/presenters/hyrax/characterization_behavior.rb
1940
1948
  - app/presenters/hyrax/collapsable_section_presenter.rb
@@ -1956,6 +1964,7 @@ files:
1956
1964
  - app/presenters/hyrax/model_icon.rb
1957
1965
  - app/presenters/hyrax/model_proxy.rb
1958
1966
  - app/presenters/hyrax/page_title_decorator.rb
1967
+ - app/presenters/hyrax/pcdm_member_presenter_factory.rb
1959
1968
  - app/presenters/hyrax/permission_badge.rb
1960
1969
  - app/presenters/hyrax/presenter_factory.rb
1961
1970
  - app/presenters/hyrax/presenter_renderer.rb
@@ -2047,6 +2056,7 @@ files:
2047
2056
  - app/services/hyrax/collection_thumbnail_path_service.rb
2048
2057
  - app/services/hyrax/collection_types/create_service.rb
2049
2058
  - app/services/hyrax/collection_types/permissions_service.rb
2059
+ - app/services/hyrax/collections/collection_member_search_service.rb
2050
2060
  - app/services/hyrax/collections/collection_member_service.rb
2051
2061
  - app/services/hyrax/collections/managed_collections_service.rb
2052
2062
  - app/services/hyrax/collections/migration_service.rb
@@ -2069,6 +2079,7 @@ files:
2069
2079
  - app/services/hyrax/custom_queries/navigators/child_works_navigator.rb
2070
2080
  - app/services/hyrax/custom_queries/navigators/collection_members.rb
2071
2081
  - app/services/hyrax/custom_queries/navigators/find_files.rb
2082
+ - app/services/hyrax/custom_queries/navigators/parent_collections_navigator.rb
2072
2083
  - app/services/hyrax/database_migrator.rb
2073
2084
  - app/services/hyrax/default_middleware_stack.rb
2074
2085
  - app/services/hyrax/derivative_path.rb
@@ -2082,6 +2093,7 @@ files:
2082
2093
  - app/services/hyrax/file_set_fixity_check_service.rb
2083
2094
  - app/services/hyrax/file_set_type_service.rb
2084
2095
  - app/services/hyrax/file_set_visibility_propagator.rb
2096
+ - app/services/hyrax/find_objects_via_solr_service.rb
2085
2097
  - app/services/hyrax/fixity/active_fedora_fixity_service.rb
2086
2098
  - app/services/hyrax/fixity/missing_content_error.rb
2087
2099
  - app/services/hyrax/fixity_check_failure_service.rb
@@ -2105,9 +2117,11 @@ files:
2105
2117
  - app/services/hyrax/listeners/batch_notification_listener.rb
2106
2118
  - app/services/hyrax/listeners/file_set_lifecycle_listener.rb
2107
2119
  - app/services/hyrax/listeners/file_set_lifecycle_notification_listener.rb
2120
+ - app/services/hyrax/listeners/member_cleanup_listener.rb
2108
2121
  - app/services/hyrax/listeners/metadata_index_listener.rb
2109
2122
  - app/services/hyrax/listeners/object_lifecycle_listener.rb
2110
2123
  - app/services/hyrax/listeners/proxy_deposit_listener.rb
2124
+ - app/services/hyrax/listeners/trophy_cleanup_listener.rb
2111
2125
  - app/services/hyrax/listeners/workflow_listener.rb
2112
2126
  - app/services/hyrax/local_file_service.rb
2113
2127
  - app/services/hyrax/lock_manager.rb
@@ -2133,6 +2147,7 @@ files:
2133
2147
  - app/services/hyrax/search_service.rb
2134
2148
  - app/services/hyrax/simple_schema_loader.rb
2135
2149
  - app/services/hyrax/solr_query_builder_service.rb
2150
+ - app/services/hyrax/solr_query_service.rb
2136
2151
  - app/services/hyrax/solr_service.rb
2137
2152
  - app/services/hyrax/statistics/collections/over_time.rb
2138
2153
  - app/services/hyrax/statistics/depositors/summary.rb
@@ -2164,6 +2179,7 @@ files:
2164
2179
  - app/services/hyrax/work_uploads_handler.rb
2165
2180
  - app/services/hyrax/workflow/abstract_notification.rb
2166
2181
  - app/services/hyrax/workflow/action_taken_service.rb
2182
+ - app/services/hyrax/workflow/actionable_objects.rb
2167
2183
  - app/services/hyrax/workflow/activate_object.rb
2168
2184
  - app/services/hyrax/workflow/changes_required_notification.rb
2169
2185
  - app/services/hyrax/workflow/deactivate_object.rb
@@ -2175,6 +2191,7 @@ files:
2175
2191
  - app/services/hyrax/workflow/notification_configuration_parameter.rb
2176
2192
  - app/services/hyrax/workflow/notification_generator.rb
2177
2193
  - app/services/hyrax/workflow/notification_service.rb
2194
+ - app/services/hyrax/workflow/object_in_workflow_decorator.rb
2178
2195
  - app/services/hyrax/workflow/pending_review_notification.rb
2179
2196
  - app/services/hyrax/workflow/permission_generator.rb
2180
2197
  - app/services/hyrax/workflow/permission_query.rb
@@ -2597,36 +2614,28 @@ files:
2597
2614
  - bin/db-migrate-seed.sh
2598
2615
  - bin/db-wait.sh
2599
2616
  - bin/hyrax-entrypoint.sh
2600
- - chart/fcrepo/.gitignore
2601
- - chart/fcrepo/.helmignore
2602
- - chart/fcrepo/Chart.yaml
2603
- - chart/fcrepo/README.md
2604
- - chart/fcrepo/templates/NOTES.txt
2605
- - chart/fcrepo/templates/_helpers.tpl
2606
- - chart/fcrepo/templates/configmap-env.yaml
2607
- - chart/fcrepo/templates/deployment.yaml
2608
- - chart/fcrepo/templates/ingress.yaml
2609
- - chart/fcrepo/templates/pvc.yaml
2610
- - chart/fcrepo/templates/secret.yaml
2611
- - chart/fcrepo/templates/service.yaml
2612
- - chart/fcrepo/templates/serviceaccount.yaml
2613
- - chart/fcrepo/templates/tests/test-connection.yaml
2614
- - chart/fcrepo/values.yaml
2617
+ - bin/solrcloud-assign-configset.sh
2618
+ - bin/solrcloud-upload-configset.sh
2615
2619
  - chart/hyrax/.gitignore
2616
2620
  - chart/hyrax/.helmignore
2617
2621
  - chart/hyrax/Chart.yaml
2618
2622
  - chart/hyrax/README.md
2619
2623
  - chart/hyrax/templates/NOTES.txt
2620
2624
  - chart/hyrax/templates/_helpers.tpl
2625
+ - chart/hyrax/templates/branding-pvc.yaml
2621
2626
  - chart/hyrax/templates/configmap-env.yaml
2627
+ - chart/hyrax/templates/cron-embargo.yaml
2628
+ - chart/hyrax/templates/cron-lease.yaml
2629
+ - chart/hyrax/templates/deployment-worker.yaml
2622
2630
  - chart/hyrax/templates/deployment.yaml
2623
- - chart/hyrax/templates/fcrepo-secret.yaml
2631
+ - chart/hyrax/templates/derivatives-pvc.yaml
2624
2632
  - chart/hyrax/templates/hpa.yaml
2625
2633
  - chart/hyrax/templates/ingress.yaml
2626
2634
  - chart/hyrax/templates/secrets.yaml
2627
2635
  - chart/hyrax/templates/service.yaml
2628
2636
  - chart/hyrax/templates/serviceaccount.yaml
2629
2637
  - chart/hyrax/templates/tests/test-connection.yaml
2638
+ - chart/hyrax/templates/uploads-pvc.yaml
2630
2639
  - chart/hyrax/values.yaml
2631
2640
  - config/brakeman.ignore
2632
2641
  - config/features.rb
@@ -2636,6 +2645,7 @@ files:
2636
2645
  - config/initializers/listeners.rb
2637
2646
  - config/initializers/nesting_indexer_initializer.rb
2638
2647
  - config/initializers/simple_form.rb
2648
+ - config/initializers/valkryrie_storage.rb
2639
2649
  - config/initializers/valkyrie_id_equality.rb
2640
2650
  - config/locales/hyrax.de.yml
2641
2651
  - config/locales/hyrax.en.yml
@@ -2798,6 +2808,7 @@ files:
2798
2808
  - lib/generators/hyrax/work_resource/templates/work_spec.rb.erb
2799
2809
  - lib/generators/hyrax/work_resource/work_resource_generator.rb
2800
2810
  - lib/hyrax.rb
2811
+ - lib/hyrax/active_fedora_dummy_model.rb
2801
2812
  - lib/hyrax/arkivo.rb
2802
2813
  - lib/hyrax/arkivo/actor.rb
2803
2814
  - lib/hyrax/arkivo/config.rb
@@ -2847,6 +2858,7 @@ files:
2847
2858
  - lib/hyrax/specs/shared_specs/identifiers.rb
2848
2859
  - lib/hyrax/specs/shared_specs/indexers.rb
2849
2860
  - lib/hyrax/specs/shared_specs/metadata.rb
2861
+ - lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb
2850
2862
  - lib/hyrax/specs/shared_specs/workflow_method.rb
2851
2863
  - lib/hyrax/specs/spy_listener.rb
2852
2864
  - lib/hyrax/transactions.rb
@@ -2854,14 +2866,18 @@ files:
2854
2866
  - lib/hyrax/transactions/container.rb
2855
2867
  - lib/hyrax/transactions/create_work.rb
2856
2868
  - lib/hyrax/transactions/destroy_work.rb
2869
+ - lib/hyrax/transactions/file_set_destroy.rb
2857
2870
  - lib/hyrax/transactions/steps/add_file_sets.rb
2858
2871
  - lib/hyrax/transactions/steps/add_to_collections.rb
2872
+ - lib/hyrax/transactions/steps/add_to_parent.rb
2859
2873
  - lib/hyrax/transactions/steps/apply_collection_permission_template.rb
2860
2874
  - lib/hyrax/transactions/steps/apply_permission_template.rb
2861
2875
  - lib/hyrax/transactions/steps/apply_visibility.rb
2876
+ - lib/hyrax/transactions/steps/delete_resource.rb
2862
2877
  - lib/hyrax/transactions/steps/destroy_work.rb
2863
2878
  - lib/hyrax/transactions/steps/ensure_admin_set.rb
2864
2879
  - lib/hyrax/transactions/steps/ensure_permission_template.rb
2880
+ - lib/hyrax/transactions/steps/remove_file_set_from_work.rb
2865
2881
  - lib/hyrax/transactions/steps/save.rb
2866
2882
  - lib/hyrax/transactions/steps/save_access_control.rb
2867
2883
  - lib/hyrax/transactions/steps/save_work.rb
@@ -2873,7 +2889,9 @@ files:
2873
2889
  - lib/hyrax/transactions/transaction.rb
2874
2890
  - lib/hyrax/transactions/update_work.rb
2875
2891
  - lib/hyrax/transactions/work_create.rb
2892
+ - lib/hyrax/transactions/work_destroy.rb
2876
2893
  - lib/hyrax/valkyrie_can_can_adapter.rb
2894
+ - lib/hyrax/valkyrie_simple_path_generator.rb
2877
2895
  - lib/hyrax/version.rb
2878
2896
  - lib/hyrax/zotero.rb
2879
2897
  - lib/hyrax/zotero/config.rb
@@ -2881,10 +2899,12 @@ files:
2881
2899
  - lib/tasks/controlled_vocabularies.rake
2882
2900
  - lib/tasks/default_admin_set.rake
2883
2901
  - lib/tasks/default_collection_type.rake
2902
+ - lib/tasks/embargo_lease.rake
2884
2903
  - lib/tasks/hyrax.rake
2885
2904
  - lib/tasks/hyrax_user.rake
2886
2905
  - lib/tasks/install.rake
2887
2906
  - lib/tasks/migrate.rake
2907
+ - lib/tasks/regenerate_derivatives.rake
2888
2908
  - lib/tasks/reindex.rake
2889
2909
  - lib/tasks/stats_tasks.rake
2890
2910
  - lib/tasks/universal_viewer.rake
@@ -2954,11 +2974,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
2954
2974
  version: '2.5'
2955
2975
  required_rubygems_version: !ruby/object:Gem::Requirement
2956
2976
  requirements:
2957
- - - ">"
2977
+ - - ">="
2958
2978
  - !ruby/object:Gem::Version
2959
- version: 1.3.1
2979
+ version: '0'
2960
2980
  requirements: []
2961
- rubygems_version: 3.1.4
2981
+ rubygems_version: 3.1.6
2962
2982
  signing_key:
2963
2983
  specification_version: 4
2964
2984
  summary: Hyrax is a front-end based on the robust Samvera framework, providing a user
@@ -1,2 +0,0 @@
1
- charts/*
2
- Chart.lock
@@ -1,23 +0,0 @@
1
- # Patterns to ignore when building packages.
2
- # This supports shell glob matching, relative path matching, and
3
- # negation (prefixed with !). Only one pattern per line.
4
- .DS_Store
5
- # Common VCS dirs
6
- .git/
7
- .gitignore
8
- .bzr/
9
- .bzrignore
10
- .hg/
11
- .hgignore
12
- .svn/
13
- # Common backup files
14
- *.swp
15
- *.bak
16
- *.tmp
17
- *.orig
18
- *~
19
- # Various IDEs
20
- .project
21
- .idea/
22
- *.tmproj
23
- .vscode/
@@ -1,11 +0,0 @@
1
- apiVersion: v2
2
- name: fcrepo
3
- description: Fedora Commons Repository 4
4
- type: application
5
- version: 0.4.1
6
- appVersion: 4.7
7
- dependencies:
8
- - name: postgresql
9
- version: 9.3.3
10
- repository: https://charts.bitnami.com/bitnami
11
- condition: postgresql.enabled
@@ -1,50 +0,0 @@
1
- Fedora Commons Helm Chart
2
- =========================
3
-
4
- Fedora is the flexible, modular, open source repository platform with native
5
- linked data support.
6
-
7
- ## Installation
8
-
9
- ```sh
10
- helm dep up chart/fcrepo
11
- helm install fcrepo chart/fcrepo
12
- ```
13
-
14
- ## Configuration
15
-
16
- By default, this chart deploys with Postgresql as the backend for Fedora.
17
- Without other configuration, it will deploy a new Postgresql instance/database
18
- as a service available to the `fcrepo` deployment.
19
-
20
- In practice, users may want to forego installing postgres for two reasons:
21
-
22
- _First_, when you are deploying Fedora into a more complex application
23
- environment you may wish to reuse an existing Postgres instance already
24
- maintained with that environment.
25
-
26
- In this case, `fcrepo` should be deployed with postgresql explictly disabled, an
27
- `exernalDatabaseUsername`, and an `fcrepoSecretName`. `fcrepoSecretName` must
28
- correspond to an existing secret providing `DATABASE_PASSWORD`, `DATABASE_HOST`,
29
- and `JAVA_OPTS`.
30
-
31
- Optionally, a `externalDatabaseName` may be given to avoid collissions in the
32
- case that the default `fcrepo` is not an acceptable database name.
33
-
34
- This is usually done in the context of a parent chart which provides the postgresql instance, for example:
35
-
36
- ```yaml
37
- fcrepo:
38
- enabled: true
39
- fcrepoSecretName: "mychart.fcrepo.fullname"
40
- externalDatabaseUsername: "mydbuser"
41
- servicePort: 8080
42
- postgresql:
43
- enabled: false
44
- ```
45
-
46
- _Second_, because they want to use another backend for Fedora. This use case is broadly unsupported here. In theory, you can get a default (Infinispan) configuration by setting `postgresql.enabled` to `false`. **THIS CONFIGURATION IS UNTESTED AND UNSUPPORTED**:
47
-
48
- ```sh
49
- helm install --set postgresql.enabled=false fcrepo-test chart/fcrepo
50
- ```