hyrax 4.0.0 → 5.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (286) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +124 -232
  3. data/.dassie/.env +8 -2
  4. data/.dassie/Gemfile +27 -42
  5. data/.dassie/Gemfile.dassie +2 -0
  6. data/.dassie/app/assets/config/manifest.js +2 -0
  7. data/.dassie/app/assets/stylesheets/hyrax.scss +1 -0
  8. data/.dassie/config/environments/test.rb +1 -0
  9. data/.dassie/config/initializers/hyrax.rb +3 -1
  10. data/.dassie/config/initializers/riiif.rb +11 -7
  11. data/.dassie/config/metadata/collection_resource.yaml +3 -0
  12. data/.dassie/config/metadata/monograph.yaml +8 -0
  13. data/.dassie/config/metadata/sample_metadata.yaml +1 -0
  14. data/.dassie/config/redis.yml +2 -0
  15. data/.dassie/db/migrate/20230725222727_create_hyrax_counter_metrics.hyrax.rb +14 -0
  16. data/.dassie/db/migrate/20230803165135_change_work_id_to_string.rb +5 -0
  17. data/.dassie/db/migrate/20230808102105_add_indices_to_hyrax_counter_metrics.hyrax.rb +8 -0
  18. data/.dassie/db/migrate/20230821153635_add_fields_to_counter_metric.rb +8 -0
  19. data/.dassie/db/schema.rb +22 -3
  20. data/.dockerignore +7 -0
  21. data/.github/PULL_REQUEST_TEMPLATE.md +10 -7
  22. data/.github/release.yml +5 -2
  23. data/.gitignore +1 -1
  24. data/.koppie/.env +13 -4
  25. data/.koppie/Gemfile +10 -12
  26. data/.koppie/Gemfile.koppie +2 -0
  27. data/.koppie/Rakefile +0 -2
  28. data/.koppie/app/models/ability.rb +1 -5
  29. data/.koppie/app/models/user.rb +0 -2
  30. data/.koppie/config/application.rb +2 -1
  31. data/.koppie/config/arkivo.yml +6 -0
  32. data/.koppie/config/blacklight.yml +2 -2
  33. data/.koppie/config/environments/test.rb +1 -0
  34. data/.koppie/config/features.yml +2 -0
  35. data/.koppie/config/initializers/1_valkyrie.rb +29 -6
  36. data/.koppie/config/initializers/arkivo_constraint.rb +12 -0
  37. data/.koppie/config/initializers/hyrax.rb +10 -4
  38. data/.koppie/config/initializers/riiif.rb +11 -7
  39. data/.koppie/config/metadata/collection_resource.yaml +49 -0
  40. data/.koppie/config/metadata/generic_work.yaml +2 -0
  41. data/.koppie/config/metadata/monograph.yaml +10 -0
  42. data/.koppie/config/role_map.yml +3 -25
  43. data/.koppie/config/routes.rb +1 -2
  44. data/.koppie/config/solr.yml +1 -1
  45. data/.koppie/config/valkyrie_index.yml +4 -10
  46. data/.koppie/config/zotero.yml +6 -0
  47. data/.koppie/db/migrate/20230725222727_create_hyrax_counter_metrics.hyrax.rb +14 -0
  48. data/.koppie/db/migrate/20230803165135_change_work_id_to_string.rb +5 -0
  49. data/.koppie/db/schema.rb +12 -1
  50. data/.koppie/yarn.lock +23 -23
  51. data/.regen +1 -1
  52. data/CONTAINERS.md +1 -3
  53. data/Dockerfile +17 -13
  54. data/Gemfile +4 -21
  55. data/Gemfile.dassie +2 -0
  56. data/Gemfile.koppie +2 -0
  57. data/README.md +0 -1
  58. data/Rakefile +0 -11
  59. data/app/actors/hyrax/actors/base_actor.rb +4 -3
  60. data/app/actors/hyrax/actors/embargo_actor.rb +3 -3
  61. data/app/actors/hyrax/actors/lease_actor.rb +5 -2
  62. data/app/assets/javascripts/hyrax/batch_select_all.js +1 -1
  63. data/app/assets/javascripts/hyrax/file_manager/member.es6 +1 -1
  64. data/app/assets/javascripts/hyrax/file_manager/sorting.es6 +3 -2
  65. data/app/assets/stylesheets/hyrax/_file-listing.scss +0 -2
  66. data/app/assets/stylesheets/hyrax/_work-show.scss +19 -3
  67. data/app/assets/stylesheets/hyrax/sidebar.scss +23 -0
  68. data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +8 -2
  69. data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +7 -1
  70. data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +79 -0
  71. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +64 -14
  72. data/app/controllers/hyrax/admin/workflows_controller.rb +48 -3
  73. data/app/controllers/hyrax/api/items_controller.rb +2 -3
  74. data/app/controllers/hyrax/batch_edits_controller.rb +39 -10
  75. data/app/controllers/hyrax/batch_uploads_controller.rb +5 -1
  76. data/app/controllers/hyrax/dashboard/collections_controller.rb +4 -1
  77. data/app/controllers/hyrax/downloads_controller.rb +8 -1
  78. data/app/controllers/hyrax/file_sets_controller.rb +50 -6
  79. data/app/controllers/hyrax/my/collections_controller.rb +2 -0
  80. data/app/controllers/hyrax/single_use_links_viewer_controller.rb +16 -2
  81. data/app/forms/concerns/hyrax/basic_metadata_form_fields_behavior.rb +38 -0
  82. data/app/forms/hyrax/forms/collection_form.rb +0 -15
  83. data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +0 -34
  84. data/app/forms/hyrax/forms/file_set_edit_form.rb +1 -1
  85. data/app/forms/hyrax/forms/file_set_form.rb +2 -2
  86. data/app/forms/hyrax/forms/pcdm_object_form.rb +21 -0
  87. data/app/forms/hyrax/forms/permission_template_form.rb +2 -7
  88. data/app/forms/hyrax/forms/resource_batch_edit_form.rb +118 -0
  89. data/app/forms/hyrax/forms/resource_form.rb +21 -34
  90. data/app/forms/hyrax/forms/work_embargo_form.rb +1 -0
  91. data/app/forms/hyrax/forms/work_form.rb +1 -1
  92. data/app/forms/hyrax/forms/work_lease_form.rb +1 -0
  93. data/app/helpers/hyrax/dashboard_helper_behavior.rb +30 -9
  94. data/app/helpers/hyrax/membership_helper.rb +13 -1
  95. data/app/helpers/hyrax/work_form_helper.rb +0 -107
  96. data/app/indexers/hyrax/file_set_indexer.rb +6 -0
  97. data/app/indexers/hyrax/location_indexer.rb +29 -0
  98. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +36 -5
  99. data/app/indexers/hyrax/valkyrie_work_indexer.rb +9 -2
  100. data/app/inputs/controlled_vocabulary_input.rb +1 -1
  101. data/app/jobs/characterize_job.rb +1 -1
  102. data/app/jobs/create_work_job.rb +36 -4
  103. data/app/jobs/valkyrie_characterization_job.rb +9 -0
  104. data/app/jobs/valkyrie_create_derivatives_job.rb +8 -7
  105. data/app/jobs/valkyrie_ingest_job.rb +1 -4
  106. data/app/models/admin_set.rb +1 -31
  107. data/app/models/collection_branding_info.rb +2 -9
  108. data/app/models/concerns/hyrax/ability.rb +2 -1
  109. data/app/models/concerns/hyrax/collection_behavior.rb +4 -12
  110. data/app/models/concerns/hyrax/file_set/derivatives.rb +3 -2
  111. data/app/models/concerns/hyrax/riiif_file.rb +30 -0
  112. data/app/models/concerns/hyrax/solr_document_behavior.rb +20 -3
  113. data/app/models/hyrax/collection_type.rb +5 -14
  114. data/app/models/hyrax/counter_metric.rb +7 -0
  115. data/app/models/hyrax/file_metadata.rb +9 -9
  116. data/app/models/hyrax/file_set.rb +76 -15
  117. data/app/models/hyrax/orcid_validator.rb +0 -6
  118. data/app/models/hyrax/resource.rb +30 -2
  119. data/app/models/hyrax/work.rb +2 -5
  120. data/app/presenters/hyrax/collection_presenter.rb +0 -17
  121. data/app/presenters/hyrax/embargo_presenter.rb +4 -0
  122. data/app/presenters/hyrax/file_set_presenter.rb +6 -0
  123. data/app/presenters/hyrax/iiif_manifest_presenter.rb +3 -7
  124. data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +6 -4
  125. data/app/presenters/hyrax/presenter_renderer.rb +0 -7
  126. data/app/presenters/hyrax/version_list_presenter.rb +19 -10
  127. data/app/presenters/hyrax/version_presenter.rb +19 -4
  128. data/app/presenters/hyrax/work_show_presenter.rb +6 -11
  129. data/app/search_builders/hyrax/file_set_search_builder.rb +1 -1
  130. data/app/search_builders/hyrax/valkyrie_abstract_type_relation.rb +37 -0
  131. data/app/search_builders/hyrax/valkyrie_work_relation.rb +9 -0
  132. data/app/services/hyrax/admin_set_create_service.rb +0 -17
  133. data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +16 -9
  134. data/app/services/hyrax/collections/collection_member_service.rb +1 -1
  135. data/app/services/hyrax/custom_queries/find_by_date_range.rb +55 -0
  136. data/app/services/hyrax/custom_queries/find_count_by.rb +62 -0
  137. data/app/services/hyrax/custom_queries/find_file_metadata.rb +1 -1
  138. data/app/services/hyrax/custom_queries/find_models_by_access.rb +59 -0
  139. data/app/services/hyrax/derivative_bucketed_storage.rb +25 -0
  140. data/app/services/hyrax/derivative_path.rb +14 -4
  141. data/app/services/hyrax/embargo_manager.rb +106 -13
  142. data/app/services/hyrax/embargo_service.rb +12 -10
  143. data/app/services/hyrax/file_set_derivatives_service.rb +14 -13
  144. data/app/services/hyrax/fixity_check_failure_service.rb +1 -1
  145. data/app/services/hyrax/identifier/dispatcher.rb +9 -2
  146. data/app/services/hyrax/lease_manager.rb +88 -8
  147. data/app/services/hyrax/listeners/file_metadata_listener.rb +16 -8
  148. data/app/services/hyrax/listeners/member_cleanup_listener.rb +2 -28
  149. data/app/services/hyrax/listeners/metadata_index_listener.rb +11 -0
  150. data/app/services/hyrax/listeners/workflow_listener.rb +8 -11
  151. data/app/services/hyrax/lock_manager.rb +1 -2
  152. data/app/services/hyrax/persist_directly_contained_output_file_service.rb +24 -2
  153. data/app/services/hyrax/riiif_file_resolver.rb +50 -0
  154. data/app/services/hyrax/simple_schema_loader.rb +31 -0
  155. data/app/services/hyrax/solr_query_service.rb +7 -6
  156. data/app/services/hyrax/statistics/depositors/summary.rb +1 -1
  157. data/app/services/hyrax/statistics/over_time.rb +1 -1
  158. data/app/services/hyrax/statistics/users/over_time.rb +3 -1
  159. data/app/services/hyrax/statistics/valkyrie_query_service.rb +49 -0
  160. data/app/services/hyrax/statistics/works/count.rb +1 -1
  161. data/app/services/hyrax/thumbnail_path_service.rb +5 -0
  162. data/app/services/hyrax/valkyrie_persist_derivatives.rb +16 -11
  163. data/app/services/hyrax/valkyrie_upload.rb +16 -28
  164. data/app/services/hyrax/versioning_service.rb +30 -15
  165. data/app/services/hyrax/visibility_intention.rb +1 -4
  166. data/app/services/hyrax/visibility_propagator.rb +1 -1
  167. data/app/services/hyrax/work_uploads_handler.rb +1 -1
  168. data/app/services/hyrax/workflow/actionable_objects.rb +28 -3
  169. data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +1 -1
  170. data/app/services/hyrax/workflow/grant_read_to_depositor.rb +1 -1
  171. data/app/services/hyrax/workflow/permission_query.rb +23 -2
  172. data/app/validators/hyrax/collection_membership_validator.rb +1 -1
  173. data/app/views/catalog/_search_form.html.erb +1 -1
  174. data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
  175. data/app/views/hyrax/admin/workflows/_tabs.html.erb +9 -0
  176. data/app/views/hyrax/admin/workflows/index.html.erb +53 -76
  177. data/app/views/hyrax/base/_file_manager_members.html.erb +2 -2
  178. data/app/views/hyrax/base/_file_manager_resource_form.html.erb +1 -1
  179. data/app/views/hyrax/base/_form.html.erb +0 -10
  180. data/app/views/hyrax/base/_form_permission_embargo.html.erb +1 -1
  181. data/app/views/hyrax/base/_form_permission_lease.html.erb +1 -1
  182. data/app/views/hyrax/base/_form_visibility_component.html.erb +4 -4
  183. data/app/views/hyrax/base/_items.html.erb +1 -1
  184. data/app/views/hyrax/base/_show_actions.html.erb +1 -1
  185. data/app/views/hyrax/base/_workflow_actions.html.erb +25 -23
  186. data/app/views/hyrax/base/file_manager.html.erb +1 -1
  187. data/app/views/hyrax/base/show.json.jbuilder +4 -3
  188. data/app/views/hyrax/collections/_show_document_list_row.html.erb +1 -1
  189. data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
  190. data/app/views/hyrax/dashboard/collections/_show_document_list_row.html.erb +1 -1
  191. data/app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb +3 -3
  192. data/app/views/hyrax/file_sets/_versioning.html.erb +5 -5
  193. data/app/views/hyrax/file_sets/media_display/_audio.html.erb +4 -4
  194. data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
  195. data/app/views/hyrax/file_sets/media_display/_video.html.erb +2 -2
  196. data/app/views/hyrax/file_sets/show.html.erb +5 -3
  197. data/app/views/hyrax/homepage/_explore_collections.html.erb +1 -1
  198. data/app/views/hyrax/my/_search_form.html.erb +1 -1
  199. data/app/views/hyrax/notifications/_notifications.html.erb +1 -1
  200. data/app/views/hyrax/users/_vitals.html.erb +1 -1
  201. data/bin/dev-entrypoint.sh +13 -0
  202. data/chart/hyrax/Chart.yaml +18 -14
  203. data/chart/hyrax/README.md +34 -21
  204. data/chart/hyrax/templates/_helpers.tpl +34 -1
  205. data/chart/hyrax/templates/configmap-env.yaml +12 -2
  206. data/chart/hyrax/templates/secrets.yaml +1 -1
  207. data/chart/hyrax/values.yaml +39 -14
  208. data/config/initializers/file_length_patch.rb +10 -0
  209. data/config/initializers/listeners.rb +4 -10
  210. data/config/initializers/storage_adapter_initializer.rb +1 -1
  211. data/config/locales/hyrax.en.yml +8 -0
  212. data/config/metadata/basic_metadata.yaml +52 -0
  213. data/config/metadata/core_metadata.yaml +4 -0
  214. data/config/metadata/file_set_metadata.yaml +20 -1
  215. data/config/metadata/hyrax_internal_metadata.yaml +57 -0
  216. data/docker-compose-koppie.yml +36 -22
  217. data/docker-compose-sirenia.yml +202 -0
  218. data/docker-compose.yml +42 -26
  219. data/documentation/developing-your-hyrax-based-app.md +6 -14
  220. data/documentation/legacyREADME.md +3 -1
  221. data/hyrax.gemspec +12 -13
  222. data/karma.conf.js +9 -10
  223. data/lib/generators/hyrax/collection_resource/templates/collection_metadata.yaml +2 -0
  224. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +1 -1
  225. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +11 -7
  226. data/lib/generators/hyrax/templates/db/migrate/20230725222727_create_hyrax_counter_metrics.rb.erb +14 -0
  227. data/lib/generators/hyrax/templates/db/migrate/20230803165135_change_work_id_to_string.rb.erb +5 -0
  228. data/lib/generators/hyrax/templates/db/migrate/20230808102105_add_indices_to_hyrax_counter_metrics.rb.erb +8 -0
  229. data/lib/generators/hyrax/templates/db/migrate/20230821153635_add_fields_to_counter_metric.rb.erb +8 -0
  230. data/lib/generators/hyrax/templates/db/seeds.rb +1 -1
  231. data/lib/generators/hyrax/work_resource/templates/form.rb.erb +1 -1
  232. data/lib/generators/hyrax/work_resource/templates/metadata.yaml +2 -0
  233. data/lib/hyrax/active_fedora_dummy_model.rb +6 -1
  234. data/lib/hyrax/configuration.rb +147 -43
  235. data/lib/hyrax/controlled_vocabularies/location.rb +7 -1
  236. data/lib/hyrax/engine.rb +2 -1
  237. data/lib/hyrax/form_fields.rb +6 -0
  238. data/lib/hyrax/publisher.rb +23 -3
  239. data/lib/hyrax/redis_event_store.rb +7 -8
  240. data/lib/hyrax/resource_name.rb +4 -0
  241. data/lib/hyrax/specs/capybara.rb +25 -37
  242. data/lib/hyrax/specs/shared_specs/hydra_works.rb +34 -7
  243. data/lib/hyrax/specs/shared_specs/indexers.rb +24 -6
  244. data/lib/hyrax/transactions/collection_destroy.rb +3 -2
  245. data/lib/hyrax/transactions/container.rb +47 -0
  246. data/lib/hyrax/transactions/file_metadata_destroy.rb +20 -0
  247. data/lib/hyrax/transactions/file_set_destroy.rb +3 -1
  248. data/lib/hyrax/transactions/file_set_update.rb +21 -0
  249. data/lib/hyrax/transactions/steps/add_file_sets.rb +6 -0
  250. data/lib/hyrax/transactions/steps/add_to_parent.rb +1 -1
  251. data/lib/hyrax/transactions/steps/apply_permission_template.rb +40 -0
  252. data/lib/hyrax/transactions/steps/delete_all_file_metadata.rb +46 -0
  253. data/lib/hyrax/transactions/steps/delete_all_file_sets.rb +46 -0
  254. data/lib/hyrax/transactions/steps/file_metadata_delete.rb +40 -0
  255. data/lib/hyrax/transactions/steps/remove_from_membership.rb +45 -0
  256. data/lib/hyrax/transactions/steps/save.rb +21 -0
  257. data/lib/hyrax/transactions/work_create.rb +1 -0
  258. data/lib/hyrax/transactions/work_destroy.rb +3 -2
  259. data/lib/hyrax/version.rb +1 -1
  260. data/lib/hyrax.rb +1 -0
  261. data/lib/tasks/collection_type_global_id.rake +9 -4
  262. data/lib/tasks/embargo_lease.rake +1 -0
  263. data/lib/valkyrie/indexing/solr/indexing_adapter.rb +2 -0
  264. data/lib/wings/active_fedora_converter/default_work.rb +7 -2
  265. data/lib/wings/active_fedora_converter/file_metadata_node.rb +1 -1
  266. data/lib/wings/active_fedora_converter.rb +53 -11
  267. data/lib/wings/attribute_transformer.rb +24 -17
  268. data/lib/wings/model_transformer.rb +23 -12
  269. data/lib/wings/orm_converter.rb +23 -18
  270. data/lib/wings/setup.rb +23 -3
  271. data/lib/wings/valkyrie/persister.rb +4 -2
  272. data/lib/wings/valkyrie/storage.rb +8 -90
  273. data/lib/wings.rb +5 -0
  274. data/package.json +3 -1
  275. data/tasks/hyrax_dev.rake +2 -33
  276. data/template.rb +1 -1
  277. metadata +104 -81
  278. data/.engine_cart.yml +0 -3
  279. data/app/forms/hyrax/forms/file_manager_form.rb +0 -35
  280. data/app/services/hyrax/collections/migration_service.rb +0 -113
  281. data/app/views/hyrax/base/_form_collections_error.html.erb +0 -1
  282. data/app/views/hyrax/base/_form_in_works_error.html.erb +0 -3
  283. data/app/views/hyrax/base/_form_ordered_members_error.html.erb +0 -3
  284. data/app/views/hyrax/base/_form_visibility_error.html.erb +0 -19
  285. data/app/views/hyrax/users/_user_util_links_extra.html.erb +0 -0
  286. data/lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb +0 -9
