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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c53f04239ef92492dd8a98a52c8f13cb446c18ba4ad04d22e5b78673e688aa8c
4
- data.tar.gz: a804bc525628fbe33352617f8f8c0074d454def18a5e90c4d82e6c6a46aa25c2
3
+ metadata.gz: 951cca50f478f6a77b0b4dfd7f7127de250891ae5f26af3d0aad431e84987506
4
+ data.tar.gz: 4748c1f1c6a6a744e9ddbf364de06d028548f3699aa5a25c33104259672b412d
5
5
  SHA512:
6
- metadata.gz: 968a88b13e65cc3f88d30c142d4a69d39e5e21930c04a03f86af4ec2625443741da5e73662db261dc5758e770e669b521b866a1274d5d0bdfba8fcd2ef1b05c0
7
- data.tar.gz: aa1568f4a0b53f442682f87721dc4c7d458716af085df77ef3523eedae5e0e663bf708f04ef6a02f06ddf3aa143d4fd73fe513f6bbe23b1e43402438abc10ff1
6
+ metadata.gz: e24d5fd70134e1c27b39cd266a51b18838fc8b29d815b91d9df80e96c53f5348ba0b87647cf15894886de61ac4c7e49afbb4ecb9b9708b38f74959d74b339480
7
+ data.tar.gz: 745e7abf8b5f773864867f91b75f74a1768c97dddd7de35085b65d7dae48513bc2b06dd233365de9445940ebc3af9ad01bd53276e6b58bd4fcffc217e63aaa94
data/.circleci/config.yml CHANGED
@@ -5,271 +5,163 @@ orbs:
5
5
  ruby: circleci/ruby@2
6
6
  node: circleci/node@5
7
7
 
8
- jobs:
9
- bundle:
8
+ executors:
9
+ hyrax:
10
10
  parameters:
11
+ fcrepo_version:
12
+ type: string
13
+ default: '4.7.5'
14
+ hyrax_app:
15
+ type: string
16
+ default: 'dassie'
17
+ postgres_version:
18
+ type: string
19
+ default: '14.9'
20
+ redis_version:
21
+ type: string
22
+ default: '6.2'
23
+ ruby_type:
24
+ type: string
25
+ default: 'ruby'
11
26
  ruby_version:
12
27
  type: string
13
- default: 2.7.7
14
- bundler_version:
28
+ default: '2.5.5'
29
+ solr_port:
15
30
  type: string
16
- default: 2.4.8
17
- rails_version:
31
+ default: '8985'
32
+ solr_version:
18
33
  type: string
19
- default: 6.1.7.2
20
- executor:
21
- name: 'samvera/ruby'
22
- ruby_version: << parameters.ruby_version >>
23
- resource_class: medium
34
+ default: '8.11-slim'
24
35
  environment:
25
- RAILS_VERSION: << parameters.rails_version >>
26
- NOKOGIRI_USE_SYSTEM_LIBRARIES: true
27
- steps:
28
- - samvera/cached_checkout
29
-
30
- - run:
31
- name: Check for a branch named 'master'
32
- command: |
33
- git fetch --all --quiet --prune --prune-tags
34
- if [[ -n "$(git branch --all --list master */master)" ]]; then
35
- echo "A branch named 'master' was found. Please remove it."
36
- echo "$(git branch --all --list master */master)"
37
- fi
38
- [[ -z "$(git branch --all --list master */master)" ]]
39
-
40
- - samvera/bundle:
41
- ruby_version: << parameters.ruby_version >>
42
- bundler_version: << parameters.bundler_version >>
36
+ RAILS_ENV: test
37
+ RACK_ENV: test
38
+ FCREPO_PORT: 8080
39
+ POSTGRES_DB: circle_test
40
+ POSTGRES_HOST: 127.0.0.1
41
+ POSTGRES_USER: postgres
42
+ docker:
43
+ - image: "ghcr.io/samvera/hyrax/<< parameters.hyrax_app >>-dev:<< pipeline.git.revision >>"
44
+ - image: seleniarm/standalone-chromium:114.0
45
+ environment:
46
+ SE_NODE_SESSION_TIMEOUT: 1200
47
+ START_XVFB: "false"
43
48
 