@@ -2,6 +2,8 @@
2
2
  # index key names, and form properties.
3
3
  #
4
4
  # Attributes must have a type but all other configuration options are optional.
5
+ # Please note: If using Valkyrie's Fedora Metadata Adapter, predicates for attributes
6
+ # must be placed here.
5
7
  #
6
8
  # attributes:
7
9
  # attribute_name:
@@ -27,6 +29,7 @@ attributes:
27
29
  primary: true
28
30
  index_keys:
29
31
  - "description_tesim"
32
+ predicate: http://purl.org/dc/elements/1.1/description
30
33
  creator:
31
34
  type: string
32
35
  multiple: true
@@ -35,26 +38,39 @@ attributes:
35
38
  primary: false
36
39
  index_keys:
37
40
  - "creator_tesim"
41
+ predicate: http://purl.org/dc/elements/1.1/creator
38
42
  rights_statement:
39
43
  type: string
40
44
  multiple: true
41
45
  form:
42
46
  primary: false
47
+ index_keys:
48
+ - "rights_statement_tesim"
49
+ predicate: http://www.europeana.eu/schemas/edm/rights
43
50
  abstract:
44
51
  type: string
45
52
  multiple: true
46
53
  form:
47
54
  primary: false
55
+ index_keys:
56
+ - "abstract_tesim"
57
+ predicate: http://purl.org/dc/terms/abstract
48
58
  access_right:
49
59
  type: string
50
60
  multiple: true
51
61
  form:
52
62
  primary: false
63
+ index_keys:
64
+ - "access_right_tesim"
65
+ predicate: http://purl.org/dc/terms/accessRights
53
66
  alternative_title:
54
67
  type: string
55
68
  multiple: true
56
69
  form:
57
70
  primary: false
71
+ index_keys:
72
+ - "alternative_title_tesim"
73
+ predicate: http://purl.org/dc/terms/alternative
58
74
  based_near:
59
75
  type: string
60
76
  multiple: true
@@ -63,14 +79,19 @@ attributes:
63
79
  index_keys:
64
80
  - "based_near_sim"
65
81
  - "based_near_tesim"
82
+ predicate: http://xmlns.com/foaf/0.1/based_near
66
83
  bibliographic_citation:
67
84
  type: string
68
85
  multiple: true
86
+ predicate: http://purl.org/dc/terms/bibliographicCitation
69
87
  contributor:
70
88
  type: string
71
89
  multiple: true
72
90
  form:
73
91
  primary: false
92
+ index_keys:
93
+ - "contributor_tesim"
94
+ predicate: http://purl.org/dc/elements/1.1/contributor
74
95
  date_created:
75
96
  type: date_time
76
97
  multiple: true
@@ -78,13 +99,18 @@ attributes:
78
99
  primary: false
79
100
  index_keys:
80
101
  - "date_created_tesim"
102
+ predicate: http://purl.org/dc/terms/created
81
103
  identifier:
82
104
  type: string
83
105
  multiple: true
84
106
  form:
85
107
  primary: false
108
+ index_keys:
109
+ - "identifier_tesim"
110
+ predicate: http://purl.org/dc/terms/identifier
86
111
  import_url:
87
112
  type: string
113
+ predicate: http://scholarsphere.psu.edu/ns#importUrl
88
114
  keyword:
89
115
  type: string
90
116
  multiple: true
@@ -93,27 +119,41 @@ attributes:
93
119
  - "keyword_tesim"
94
120
  form:
95
121
  primary: false
122
+ predicate: http://schema.org/keywords
96
123
  publisher:
97
124
  type: string
98
125
  multiple: true
99
126
  form:
100
127
  primary: false
128
+ index_keys:
129
+ - "publisher_tesim"
130
+ predicate: http://purl.org/dc/elements/1.1/publisher
101
131
  label:
102
132
  type: string
103
133
  form:
104
134
  primary: false
135
+ index_keys:
136
+ - "label_tesim"
137
+ predicate: info:fedora/fedora-system:def/model#downloadFilename
105
138
  language:
106
139
  type: string
107
140
  multiple: true
108
141
  form:
109
142
  primary: false
143
+ index_keys:
144
+ - "language_tesim"
145
+ predicate: http://purl.org/dc/elements/1.1/language
110
146
  license:
111
147
  type: string
112
148
  multiple: true
113
149
  form:
114
150
  primary: false
151
+ index_keys:
152
+ - "license_tesim"
153
+ predicate: http://purl.org/dc/terms/license
115
154
  relative_path:
116
155
  type: string
156
+ predicate: http://scholarsphere.psu.edu/ns#relativePath
117
157
  related_url:
118
158
  type: string
119
159
  multiple: true
@@ -121,6 +161,7 @@ attributes:
121
161
  primary: false
122
162
  index_keys:
123
163
  - "related_url_tesim"
164
+ predicate: http://www.w3.org/2000/01/rdf-schema#seeAlso
124
165
  resource_type:
125
166
  type: string
126
167
  multiple: true
@@ -129,16 +170,23 @@ attributes:
129
170
  index_keys:
130
171
  - "resource_type_sim"
131
172
  - "resource_type_tesim"
173
+ predicate: http://purl.org/dc/terms/type
132
174
  rights_notes:
133
175
  type: string
134
176
  multiple: true
135
177
  form:
136
178
  primary: false
179
+ index_keys:
180
+ - "rights_notes_tesim"
181
+ predicate: http://purl.org/dc/elements/1.1/rights
137
182
  source:
138
183
  type: string
139
184
  multiple: true
140
185
  form:
141
186
  primary: false
187
+ index_keys:
188
+ - "source_tesim"
189
+ predicate: http://purl.org/dc/terms/source
142
190
  subject:
143
191
  type: string
144
192
  multiple: true
@@ -147,3 +195,4 @@ attributes:
147
195
  - "subject_tesim"
148
196
  form:
149
197
  primary: false
198
+ predicate: http://purl.org/dc/elements/1.1/subject
@@ -2,6 +2,8 @@
2
2
  # index key names, and form properties.
3
3
  #
4
4
  # Attributes must have a type but all other configuration options are optional.
5
+ # Please note: If using Valkyrie's Fedora Metadata Adapter, predicates for attributes
6
+ # must be placed here.
5
7
  #
6
8
  # attributes:
7
9
  # attribute_name:
@@ -2,6 +2,8 @@
2
2
  # index key names, and form properties.
3
3
  #
4
4
  # Attributes must have a type but all other configuration options are optional.
5
+ # Please note: If using Valkyrie's Fedora Metadata Adapter, predicates for attributes
6
+ # must be placed here.
5
7
  #
6
8
  # attributes:
7
9
  # attribute_name:
@@ -23,6 +25,7 @@
23
25
  attributes:
24
26
  monograph_title:
25
27
  type: string
28
+ predicate: http://hyrax-example.com/monograph_title
26
29
  record_info:
27
30
  type: string
28
31
  form:
@@ -30,26 +33,33 @@ attributes:
30
33
  primary: true
31
34
  index_keys:
32
35
  - "record_info_tesim"
36
+ predicate: http://hyrax-example.com/record_info
33
37
  place_of_publication:
34
38
  type: string
35
39
  form:
36
40
  required: false
37
41
  primary: true
42
+ predicate: http://hyrax-example.com/place_of_publication
38
43
  genre:
39
44
  type: string
40
45
  form:
41
46
  primary: true
47
+ predicate: http://hyrax-example.com/genre
42
48
  series_title:
43
49
  type: string
44
50
  form:
45
51
  primary: false
52
+ predicate: http://hyrax-example.com/series_title
46
53
  target_audience:
47
54
  type: string
48
55
  form:
49
56
  multiple: true
57
+ predicate: http://hyrax-example.com/target_audience
50
58
  table_of_contents:
51
59
  type: string
52
60
  form:
53
61
  multiple: false
62
+ predicate: http://hyrax-example.com/table_of_contents
54
63
  date_of_issuance:
55
64
  type: string
65
+ predicate: http://hyrax-example.com/date_of_issuance
@@ -1,28 +1,6 @@
1
- # nurax-pg uses Hydra::RoleManagement for user and role definition. The following
2
- # examples show how to perform common setup actions.
3
- #
4
- # @see https://github.com/samvera/hydra-role-management
5
- #
6
- # Create admin role
7
- #
8
- # admin_role = Role.find_or_create_by(name: 'admin')
9
- #
10
- # Create a user
11
- #
12
- # admin_user = User.find_or_create_by(email: 'user@example.com') do |user|
13
- # user.password = 'change_me'
14
- # user.password_confirmation = 'change_me'
15
- # user.confirmed_at = DateTime.now
16
- # end
17
- # admin_user.roles << admin_role unless admin_user.roles.include?(admin_role)
18
- # admin_user.save!(validate: false)
19
- #
20
- # You can create non-admin roles and assign users to those roles using a similar pattern.
21
- #
22
- # The following roles might be used for testing, so they remain here. They will not
23
- # be available for use when logged in through the browser.
24
- #
25
1
  development:
2
+ admin:
3
+ - admin@example.com
26
4
  archivist:
27
5
  - archivist1@example.com