44
- # Run rubocop in parallel with caching
45
- # This should get added to the orb once proven here
49
+ - image: samvera/fcrepo4:<< parameters.fcrepo_version >>
50
+ environment:
51
+ CATALINA_OPTS: "-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC"
52
+ - image: zookeeper:3.4
53
+ - image: solr:<< parameters.solr_version >>
54
+ environment:
55
+ VERBOSE: yes
56
+ SECURITY_JSON: '{"authentication":{"blockUnknown": false, "class":"solr.BasicAuthPlugin", "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}, "realm":"My Solr users", "forwardCredentials": false}, "authorization":{ "class":"solr.RuleBasedAuthorizationPlugin", "permissions":[{"name":"security-edit", "role":"admin"}], "user-role":{"solr":"admin"}}}'
57
+ command: sh -c "server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd put /security.json \"${SECURITY_JSON}\" && solr-fg -cloud -noprompt -p << parameters.solr_port >> -z localhost:2181"
58
+ - image: redis:<< parameters.redis_version >>
59
+ - image: cimg/postgres:<< parameters.postgres_version >>
46
60
 
47
- - restore_cache:
48
- name: Restore rubocop cache
49
- keys:
50
- - v1-rubocop-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
51
- - v1-rubocop-ruby<< parameters.ruby_version >>
52
- - v1
53
-
54
- - run:
55
- name: Run rubocop in parallel
56
- command: bundle exec rubocop --parallel
57
-
58
- - save_cache:
59
- name: Save rubocop cache
60
- key: v1-rubocop-ruby<< parameters.ruby_version >>-bundle{{ checksum "Gemfile.lock" }}
61
- paths:
62
- - ~/.cache/rubocop_cache
63
-
64
- - persist_to_workspace:
65
- root: ~/
66
- paths:
67
- - project/*
68
- - project/**/*
69
-
70
- build:
61
+ jobs:
62
+ kaniko-build:
71
63
  parameters:
72
- ruby_version:
73
- type: string
74
- default: 2.7.7
75
- bundler_version:
64
+ hyrax_app:
76
65
  type: string
77
- default: 2.4.8
78
- rails_version:
66
+ default: dassie
67
+ ruby_version:
79
68
  type: string
80
- default: 6.1.7.2
81
- executor:
82
- name: 'samvera/ruby_fcrepo_solr_redis_postgres'
83
- ruby_version: << parameters.ruby_version >>
84
- resource_class: medium
85
- environment:
86
- RAILS_VERSION: << parameters.rails_version >>
87
- NOKOGIRI_USE_SYSTEM_LIBRARIES: true
88
- ENGINE_CART_RAILS_OPTIONS: --database=postgresql --skip-git --skip-bundle --skip-listen --skip-spring --skip-keeps --skip-test --skip-bootsnap --skip-javascript
89
- DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test # Hard-coded with data from CircleCI orb, related to https://github.com/samvera-labs/samvera-circleci-orb/issues/42
69
+ default: 3.2.2
70
+ docker:
71
+ - image: gcr.io/kaniko-project/executor:v1.14.0-debug
72
+ entrypoint: ""
90
73
  steps:
91
- - attach_workspace:
92
- at: ~/
93
- - samvera/engine_cart_generate:
94
- cache_key: v1-internal-test-app-{{ checksum "hyrax.gemspec" }}-{{ checksum ".regen" }}-{{ checksum ".circleci/config.yml" }}-<< parameters.rails_version >>-<< parameters.ruby_version >>
95
- - samvera/bundle:
96
- ruby_version: << parameters.ruby_version >>
97
- bundler_version: << parameters.bundler_version >>
98
74
  - run:
99
- name: Generate .internal_test_app/Gemfile.lock
100
- command: bundle lock
101
- working_directory: .internal_test_app
102
- - ruby/install-deps:
103
- app-dir: .internal_test_app
104
- - node/install-packages:
105
- pkg-manager: yarn
106
- app-dir: .internal_test_app
107
- - persist_to_workspace:
108
- root: ~/
109
- paths:
110
- - project/*
111
- - project/**/*
75
+ name: Configure GHCR credentials
76
+ command: |
77
+ cat > /kaniko/.docker/config.json \<<- JSON
78
+ {
79
+ "auths": {
80
+ "ghcr.io": {
81
+ "auth": "$(echo -n $GHCR_USER:$GHCR_TOKEN | base64)"
82
+ }
83
+ }
84
+ }
85
+ JSON
86
+ - run:
87
+ name: Build and Push image
88
+ command: |
89
+ /kaniko/executor \
90
+ --cache=true \
91
+ --build-arg "EXTRA_APK_PACKAGES=git bash" \
92
+ --build-arg "APP_PATH=.<< parameters.hyrax_app >>" \
93
+ --build-arg "RUBY_VERSION=<< parameters.ruby_version >>" \
94
+ --context "git://github.com/$(echo $CIRCLE_REPOSITORY_URL | sed -E 's/.+:(.+)\.git/\1/')#refs/heads/${CIRCLE_BRANCH}#${CIRCLE_SHA1}" \
95
+ --target "hyrax-engine-dev" \
96
+ --destination "ghcr.io/samvera/hyrax/<< parameters.hyrax_app >>-dev:${CIRCLE_SHA1}"
112
97
 
113
- test:
98
+ hyrax-test:
114
99
  parameters:
115
- ruby_version:
100
+ hyrax_app:
116
101
  type: string
117
- default: 2.7.7
118
- bundler_version:
119
- type: string
120
- default: 2.4.8
102
+ default: dassie
121
103
  hyrax_valkyrie:
122
104
  type: string
123
105
  default: "false"
106
+ ruby_version:
107
+ type: string
108
+ default: 3.2.2
124
109
  executor:
125
- name: 'samvera/ruby_fcrepo_solr_redis_postgres'
110
+ name: hyrax
111
+ hyrax_app: << parameters.hyrax_app >>
126
112
  ruby_version: << parameters.ruby_version >>
127
- resource_class: medium+
128
- parallelism: 10
113
+ resource_class: large
114
+ parallelism: 12
129
115
  environment:
116
+ CHROME_HEADLESS_MODE: true
117
+ DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test
118
+ HUB_URL: http://localhost:4444/wd/hub
130
119
  HYRAX_VALKYRIE: << parameters.hyrax_valkyrie >>
120
+ IN_DOCKER: true
121
+ KARMA_BROWSER: remote-chromium
122
+ VALKYRIE_SOLR_CORE: valkyrie-test
131
123
  VALKYRIE_SOLR_PORT: 8985
132
- DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test # Hard-coded with data from CircleCI orb, related to https://github.com/samvera-labs/samvera-circleci-orb/issues/42
133
- KARMA_BROWSER: ChromeHeadlessCustom
134
- RAILS_ROOT: .internal_test_app
135
- SPEC_OPTS: "" # Clear output conflicts between samvera orb executor and ruby orb rspec command
136
124
  steps:
137
- - attach_workspace:
138
- at: ~/
139
125
  - run:
140
- name: Install system dependencies
126
+ name: Create solr core
141
127
  command: |