28
6
 
@@ -45,4 +23,4 @@ test:
45
23
 
46
24
  production:
47
25
  admin:
48
- - systems@curationexperts.com
26
+ - admin@example.com
@@ -5,14 +5,13 @@ Rails.application.routes.draw do
5
5
  mount BrowseEverything::Engine => '/browse'
6
6
 
7
7
  mount Blacklight::Engine => '/'
8
-
8
+
9
9
  concern :searchable, Blacklight::Routes::Searchable.new
10
10
 
11
11
  resource :catalog, only: [:index], as: 'catalog', path: '/catalog', controller: 'catalog' do
12
12
  concerns :searchable
13
13
  end
14
14
  devise_for :users
15
- mount Hydra::RoleManagement::Engine => '/'
16
15
  mount Sidekiq::Web => '/sidekiq'
17
16
  mount Qa::Engine => '/authorities'
18
17
  mount Hyrax::Engine, at: '/'
@@ -2,6 +2,6 @@
2
2
  development:
3
3
  url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/nurax-pg-solr-dev" %>
4
4
  test: &test
5
- url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/nurax-pg-test" %>
5
+ url: <%= ENV['TEST_SOLR_URL'] ||ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/nurax-pg-test" %>
6
6
  production:
7
7
  url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/nurax-pg" %>
@@ -1,12 +1,6 @@
1
1
  development:
2
- host: <%= ENV['VALKYRIE_SOLR_HOST'] || 'localhost' %>
3
- port: <%= ENV['VALKYRIE_SOLR_PORT'] || 8987 %>
4
- core: <%= ENV['VALKYRIE_SOLR_CORE'] || 'nurax-pg-valkyrie-dev' %>
5
- test:
6
- host: <%= ENV['VALKYRIE_SOLR_HOST'] || 'localhost' %>
7
- port: <%= ENV['VALKYRIE_SOLR_PORT'] || 8987 %>
8
- core: <%= ENV['VALKYRIE_SOLR_CORE'] || 'nurax-pg-test' %>
2
+ url: <%= ENV['SOLR_DEVELOPMENT_URL'] || ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/koppie" %>
3
+ test: &test
4
+ url: <%= ENV['SOLR_TEST_URL'] || ENV['SOLR_URL'] || "http://127.0.0.1:#{ENV.fetch('SOLR_TEST_PORT', 8985)}/solr/koppie-test" %>
9
5
  production:
10
- host: <%= ENV['VALKYRIE_SOLR_HOST'] %>
11
- port: <%= ENV['VALKYRIE_SOLR_PORT'] %>
12
- core: <%= ENV['VALKYRIE_SOLR_CORE'] %>
6
+ url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/koppie-prod" %>
@@ -0,0 +1,6 @@
1
+ #
2
+ # To integrate your app with Zotero, set ENV variables with your API info
3
+ #
4
+ zotero:
5
+ client_key: <%= ENV["ZOTERO_CLIENT_KEY"] %>
6
+ client_secret: <%= ENV["ZOTERO_CLIENT_SECRET"] %>
@@ -0,0 +1,14 @@
1
+ class CreateHyraxCounterMetrics < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :hyrax_counter_metrics do |t|
4
+ t.string :worktype
5
+ t.string :resource_type
6
+ t.integer :work_id
7
+ t.date :date
8
+ t.integer :total_item_investigations
9
+ t.integer :total_item_requests
10
+
11
+ t.timestamps
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ class ChangeWorkIdToString < ActiveRecord::Migration[6.1]
2
+ def change
3
+ change_column :hyrax_counter_metrics, :work_id, :string
4
+ end
5
+ end
data/.koppie/db/schema.rb CHANGED
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2021_12_07_172259) do
13
+ ActiveRecord::Schema.define(version: 2023_08_03_165135) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -140,6 +140,17 @@ ActiveRecord::Schema.define(version: 2021_12_07_172259) do
140
140
  t.index ["machine_id"], name: "index_hyrax_collection_types_on_machine_id", unique: true
141
141
  end
142
142
 
143
+ create_table "hyrax_counter_metrics", force: :cascade do |t|
144
+ t.string "worktype"
145
+ t.string "resource_type"
146
+ t.string "work_id"
147
+ t.date "date"
148
+ t.integer "total_item_investigations"
149
+ t.integer "total_item_requests"
150
+ t.datetime "created_at", precision: 6, null: false
151
+ t.datetime "updated_at", precision: 6, null: false
152
+ end
153
+
143
154
  create_table "hyrax_default_administrative_set", force: :cascade do |t|
144
155
  t.string "default_admin_set_id", null: false
145
156
  t.datetime "created_at", null: false
data/.koppie/yarn.lock CHANGED
@@ -706,7 +706,7 @@ iconv-lite@^0.6.2:
706
706
  immediate@~3.0.5:
707
707
  version "3.0.6"
708
708
  resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
709
- integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
709
+ integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==
710
710
 
711
711
  imsc@^1.0.1-rc.1:
712
712
  version "1.1.2"
@@ -757,7 +757,7 @@ is-typedarray@~1.0.0:
757
757
  isarray@~1.0.0:
758
758
  version "1.0.0"
759
759
  resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
760
- integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
760
+ integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==
761
761
 
762
762
  isexe@^2.0.0:
763
763
  version "2.0.0"
@@ -818,9 +818,9 @@ json-stringify-safe@~5.0.1:
818
818
  integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
819
819
 
820
820
  json5@^1.0.1:
821
- version "1.0.1"
822
- resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
823
- integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
821
+ version "1.0.2"
822
+ resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
823
+ integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==
824
824
  dependencies:
825
825
  minimist "^1.2.0"
826
826
 
@@ -840,14 +840,14 @@ jsviews@0.9.83:
840
840
  integrity sha1-BpsFEigz0jFVzDziwtn7LPeJqYo=
841
841
 
842
842
  jszip@*, jszip@^3.1.5, jszip@^3.2.2:
843
- version "3.7.1"
844
- resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9"
845
- integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg==
843
+ version "3.10.1"
844
+ resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2"
845
+ integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==
846
846
  dependencies:
847
847
  lie "~3.3.0"
848
848
  pako "~1.0.2"
849
849
  readable-stream "~2.3.6"
850
- set-immediate-shim "~1.0.1"
850
+ setimmediate "^1.0.5"
851
851
 
852
852
  lie@3.1.1:
853
853
  version "3.1.1"
@@ -864,9 +864,9 @@ lie@~3.3.0:
864
864
  immediate "~3.0.5"
865
865
 
866
866
  loader-utils@^1.0.0:
867
- version "1.4.0"
868
- resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613"
869
- integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==
867
+ version "1.4.2"
868
+ resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3"
869
+ integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==
870
870
  dependencies:
871
871
  big.js "^5.2.2"
872
872
  emojis-list "^3.0.0"
@@ -953,9 +953,9 @@ minimist@1.2.0:
953
953
  integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
954
954
 
955
955
  minimist@^1.2.0:
956
- version "1.2.5"
957
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
958
- integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
956
+ version "1.2.7"
957
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
958
+ integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
959
959
 
960
960
  mute-stream@0.0.7:
961
961
  version "0.0.7"
@@ -1100,9 +1100,9 @@ punycode@^2.1.0, punycode@^2.1.1:
1100
1100
  integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
1101
1101
 
1102
1102
  qs@~6.5.2:
1103
- version "6.5.2"
1104
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
1105
- integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
1103
+ version "6.5.3"
1104
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad"
1105
+ integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==
1106
1106
 
1107
1107
  readable-stream@^2.0.2, readable-stream@~2.3.6:
1108
1108
  version "2.3.7"
@@ -1209,10 +1209,10 @@ schema-utils@^0.4.0:
1209
1209
  ajv "^6.1.0"
1210
1210
  ajv-keywords "^3.1.0"
1211
1211
 
1212
- set-immediate-shim@~1.0.1:
1213
- version "1.0.1"
1214
- resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
1215
- integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=
1212
+ setimmediate@^1.0.5:
1213
+ version "1.0.5"
1214
+ resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
1215
+ integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==
1216
1216
 
1217
1217
  shebang-command@^2.0.0:
1218
1218
  version "2.0.0"
@@ -1419,7 +1419,7 @@ url-toolkit@^2.1.2:
1419
1419
  util-deprecate@~1.0.1:
1420
1420
  version "1.0.2"
1421
1421
  resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
1422
- integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
1422
+ integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
1423
1423
 
1424
1424
  uuid@^3.3.2:
1425
1425
  version "3.4.0"
data/.regen CHANGED
@@ -1,2 +1,2 @@
1
1
  # When updating CI regen seed, set to current date.
2
- 2023-05-24T10:43:07
2
+ 2023-08-09T14:34:59
data/CONTAINERS.md CHANGED
@@ -71,8 +71,6 @@ Let's break down the above command:
71
71
 