142
- sudo apt-get update
143
- sudo apt-get install imagemagick librsvg2-bin lsof
144
- - browser-tools/install-chrome
145
- - browser-tools/install-chromedriver
146
- - run:
147
- name: Check Chrome install
148
- command: |
149
- google-chrome --version
150
- chromedriver --version
151
- - restore_cache:
152
- keys:
153
- - engine-node-v1-{{ checksum "package.json" }}
154
- # Call yarn directly for hyrax engine; node orb demands a lockfile to use caching
155
- - run:
156
- name: Yarn Install (engine)
157
- command: yarn install
158
- - save_cache:
159
- key: engine-node-v1-{{ checksum "package.json" }}
160
- paths:
161
- - node_modules
162
- - samvera/install_solr_core:
163
- solr_config_path: .internal_test_app/solr/conf
164
- - samvera/install_solr_core:
165
- solr_config_path: .internal_test_app/solr/conf
166
- core_name: hyrax-valkyrie-test
167
- # Rerun bundler in case this is a different ruby version than bundle and build steps
168
- - samvera/bundle:
169
- ruby_version: << parameters.ruby_version >>
170
- bundler_version: << parameters.bundler_version >>
171
- # Ensure gems needed by the test app are installed
172
- - ruby/install-deps:
173
- app-dir: .internal_test_app
174
- - node/install-packages:
175
- pkg-manager: yarn
176
- app-dir: .internal_test_app
177
- - run:
178
- command: bundle exec rake db:migrate
179
- working_directory: .internal_test_app
180
- - ruby/rspec-test
181
- - store_artifacts:
182
- path: Gemfile.lock
183
- destination: engine-gemfile-lock
184
- - store_artifacts:
185
- path: .internal_test_app/Gemfile.lock
186
- destination: webapp-gemfile-lock
128
+ cd /app/samvera/hyrax-webapp/solr/conf
129
+ zip -1 -r solr_conf.zip ./*
130
+ db-wait.sh localhost:8985 # wait for solr to be available before hitting the API
131
+ curl -H "Content-type:application/octet-stream" --data-binary @solr_conf.zip "http://solr:SolrRocks@127.0.0.1:8985/solr/admin/configs?action=UPLOAD&name=solrconfig"
132
+ curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8985/api/collections/ -d '{create: {name: hydra-test, config: solrconfig, numShards: 1}}'
133
+ curl -H 'Content-type: application/json' http://solr:SolrRocks@127.0.0.1:8985/api/collections/ -d '{create: {name: valkyrie-test, config: solrconfig, numShards: 1}}'
134
+ - ruby/rspec-test:
135
+ app-dir: /app/samvera/hyrax-engine
136
+
137
+ rubocop:
138
+ working_directory: ~/hyrax
139
+ docker:
140
+ - image: cimg/ruby:3.2.2
141
+ steps:
142
+ - checkout
143
+ - run: bundle install
144
+ - ruby/rubocop-check
187
145
 
188
146
  workflows:
189
147
  version: 2
190
- ruby3-2:
148
+ dassie:
191
149
  jobs:
192
- - bundle:
150
+ - rubocop
151
+ - kaniko-build:
152
+ name: "dassie-build"
193
153
  ruby_version: "3.2.2"
194
- rails_version: "6.1.7.2"
195
- bundler_version: "2.4.8"
196
- - build:
154
+ hyrax_app: "dassie"
155
+ - hyrax-test:
156
+ name: "dassie-test"
197
157
  ruby_version: "3.2.2"
198
- rails_version: "6.1.7.2"
199
- bundler_version: "2.4.8"
158
+ hyrax_app: "dassie"
200
159
  requires:
201
- - bundle
202
- - test:
203
- name: "ruby3-2"
160
+ - dassie-build
161
+ - hyrax-test:
162
+ name: "dassie-valkyrie-test"
204
163
  ruby_version: "3.2.2"
205
- bundler_version: "2.4.8"
206
- requires:
207
- - build
208
- - test:
209
- name: "ruby3-2-valkyrie"
210
- ruby_version: "3.2.2"
211
- bundler_version: "2.4.8"
212
- hyrax_valkyrie: "true"
213
- requires:
214
- - build
215
- ruby3-1:
216
- jobs:
217
- - bundle:
218
- ruby_version: "3.1.4"
219
- rails_version: "6.1.7.2"
220
- bundler_version: "2.4.8"
221
- - build:
222
- ruby_version: "3.1.4"
223
- rails_version: "6.1.7.2"
224
- bundler_version: "2.4.8"
225
- requires:
226
- - bundle
227
- - test:
228
- name: "ruby3-1"
229
- ruby_version: "3.1.4"
230
- bundler_version: "2.4.8"
231
- requires:
232
- - build
233
- ruby3-0:
234
- jobs:
235
- - bundle:
236
- ruby_version: "3.0.6"
237
- rails_version: "6.1.7.2"
238
- bundler_version: "2.4.8"
239
- - build:
240
- ruby_version: "3.0.6"
241
- rails_version: "6.1.7.2"
242
- bundler_version: "2.4.8"
243
- requires:
244
- - bundle
245
- - test:
246
- name: "ruby3-0"
247
- ruby_version: "3.0.6"
248
- bundler_version: "2.4.8"
249
- requires:
250
- - build
251
- ruby2-7:
252
- jobs:
253
- - bundle:
254
- ruby_version: "2.7.7"
255
- rails_version: "6.1.7.2"
256
- bundler_version: "2.4.8"
257
- - build:
258
- ruby_version: "2.7.7"
259
- rails_version: "6.1.7.2"
260
- bundler_version: "2.4.8"
261
- requires:
262
- - bundle
263
- - test:
264
- name: "ruby2-7"
265
- ruby_version: "2.7.7"
266
- bundler_version: "2.4.8"
267
- requires:
268
- - build
269
- - test:
270
- name: "ruby2-7-valkyrie"
271
- ruby_version: "2.7.7"
272
- bundler_version: "2.4.8"
273
- hyrax_valkyrie: "true"
164
+ hyrax_app: "dassie"
165
+ hyrax_valkyrie: "1"
274
166
  requires:
275
- - build
167
+ - dassie-build
data/.dassie/.env CHANGED
@@ -1,4 +1,7 @@
1
1
  ANALYTICS_START_DATE=2021-08-21
2
+ BUNDLE_GEMFILE=Gemfile.dassie
3
+ BUNDLE_PATH=/app/bundle
4
+ CH12N_TOOL=fits_servlet
2
5
  CHROME_HEADLESS_MODE=false
3
6
  DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
4
7
  DATABASE_TEST_URL=postgresql://hyrax_user:hyrax_password@postgres/hyrax_test?pool=5
@@ -9,6 +12,7 @@ FCREPO_HOST=fcrepo
9
12
  FCREPO_PORT=8080
10
13
  FCREPO_REST_PATH=rest
11
14
  FCREPO_TEST_BASE_PATH=/test
15
+ FITS_SERVLET_URL=http://fits:8080/fits
12
16
  HUB_URL=http://chrome:4444/wd/hub
13
17
  HYRAX_ANALYTICS=false
14
18
  HYRAX_ANALYTICS_PROVIDER=google
@@ -16,15 +20,17 @@ HYRAX_DERIVATIVES_PATH=/app/samvera/hyrax-webapp/derivatives/
16
20
  HYRAX_ENGINE_PATH=/app/samvera/hyrax-engine
17
21
  HYRAX_UPLOAD_PATH=/app/samvera/hyrax-webapp/uploads/
18
22
  IN_DOCKER=true
19
- KARMA_BROWSER=ChromiumHeadlessCustom
23
+ KARMA_BROWSER=remote-chromium
24
+ KARMA_HOSTNAME=app
20
25
  MEMCACHED_HOST=memcached
21
26
  RACK_ENV=development
22
27
  RAILS_ENV=development
23
28
  RAILS_ROOT=.dassie
24
29
  REDIS_HOST=redis
30
+ REDIS_PASSWORD=sidekickin
25
31
  REDIS_PROVIDER=SIDEKIQ_REDIS_URL
26
32
  SEED_DASSIE=true
27
- SIDEKIQ_REDIS_URL=redis://redis:6379/0
33
+ SIDEKIQ_REDIS_URL=redis://:sidekickin@redis:6379/0
28
34
  SOLR_HOST=solr
29
35
  SOLR_PORT=8983
30
36
  SOLR_TEST_URL=http://solr:8983/solr/hyrax_test
data/.dassie/Gemfile CHANGED
@@ -8,35 +8,31 @@ else
8
8
  end
9
9
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
10
10
 
11
- # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
12
- gem 'rails', '~> 6.0'
13
- # Use postgresql as the database for Active Record
14
- gem 'pg', '>= 0.18', '< 2.0'
15
- # Use Puma as the app server
16
- gem 'puma', '~> 4.3.8'
17
- # Use SCSS for stylesheets
18
- gem 'sass-rails', '~> 6.0'
19
- # Use Uglifier as compressor for JavaScript assets
20
- gem 'uglifier', '>= 1.3.0'
21
-
22
- gem 'dalli' # mem_cache_store support
23
-
24
- # Use CoffeeScript for .coffee assets and views
11
+ gem 'bootsnap', '>= 1.1.0', require: false
12
+ gem 'bootstrap', '~> 4.0'
25
13
  gem 'coffee-rails', '~> 4.2'
26
- # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
27
- gem 'turbolinks', '~> 5'
28
- # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
14
+ gem 'dalli'
15
+ gem 'devise'
16
+ gem 'devise-guests', '~> 0.8'
17
+ gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
29
18
  gem 'jbuilder', '~> 2.5'
30
-
31
- # Reduces boot times through caching; required in config/boot.rb
32
- gem 'bootsnap', '>= 1.1.0', require: false
33
-
34
- group :development, :test do
35
- # Call 'byebug' anywhere in the code to stop execution and get a debugger console
36
- gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
37
- end
19
+ gem 'jquery-rails'
20
+ gem 'pg', '~> 1.3'
21
+ gem 'puma'
22
+ gem 'rails', '~> 6.1'
23
+ gem 'riiif', '~> 2.1'
24
+ gem 'rsolr', '>= 1.0', '< 3'
25
+ gem 'sass-rails', '~> 6.0'
26
+ gem 'sidekiq', '~> 6.4'
27
+ gem 'turbolinks', '~> 5'
28
+ gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
29
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
30
+ gem 'uglifier', '>= 1.3.0'
38
31
 
39
32
  group :development do
33
+ gem 'better_errors' # add command line in browser when errors
34
+ gem 'binding_of_caller' # deeper stack trace used by better errors
35
+
40
36
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
41
37
  gem 'web-console', '>= 3.3.0'
42
38
  gem 'listen', '>= 3.0.5', '< 3.2'
@@ -45,20 +41,9 @@ group :development do
45
41
  gem 'spring-watcher-listen', '~> 2.0.0'
46
42
  end
47
43
 
48
- # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
49
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
50
-
51
- gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
52
-
53
- gem 'bootstrap', '~> 4.0'
54
- gem 'devise'
55
- gem 'devise-guests', '~> 0.6'
56
- gem 'jquery-rails'
57
- gem 'pry-byebug'
58
- gem 'pry-doc'
59
- gem 'pry-rails'
60
- gem 'pry-rescue'
61
- gem 'riiif', '~> 2.1'
62
- gem 'rsolr', '>= 1.0', '< 3'
63
- gem 'sidekiq', '~> 6.0'
64
- gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
44
+ group :development, :test do
45
+ gem 'debug', '>= 1.0.0'
46
+ gem 'pry-doc'
47
+ gem 'pry-rails'
48
+ gem 'pry-rescue'
49
+ end
@@ -0,0 +1,2 @@
1
+ # Use dedicated lock files for dassie/koppie to avoid gem mismatches
2
+ eval_gemfile 'Gemfile'
@@ -1,3 +1,5 @@
1
1
  //= link_tree ../images
2
2
  //= link_directory ../javascripts .js
3
3
  //= link_directory ../stylesheets .css
4
+
5
+ //= link openseadragon-assets
@@ -6,6 +6,7 @@
6
6
 
7
7
  @import "bootstrap-default-overrides";
8
8
  @import 'bootstrap';
9
+ @import 'blacklight/blacklight';
9
10
  @import "font-awesome";
10
11
  @import "blacklight_gallery/gallery";
11
12
  @import "blacklight_gallery/masonry";
@@ -2,6 +2,7 @@ require 'hyrax/specs/disable_animations_in_test_environment'
2
2
 
3
3
  Rails.application.configure do
4
4
  # Settings specified here will take precedence over those in config/application.rb.
5
+ config.assets.debug = true
5
6
 
6
7
  # The test environment is used exclusively to run your application's
7
8
  # test suite. You never need to work with it otherwise. Remember that
@@ -18,6 +18,8 @@ Hyrax.config do |config|
18
18
  config.work_requires_files = false
19
19
  config.citations = true
20
20
 
21
+ config.characterization_options = { ch12n_tool: ENV.fetch('CH12N_TOOL', 'fits').to_sym }
22
+
21
23
  # Returns a URL that resolves to an image provided by a IIIF image server
22
24
  config.iiif_image_url_builder = lambda do |file_id, base_url, size, format|
23
25
  Riiif::Engine.routes.url_helpers.image_url(file_id, host: base_url, size: size)
@@ -40,7 +42,7 @@ Hyrax.config do |config|
40
42
  config.browse_everything = nil
41
43
  end
42
44
 
43
- # config.geonames_username = ''
45
+ config.geonames_username = ENV['GEONAMES_USERNAME'] || ''
44
46
 
45
47
  ##
46
48
  # Set the system-wide virus scanner
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
- ActiveSupport::Reloader.to_prepare do
3
- Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
2
+ Rails.application.reloader.to_prepare do
4
3
  Riiif::Image.info_service = lambda do |id, _file|
5
4
  # id will look like a path to a pcdm:file
6
5
  # (e.g. rv042t299%2Ffiles%2F6d71677a-4f80-42f1-ae58-ed1063fd79c7)
7
6
  # but we just want the id for the FileSet it's attached to.
8
7
 
9
- # Capture everything before the first slash
10
8
  fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
11
9
  resp = Hyrax::SolrService.get("id:#{fs_id}")
12
10
  doc = resp['response']['docs'].first
@@ -14,9 +12,15 @@ ActiveSupport::Reloader.to_prepare do
14
12
  { height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
15
13
  end
16
14
 
17
- Riiif::Image.file_resolver.id_to_uri = lambda do |id|
18
- Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
19
- Rails.logger.info "Riiif resolved #{id} to #{url}"
15
+ if Hyrax.config.use_valkyrie?
16
+ Riiif::Image.file_resolver = Hyrax::RiiifFileResolver.new
17
+ else
18
+ Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
19
+
20
+ Riiif::Image.file_resolver.id_to_uri = lambda do |id|
21
+ Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
22
+ Rails.logger.info "Riiif resolved #{id} to #{url}"
23
+ end
20
24
  end
21
25
  end
22
26
 
@@ -25,5 +29,5 @@ ActiveSupport::Reloader.to_prepare do
25
29
  Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
26
30
  Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
27
31
 
28
- Riiif::Engine.config.cache_duration = 365.days
32
+ Riiif::Engine.config.cache_duration = 1.day
29
33
  end
@@ -13,11 +13,14 @@ attributes:
13
13
  form:
14
14
  primary: true
15
15
  multiple: true
16
+ predicate: http://hyrax-example.com/target_audience
16
17
  department:
17
18
  type: string
18
19
  form:
19
20
  primary: true
21
+ predicate: http://hyrax-example.com/department
20
22
  course:
21
23
  type: string
22
24
  form:
23
25
  primary: false
26
+ predicate: http://hyrax-example.com/course