72
72
  _**Note:**_ The `bundle exec rspec` portion of the command runs the whole test suite. See the [rspec command documentation](https://github.com/rspec/rspec-core#the-rspec-command) for how to refine your test runs.
73
73
 
74
- _**Note**: The `/app/samvera/hyrax-webapp` is analogous to the `.internal_test_app` that we generate as part of the Hyrax engine Continuous Integration._
75
-
76
74
  #### The Docker Container Named "app"
77
75
 
78
76
  As a developer, you may need to run commands against the Hyrax-based application and/or the Hyrax engine. Examples
@@ -191,7 +189,7 @@ We publish several Hyrax images to the [GitHub container registry][ghcr] under
191
189
  the [Samvera organization][samvera-packages]. To build them:
192
190
 
193
191
  ```sh
194
- export HYRAX_VERSION=v4.0.0 # or desired version
192
+ export HYRAX_VERSION=v5.0.0.rc2 # or desired version
195
193
  git checkout hyrax-$HYRAX_VERSION
196
194
 
197
195
  docker build --target hyrax-base --tag ghcr.io/samvera/hyrax/hyrax-base:$(git rev-parse HEAD) .
data/Dockerfile CHANGED
@@ -1,15 +1,10 @@
1
- ARG RUBY_VERSION=3.2.1
1
+ ARG ALPINE_VERSION=3.18
2
+ ARG RUBY_VERSION=3.2.2
2
3
 
3
- # Replace with official jemalloc package in alpine 3.17
4
- FROM ruby:$RUBY_VERSION-alpine3.16 as builder
5
- RUN apk add build-base curl
6
- RUN curl -sL https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 | tar -xj && \
7
- cd jemalloc-5.3.0 && \
8
- ./configure && \
9
- make && \
10
- make install
4
+ FROM ruby:$RUBY_VERSION-alpine$ALPINE_VERSION as builder
5
+ RUN apk add build-base curl jemalloc
11
6
 
12
- FROM ruby:$RUBY_VERSION-alpine3.16 as hyrax-base
7
+ FROM ruby:$RUBY_VERSION-alpine$ALPINE_VERSION as hyrax-base
13
8
 
14
9
  ARG DATABASE_APK_PACKAGE="postgresql-dev"
15
10
  ARG EXTRA_APK_PACKAGES="git"
@@ -38,12 +33,12 @@ USER app
38
33
  RUN mkdir -p /app/samvera/hyrax-webapp
39
34
  WORKDIR /app/samvera/hyrax-webapp
40
35
 
41
- COPY --chown=1001:101 ./bin /app/samvera
36
+ COPY --chown=1001:101 ./bin/*.sh /app/samvera/
42
37
  ENV PATH="/app/samvera:$PATH"
43
38
  ENV RAILS_ROOT="/app/samvera/hyrax-webapp"
44
39
  ENV RAILS_SERVE_STATIC_FILES="1"
45
40
 
46
- COPY --from=builder /usr/local/lib/libjemalloc.so.2 /usr/local/lib/
41
+ COPY --from=builder /usr/lib/libjemalloc.so.2 /usr/local/lib/
47
42
  ENV LD_PRELOAD="/usr/local/lib/libjemalloc.so.2"
48
43
 
49
44
  ENTRYPOINT ["hyrax-entrypoint.sh"]
@@ -94,6 +89,13 @@ ONBUILD RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nu
94
89
 
95
90
  FROM hyrax-base as hyrax-engine-dev
96
91
 
92
+ USER root
93
+ RUN apk --no-cache add bash \
94
+ ffmpeg \
95
+ mediainfo \
96
+ perl
97
+ USER app
98
+
97
99
  ARG APP_PATH=.dassie
98
100
  ARG BUNDLE_WITHOUT=
99
101
 
@@ -105,7 +107,9 @@ COPY --chown=1001:101 . /app/samvera/hyrax-engine
105
107
  RUN bundle -v && \
106
108
  bundle install --jobs "$(nproc)" && \
107
109
  cd $HYRAX_ENGINE_PATH && \
108
- bundle install --jobs "$(nproc)"
110
+ bundle install --jobs "$(nproc)" && \
111
+ yarn
112
+
109
113
  RUN RAILS_ENV=production SECRET_KEY_BASE='fakesecret1234' DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
110
114
 
111
115
 
data/Gemfile CHANGED
@@ -14,25 +14,8 @@ group :development, :test do
14
14
  gem "simplecov", require: false
15
15
  end
16
16
 
17
- test_app_path = ENV['RAILS_ROOT'] ||
18
- ENV.fetch('ENGINE_CART_DESTINATION', File.expand_path('.internal_test_app', File.dirname(__FILE__)))
19
- test_app_gemfile = File.expand_path('Gemfile', test_app_path)
20
-
21
- # rubocop:disable Bundler/DuplicatedGem
22
- if File.exist?(test_app_gemfile)
23
- begin
24
- Bundler.ui.info "[Hyrax] Including test application dependencies from #{test_app_gemfile}"
25
- eval_gemfile test_app_gemfile
26
- rescue Bundler::GemfileError => e
27
- Bundler.ui.warn '[Hyrax] Skipping Rails application dependencies:'
28
- Bundler.ui.warn e.message
29
- end
30
- elsif ENV['RAILS_VERSION'] == 'edge'
31
- gem 'rails', github: 'rails/rails', source: 'https://rubygems.org'
32
- ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
33
- elsif ENV['RAILS_VERSION']
34
- gem 'rails', ENV['RAILS_VERSION'], source: 'https://rubygems.org'
35
- else
36
- Bundler.ui.warn '[Hyrax] Skipping all Rails dependency injection'
17
+ # Install gems from test app
18
+ if ENV['RAILS_ROOT']
19
+ test_app_gemfile_path = File.expand_path('Gemfile', ENV['RAILS_ROOT'])
20
+ eval_gemfile test_app_gemfile_path
37
21
  end
38
- # rubocop:enable Bundler/DuplicatedGem
data/Gemfile.dassie ADDED
@@ -0,0 +1,2 @@
1
+ # Use dedicated lock files for dassie/koppie to avoid gem mismatches
2
+ eval_gemfile 'Gemfile'
data/Gemfile.koppie ADDED
@@ -0,0 +1,2 @@
1
+ # Use dedicated lock files for dassie/koppie to avoid gem mismatches
2
+ eval_gemfile 'Gemfile'
data/README.md CHANGED
@@ -50,7 +50,6 @@ More detailed documentation about Hyrax is available on the [Hyrax Github Wiki](
50
50
 
51
51
  Hyrax can also work running prerequisite dependencies separately. The following describe ways to do this:
52
52
  * [Developing Your Hyrax-based Application](./documentation/developing-your-hyrax-based-app.md)
53
- * [Development setup using Engine Cart and Solr Fedora wrapper](https://github.com/samvera/hyrax/wiki/Development-setup-using-Engine-Cart-and-Solr---Fedora-wrapper)
54
53
 
55
54
  ## Contribute
56
55
 
data/Rakefile CHANGED
@@ -9,17 +9,6 @@ end
9
9
 
10
10
  Bundler::GemHelper.install_tasks
11
11
 
12
- task :setup_test_server do
13
- require 'engine_cart'
14
- EngineCart.load_application!
15
- end
16
-
17
12
  Dir.glob('tasks/*.rake').each { |r| import r }
18
13
 
19
14
  task default: :ci
20
-
21
- # Load the test app's rake tasks so they can be run from the app namespace (e.g. app:db:migrate)
22
- if File.exist?(File.expand_path(".internal_test_app/Rakefile", __dir__))
23
- APP_RAKEFILE = File.expand_path(".internal_test_app/Rakefile", __dir__)
24
- load 'rails/tasks/engine.rake'
25
- end
@@ -71,7 +71,8 @@ module Hyrax
71
71
  def save(env, use_valkyrie: false)
72
72
  return env.curation_concern.save unless use_valkyrie
73
73
 
74
- resource = valkyrie_save(resource: env.curation_concern.valkyrie_resource)
74
+ # don't run validations again on the converted object if they've already passed
75
+ resource = valkyrie_save(resource: env.curation_concern.valkyrie_resource, is_valid: env.curation_concern.save)
75
76
 
76
77
  # we need to manually set the id and reload, because the actor stack requires
77
78
  # `env.curation_concern` to be the exact same instance throughout.
@@ -115,9 +116,9 @@ module Hyrax
115
116
  attributes.select { |_, v| v.respond_to?(:select) && !v.respond_to?(:read) }
116
117
  end
117
118
 
118
- def valkyrie_save(resource:)
119
+ def valkyrie_save(resource:, is_valid:)
119
120
  permissions = resource.permission_manager.acl.permissions
120
- resource = Hyrax.persister.save(resource: resource)
121
+ resource = Hyrax.persister.save(resource: resource, perform_af_validation: !is_valid)
121
122
 
122
123
  resource.permission_manager.acl.permissions = permissions
123
124
  resource.permission_manager.acl.save