hyrax 3.0.0.pre.rc2 → 3.0.0.pre.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (514) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +5 -5
  3. data/.dassie/.env +4 -0
  4. data/.dassie/.gitignore +27 -0
  5. data/.dassie/Gemfile +57 -0
  6. data/.dassie/README.md +3 -0
  7. data/.dassie/Rakefile +6 -0
  8. data/.dassie/app/actors/hyrax/actors/generic_work_actor.rb +8 -0
  9. data/.dassie/app/actors/hyrax/actors/namespaced_works/nested_work_actor.rb +8 -0
  10. data/.dassie/app/assets/config/manifest.js +3 -0
  11. data/.dassie/app/assets/images/.keep +0 -0
  12. data/.dassie/app/assets/images/unauthorized.png +0 -0
  13. data/.dassie/app/assets/images/us_404.svg +91 -0
  14. data/.dassie/app/assets/javascripts/application.js +26 -0
  15. data/.dassie/app/assets/javascripts/blacklight_gallery.js +1 -0
  16. data/.dassie/app/assets/javascripts/cable.js +13 -0
  17. data/.dassie/app/assets/javascripts/channels/.keep +0 -0
  18. data/.dassie/app/assets/javascripts/openseadragon.js +2 -0
  19. data/.dassie/app/assets/stylesheets/application.css +16 -0
  20. data/.dassie/app/assets/stylesheets/hyrax.scss +17 -0
  21. data/.dassie/app/assets/stylesheets/openseadragon.css +3 -0
  22. data/.dassie/app/channels/application_cable/channel.rb +4 -0
  23. data/.dassie/app/channels/application_cable/connection.rb +4 -0
  24. data/.dassie/app/controllers/application_controller.rb +14 -0
  25. data/.dassie/app/controllers/catalog_controller.rb +300 -0
  26. data/.dassie/app/controllers/concerns/.keep +0 -0
  27. data/.dassie/app/controllers/hyrax/generic_works_controller.rb +14 -0
  28. data/.dassie/app/controllers/hyrax/monographs_controller.rb +17 -0
  29. data/.dassie/app/controllers/hyrax/namespaced_works/nested_works_controller.rb +14 -0
  30. data/.dassie/app/forms/hyrax/generic_work_form.rb +9 -0
  31. data/.dassie/app/forms/hyrax/namespaced_works/nested_work_form.rb +9 -0
  32. data/.dassie/app/forms/monograph_form.rb +20 -0
  33. data/.dassie/app/helpers/application_helper.rb +2 -0
  34. data/.dassie/app/helpers/hyrax_helper.rb +6 -0
  35. data/.dassie/app/indexers/generic_work_indexer.rb +18 -0
  36. data/.dassie/app/indexers/monograph_indexer.rb +16 -0
  37. data/.dassie/app/indexers/namespaced_works/nested_work_indexer.rb +18 -0
  38. data/.dassie/app/jobs/application_job.rb +2 -0
  39. data/.dassie/app/mailers/application_mailer.rb +4 -0
  40. data/.dassie/app/models/ability.rb +21 -0
  41. data/.dassie/app/models/application_record.rb +3 -0
  42. data/.dassie/app/models/collection.rb +8 -0
  43. data/.dassie/app/models/concerns/.keep +0 -0
  44. data/.dassie/app/models/file_set.rb +5 -0
  45. data/.dassie/app/models/generic_work.rb +14 -0
  46. data/.dassie/app/models/monograph.rb +8 -0
  47. data/.dassie/app/models/namespaced_works/nested_work.rb +16 -0
  48. data/.dassie/app/models/qa.rb +5 -0
  49. data/.dassie/app/models/qa/local_authority.rb +2 -0
  50. data/.dassie/app/models/qa/local_authority_entry.rb +3 -0
  51. data/.dassie/app/models/search_builder.rb +16 -0
  52. data/.dassie/app/models/solr_document.rb +28 -0
  53. data/.dassie/app/models/time_span.rb +22 -0
  54. data/.dassie/app/models/user.rb +26 -0
  55. data/.dassie/app/presenters/hyrax/generic_work_presenter.rb +6 -0
  56. data/.dassie/app/presenters/hyrax/namespaced_works/nested_work_presenter.rb +6 -0
  57. data/.dassie/app/views/hyrax/generic_works/_generic_work.html.erb +2 -0
  58. data/.dassie/app/views/hyrax/monographs/_monograph.html.erb +2 -0
  59. data/.dassie/app/views/hyrax/namespaced_works/nested_works/_nested_work.html.erb +2 -0
  60. data/.dassie/app/views/layouts/application.html.erb +15 -0
  61. data/.dassie/app/views/layouts/mailer.html.erb +13 -0
  62. data/.dassie/app/views/layouts/mailer.text.erb +1 -0
  63. data/.dassie/bin/bundle +3 -0
  64. data/.dassie/bin/rails +9 -0
  65. data/.dassie/bin/rake +9 -0
  66. data/.dassie/bin/setup +36 -0
  67. data/.dassie/bin/spring +17 -0
  68. data/.dassie/bin/update +31 -0
  69. data/.dassie/bin/yarn +11 -0
  70. data/.dassie/config.ru +5 -0
  71. data/.dassie/config/analytics.yml +6 -0
  72. data/.dassie/config/application.rb +22 -0
  73. data/.dassie/config/arkivo.yml +6 -0
  74. data/.dassie/config/authorities/licenses.yml +46 -0
  75. data/.dassie/config/authorities/resource_types.yml +41 -0
  76. data/.dassie/config/authorities/rights_statements.yml +37 -0
  77. data/.dassie/config/blacklight.yml +9 -0
  78. data/.dassie/config/boot.rb +4 -0
  79. data/.dassie/config/browse_everything_providers.yml +2 -0
  80. data/.dassie/config/cable.yml +10 -0
  81. data/.dassie/config/credentials.yml.enc +1 -0
  82. data/.dassie/config/environment.rb +5 -0
  83. data/.dassie/config/environments/development.rb +69 -0
  84. data/.dassie/config/environments/production.rb +94 -0
  85. data/.dassie/config/environments/test.rb +51 -0
  86. data/.dassie/config/fedora.yml +15 -0
  87. data/.dassie/config/initializers/arkivo_constraint.rb +12 -0
  88. data/.dassie/config/initializers/assets.rb +2 -0
  89. data/.dassie/config/initializers/clamav.rb +2 -0
  90. data/.dassie/config/initializers/cookies_serializer.rb +1 -0
  91. data/.dassie/config/initializers/devise.rb +13 -0
  92. data/.dassie/config/initializers/filter_parameter_logging.rb +1 -0
  93. data/.dassie/config/initializers/hydra_config.rb +6 -0
  94. data/.dassie/config/initializers/hyrax.rb +48 -0
  95. data/.dassie/config/initializers/mailboxer.rb +21 -0
  96. data/.dassie/config/initializers/mime_types.rb +4 -0
  97. data/.dassie/config/initializers/mini_magick.rb +6 -0
  98. data/.dassie/config/initializers/redis_config.rb +4 -0
  99. data/.dassie/config/initializers/riiif.rb +27 -0
  100. data/.dassie/config/initializers/simple_form.rb +28 -0
  101. data/.dassie/config/initializers/simple_form_bootstrap.rb +143 -0
  102. data/.dassie/config/initializers/wrap_parameters.rb +3 -0
  103. data/.dassie/config/locales/blacklight.en.yml +3 -0
  104. data/.dassie/config/locales/devise.en.yml +65 -0
  105. data/.dassie/config/locales/generic_work.de.yml +8 -0
  106. data/.dassie/config/locales/generic_work.en.yml +8 -0
  107. data/.dassie/config/locales/generic_work.es.yml +10 -0
  108. data/.dassie/config/locales/generic_work.fr.yml +8 -0
  109. data/.dassie/config/locales/generic_work.it.yml +8 -0
  110. data/.dassie/config/locales/generic_work.pt-BR.yml +8 -0
  111. data/.dassie/config/locales/generic_work.zh.yml +10 -0
  112. data/.dassie/config/locales/hyrax.de.yml +58 -0
  113. data/.dassie/config/locales/hyrax.en.yml +58 -0
  114. data/.dassie/config/locales/hyrax.es.yml +58 -0
  115. data/.dassie/config/locales/hyrax.fr.yml +58 -0
  116. data/.dassie/config/locales/hyrax.it.yml +58 -0
  117. data/.dassie/config/locales/hyrax.pt-BR.yml +58 -0
  118. data/.dassie/config/locales/hyrax.zh.yml +58 -0
  119. data/.dassie/config/locales/namespaced_works/nested_work.de.yml +8 -0
  120. data/.dassie/config/locales/namespaced_works/nested_work.en.yml +8 -0
  121. data/.dassie/config/locales/namespaced_works/nested_work.es.yml +10 -0
  122. data/.dassie/config/locales/namespaced_works/nested_work.fr.yml +8 -0
  123. data/.dassie/config/locales/namespaced_works/nested_work.it.yml +8 -0
  124. data/.dassie/config/locales/namespaced_works/nested_work.pt-BR.yml +8 -0
  125. data/.dassie/config/locales/namespaced_works/nested_work.zh.yml +10 -0
  126. data/.dassie/config/metadata/monograph.yaml +55 -0
  127. data/.dassie/config/metadata/sample_metadata.yaml +3 -0
  128. data/.dassie/config/puma.rb +6 -0
  129. data/.dassie/config/redis.yml +9 -0
  130. data/.dassie/config/role_map.yml +24 -0
  131. data/.dassie/config/routes.rb +35 -0
  132. data/.dassie/config/solr.yml +7 -0
  133. data/.dassie/config/spring.rb +6 -0
  134. data/.dassie/config/storage.yml +7 -0
  135. data/.dassie/config/tinymce.yml +12 -0
  136. data/.dassie/config/uv/uv-config.json +3 -0
  137. data/.dassie/config/uv/uv.html +87 -0
  138. data/.dassie/config/valkyrie_index.yml +12 -0
  139. data/.dassie/config/workflows/default_workflow.json +21 -0
  140. data/.dassie/config/workflows/mediated_deposit_workflow.json +76 -0
  141. data/.dassie/config/zotero.yml +6 -0
  142. data/.dassie/db/migrate/20200821212749_create_searches.blacklight.rb +17 -0
  143. data/.dassie/db/migrate/20200821212750_create_bookmarks.blacklight.rb +19 -0
  144. data/.dassie/db/migrate/20200821212751_add_polymorphic_type_to_bookmarks.blacklight.rb +9 -0
  145. data/.dassie/db/migrate/20200821212803_devise_create_users.rb +44 -0
  146. data/.dassie/db/migrate/20200821212806_add_devise_guests_to_users.rb +15 -0
  147. data/.dassie/db/migrate/20200821212828_create_version_committers.hyrax.rb +15 -0
  148. data/.dassie/db/migrate/20200821212829_create_checksum_audit_logs.hyrax.rb +19 -0
  149. data/.dassie/db/migrate/20200821212830_create_single_use_links.hyrax.rb +12 -0
  150. data/.dassie/db/migrate/20200821212831_add_social_to_users.hyrax.rb +13 -0
  151. data/.dassie/db/migrate/20200821212832_add_ldap_attrs_to_user.hyrax.rb +27 -0
  152. data/.dassie/db/migrate/20200821212833_add_avatars_to_users.hyrax.rb +15 -0
  153. data/.dassie/db/migrate/20200821212834_create_trophies.hyrax.rb +10 -0
  154. data/.dassie/db/migrate/20200821212835_add_linkedin_to_users.hyrax.rb +5 -0
  155. data/.dassie/db/migrate/20200821212836_create_tinymce_assets.hyrax.rb +8 -0
  156. data/.dassie/db/migrate/20200821212837_create_content_blocks.hyrax.rb +10 -0
  157. data/.dassie/db/migrate/20200821212838_create_featured_works.hyrax.rb +12 -0
  158. data/.dassie/db/migrate/20200821212839_add_external_key_to_content_blocks.hyrax.rb +6 -0
  159. data/.dassie/db/migrate/20200821212840_create_proxy_deposit_rights.hyrax.rb +10 -0
  160. data/.dassie/db/migrate/20200821212841_create_proxy_deposit_requests.hyrax.rb +15 -0
  161. data/.dassie/db/migrate/20200821212842_create_file_view_stats.hyrax.rb +12 -0
  162. data/.dassie/db/migrate/20200821212843_create_file_download_stats.hyrax.rb +12 -0
  163. data/.dassie/db/migrate/20200821212844_add_orcid_to_users.hyrax.rb +5 -0
  164. data/.dassie/db/migrate/20200821212845_create_user_stats.hyrax.rb +19 -0
  165. data/.dassie/db/migrate/20200821212846_create_work_view_stats.hyrax.rb +12 -0
  166. data/.dassie/db/migrate/20200821212847_add_works_to_user_stats.hyrax.rb +13 -0
  167. data/.dassie/db/migrate/20200821212848_change_trophy_generic_file_id_to_work_id.hyrax.rb +5 -0
  168. data/.dassie/db/migrate/20200821212849_change_proxy_deposit_generic_file_id_to_work_id.hyrax.rb +5 -0
  169. data/.dassie/db/migrate/20200821212850_change_audit_log_generic_file_id_to_file_set_id.hyrax.rb +5 -0
  170. data/.dassie/db/migrate/20200821212851_change_proxy_deposit_request_generic_file_id_to_work_id.hyrax.rb +5 -0
  171. data/.dassie/db/migrate/20200821212852_create_uploaded_files.hyrax.rb +10 -0
  172. data/.dassie/db/migrate/20200821212853_create_features.hyrax.rb +10 -0
  173. data/.dassie/db/migrate/20200821212854_create_operations.hyrax.rb +23 -0
  174. data/.dassie/db/migrate/20200821212855_change_featured_work_generic_file_id_to_work_id.hyrax.rb +6 -0
  175. data/.dassie/db/migrate/20200821212856_add_arkivo_to_users.hyrax.rb +8 -0
  176. data/.dassie/db/migrate/20200821212857_create_sipity.hyrax.rb +163 -0
  177. data/.dassie/db/migrate/20200821212858_create_sipity_workflow_methods.hyrax.rb +10 -0
  178. data/.dassie/db/migrate/20200821212859_create_permission_template.hyrax.rb +11 -0
  179. data/.dassie/db/migrate/20200821212860_create_permission_template_access.hyrax.rb +11 -0
  180. data/.dassie/db/migrate/20200821212861_add_release_to_permission_templates.hyrax.rb +6 -0
  181. data/.dassie/db/migrate/20200821212862_add_permission_template_to_sipity_workflow.hyrax.rb +26 -0
  182. data/.dassie/db/migrate/20200821212863_tidy_up_because_of_bad_exception.hyrax.rb +13 -0
  183. data/.dassie/db/migrate/20200821212864_add_allows_access_grant_to_workflow.hyrax.rb +5 -0
  184. data/.dassie/db/migrate/20200821212865_change_checksum_audit_log.hyrax.rb +18 -0
  185. data/.dassie/db/migrate/20200821212866_create_job_io_wrappers.hyrax.rb +15 -0
  186. data/.dassie/db/migrate/20200821212867_create_collection_types.hyrax.rb +17 -0
  187. data/.dassie/db/migrate/20200821212868_update_collection_type_column_names.hyrax.rb +9 -0
  188. data/.dassie/db/migrate/20200821212869_update_collection_type_column_options.hyrax.rb +17 -0
  189. data/.dassie/db/migrate/20200821212870_create_collection_branding_infos.hyrax.rb +15 -0
  190. data/.dassie/db/migrate/20200821212871_create_collection_type_participants.hyrax.rb +11 -0
  191. data/.dassie/db/migrate/20200821212872_rename_admin_set_id_to_source_id.hyrax.rb +5 -0
  192. data/.dassie/db/migrate/20200821212873_add_preferred_locale_to_users.hyrax.rb +5 -0
  193. data/.dassie/db/migrate/20200821212874_add_collection_type_sharing_options.hyrax.rb +5 -0
  194. data/.dassie/db/migrate/20200821212875_add_unique_constraint_to_permission_template_accesses.hyrax.rb +8 -0
  195. data/.dassie/db/migrate/20200821212876_add_branding_to_collection_type.hyrax.rb +5 -0
  196. data/.dassie/db/migrate/20200821212877_add_badge_color_to_collection_types.hyrax.rb +5 -0
  197. data/.dassie/db/migrate/20200821212878_update_single_use_links_column_names.hyrax.rb +6 -0
  198. data/.dassie/db/migrate/20200821212879_change_sipity_entity_specific_responsibility.hyrax.rb +9 -0
  199. data/.dassie/db/migrate/20200821212880_create_mailboxer.mailboxer_engine.rb +65 -0
  200. data/.dassie/db/migrate/20200821212881_add_conversation_optout.mailboxer_engine.rb +15 -0
  201. data/.dassie/db/migrate/20200821212882_add_missing_indices.mailboxer_engine.rb +20 -0
  202. data/.dassie/db/migrate/20200821212883_add_delivery_tracking_info_to_mailboxer_receipts.mailboxer_engine.rb +8 -0
  203. data/.dassie/db/migrate/20200821212884_create_qa_local_authorities.rb +10 -0
  204. data/.dassie/db/migrate/20200821212885_create_qa_local_authority_entries.rb +12 -0
  205. data/.dassie/db/migrate/20200821212902_create_minter_states.noid_rails_engine.rb +17 -0
  206. data/.dassie/db/migrate/20200821212903_rename_minter_state_random_to_rand.noid_rails_engine.rb +8 -0
  207. data/.dassie/db/schema.rb +563 -0
  208. data/.dassie/db/seeds.rb +14 -0
  209. data/.dassie/lib/assets/.keep +0 -0
  210. data/.dassie/lib/tasks/.keep +0 -0
  211. data/.dassie/log/.keep +0 -0
  212. data/.dassie/package.json +17 -0
  213. data/.dassie/public/404.html +67 -0
  214. data/.dassie/public/422.html +67 -0
  215. data/.dassie/public/500.html +66 -0
  216. data/.dassie/public/apple-touch-icon-precomposed.png +0 -0
  217. data/.dassie/public/apple-touch-icon.png +0 -0
  218. data/.dassie/public/favicon.ico +0 -0
  219. data/.dassie/public/robots.txt +1 -0
  220. data/.dassie/solr/conf/_rest_managed.json +3 -0
  221. data/.dassie/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  222. data/.dassie/solr/conf/schema.xml +367 -0
  223. data/.dassie/solr/conf/scripts.conf +24 -0
  224. data/.dassie/solr/conf/solrconfig.xml +208 -0
  225. data/.dassie/solr/conf/stopwords.txt +58 -0
  226. data/.dassie/solr/conf/stopwords_en.txt +58 -0
  227. data/.dassie/solr/conf/xslt/example.xsl +132 -0
  228. data/.dassie/solr/conf/xslt/example_atom.xsl +67 -0
  229. data/.dassie/solr/conf/xslt/example_rss.xsl +66 -0
  230. data/.dassie/solr/conf/xslt/luke.xsl +337 -0
  231. data/.dassie/solr/sample_solr_documents.yml +2692 -0
  232. data/.dassie/storage/.keep +0 -0
  233. data/.dassie/values.stage.yaml +7 -0
  234. data/.dassie/values.yaml +15 -0
  235. data/.dassie/vendor/.keep +0 -0
  236. data/.dockerignore +11 -0
  237. data/.env +26 -0
  238. data/.github/CODE_OF_CONDUCT.md +4 -4
  239. data/.github/CONTRIBUTING.md +1 -1
  240. data/.github/SUPPORT.md +13 -1
  241. data/.gitignore +1 -1
  242. data/.regen +1 -1
  243. data/.rubocop.yml +1 -0
  244. data/.rubocop_fixme.yml +4 -0
  245. data/CODE_OF_CONDUCT.md +4 -4
  246. data/CONTAINERS.md +148 -0
  247. data/CONTRIBUTING.md +1 -1
  248. data/Dockerfile +75 -0
  249. data/Gemfile +26 -35
  250. data/README.md +61 -288
  251. data/app/actors/hyrax/actors/attach_members_actor.rb +7 -5
  252. data/app/actors/hyrax/actors/base_actor.rb +0 -1
  253. data/app/actors/hyrax/actors/create_with_files_ordered_members_actor.rb +28 -28
  254. data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +2 -3
  255. data/app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb +23 -28
  256. data/app/actors/hyrax/actors/default_admin_set_actor.rb +20 -21
  257. data/app/actors/hyrax/actors/file_actor.rb +32 -32
  258. data/app/actors/hyrax/actors/file_set_actor.rb +4 -15
  259. data/app/actors/hyrax/actors/initialize_workflow_actor.rb +8 -0
  260. data/app/actors/hyrax/actors/transfer_request_actor.rb +5 -0
  261. data/app/assets/javascripts/hyrax.js +1 -0
  262. data/app/assets/javascripts/hyrax/skip_to_content.js +15 -0
  263. data/app/assets/stylesheets/hyrax/_usage-stats.scss +1 -1
  264. data/app/authorities/qa/authorities/collections.rb +18 -8
  265. data/app/authorities/qa/authorities/find_works.rb +20 -5
  266. data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +15 -6
  267. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +62 -31
  268. data/app/controllers/hyrax/dashboard/collections_controller.rb +22 -12
  269. data/app/controllers/hyrax/dashboard/works_controller.rb +3 -4
  270. data/app/controllers/hyrax/file_sets_controller.rb +19 -10
  271. data/app/controllers/hyrax/homepage_controller.rb +11 -11
  272. data/app/controllers/hyrax/my/collections_controller.rb +5 -6
  273. data/app/controllers/hyrax/my/highlights_controller.rb +2 -3
  274. data/app/controllers/hyrax/my/shares_controller.rb +2 -3
  275. data/app/controllers/hyrax/my/works_controller.rb +1 -6
  276. data/app/controllers/hyrax/my_controller.rb +10 -2
  277. data/app/controllers/hyrax/permissions_controller.rb +1 -0
  278. data/app/controllers/hyrax/single_use_links_viewer_controller.rb +11 -5
  279. data/app/controllers/hyrax/users_controller.rb +5 -10
  280. data/app/forms/hyrax/forms/failed_submission_form_wrapper.rb +136 -0
  281. data/app/forms/hyrax/forms/resource_form.rb +8 -4
  282. data/app/helpers/hyrax/collections_helper.rb +1 -1
  283. data/app/helpers/hyrax/dashboard_helper_behavior.rb +7 -2
  284. data/app/helpers/hyrax/embargo_helper.rb +5 -1
  285. data/app/helpers/hyrax/hyrax_helper_behavior.rb +10 -5
  286. data/app/helpers/hyrax/lease_helper.rb +5 -1
  287. data/app/indexers/hyrax/pcdm_collection_indexer.rb +21 -0
  288. data/app/indexers/hyrax/resource_indexer.rb +3 -1
  289. data/app/indexers/hyrax/valkyrie_collection_indexer.rb +3 -12
  290. data/app/indexers/hyrax/valkyrie_indexer.rb +45 -17
  291. data/app/indexers/hyrax/valkyrie_work_indexer.rb +16 -0
  292. data/app/jobs/attach_files_to_work_job.rb +3 -41
  293. data/app/jobs/embargo_expiry_job.rb +15 -0
  294. data/app/jobs/event_job.rb +14 -7
  295. data/app/jobs/hyrax/application_job.rb +6 -1
  296. data/app/jobs/import_url_job.rb +11 -5
  297. data/app/jobs/inherit_permissions_job.rb +6 -25
  298. data/app/jobs/lease_expiry_job.rb +15 -0
  299. data/app/models/admin_set.rb +1 -1
  300. data/app/models/concerns/hyrax/ability.rb +192 -21
  301. data/app/models/concerns/hyrax/ability/admin_set_ability.rb +0 -5
  302. data/app/models/concerns/hyrax/collection_behavior.rb +7 -13
  303. data/app/models/concerns/hyrax/permissions/writable.rb +2 -2
  304. data/app/models/concerns/hyrax/solr_document/characterization.rb +35 -2
  305. data/app/models/concerns/hyrax/solr_document_behavior.rb +37 -5
  306. data/app/models/hyrax/change_set.rb +5 -1
  307. data/app/models/hyrax/collection_type.rb +59 -22
  308. data/app/models/hyrax/event.rb +5 -7
  309. data/app/models/hyrax/file_metadata.rb +15 -4
  310. data/app/models/hyrax/pcdm_collection.rb +13 -0
  311. data/app/models/hyrax/uploaded_file.rb +9 -2
  312. data/app/models/hyrax/{active_job_proxy.rb → valkyrie_global_id_proxy.rb} +6 -5
  313. data/app/models/hyrax/virus_scanner.rb +2 -1
  314. data/app/models/hyrax/work.rb +1 -1
  315. data/app/models/sipity.rb +6 -0
  316. data/app/models/sipity/entity.rb +1 -1
  317. data/app/models/sipity/workflow.rb +23 -3
  318. data/app/presenters/hyrax/admin/repository_object_presenter.rb +7 -2
  319. data/app/presenters/hyrax/collection_presenter.rb +1 -1
  320. data/app/presenters/hyrax/file_set_presenter.rb +3 -0
  321. data/app/presenters/hyrax/iiif_manifest_presenter.rb +3 -3
  322. data/app/presenters/hyrax/permission_badge.rb +1 -1
  323. data/app/presenters/hyrax/presenter_factory.rb +0 -2
  324. data/app/presenters/hyrax/select_collection_type_presenter.rb +16 -3
  325. data/app/presenters/hyrax/select_type_presenter.rb +3 -2
  326. data/app/presenters/hyrax/stats_usage_presenter.rb +0 -1
  327. data/app/presenters/hyrax/work_show_presenter.rb +1 -1
  328. data/app/renderers/hyrax/renderers/attribute_renderer.rb +16 -6
  329. data/app/search_builders/hyrax/README.md +3 -3
  330. data/app/search_builders/hyrax/admin_admin_set_member_search_builder.rb +8 -2
  331. data/app/search_builders/hyrax/collection_member_search_builder.rb +21 -7
  332. data/app/search_builders/hyrax/dashboard/managed_search_filters.rb +1 -1
  333. data/app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb +1 -1
  334. data/app/search_builders/hyrax/embargo_search_builder.rb +0 -1
  335. data/app/search_builders/hyrax/filter_by_type.rb +3 -1
  336. data/app/search_builders/hyrax/lease_search_builder.rb +0 -1
  337. data/app/search_builders/hyrax/nested_collections_parent_search_builder.rb +12 -2
  338. data/app/search_builders/hyrax/search_builder.rb +1 -4
  339. data/app/search_builders/hyrax/search_filters.rb +0 -2
  340. data/app/services/hyrax/access_control_list.rb +33 -2
  341. data/app/services/hyrax/adapters/nesting_index_adapter.rb +26 -7
  342. data/app/services/hyrax/admin_set_member_service.rb +18 -4
  343. data/{lib/hyrax/callbacks/registry.rb → app/services/hyrax/callbacks.rb} +23 -0
  344. data/app/services/hyrax/change_content_depositor_service.rb +4 -1
  345. data/app/services/hyrax/collection_member_service.rb +5 -1
  346. data/app/services/hyrax/collection_types/permissions_service.rb +0 -2
  347. data/app/services/hyrax/collections/collection_member_service.rb +44 -64
  348. data/app/services/hyrax/collections/managed_collections_service.rb +15 -2
  349. data/app/services/hyrax/collections/migration_service.rb +9 -3
  350. data/app/services/hyrax/collections/nested_collection_persistence_service.rb +1 -1
  351. data/app/services/hyrax/collections/nested_collection_query_service.rb +39 -19
  352. data/app/services/hyrax/collections/permissions_service.rb +0 -1
  353. data/app/services/hyrax/collections_service.rb +12 -12
  354. data/app/services/hyrax/custom_queries/find_collections_by_type.rb +1 -1
  355. data/app/services/hyrax/custom_queries/navigators/child_collections_navigator.rb +14 -3
  356. data/app/services/hyrax/custom_queries/navigators/child_filesets_navigator.rb +14 -3
  357. data/app/services/hyrax/custom_queries/navigators/child_works_navigator.rb +10 -3
  358. data/app/services/hyrax/custom_queries/navigators/collection_members.rb +1 -0
  359. data/app/services/hyrax/custom_queries/navigators/find_files.rb +3 -0
  360. data/app/services/hyrax/database_migrator.rb +13 -10
  361. data/app/services/hyrax/default_middleware_stack.rb +0 -6
  362. data/app/services/hyrax/ensure_well_formed_admin_set_service.rb +27 -0
  363. data/app/services/hyrax/file_set_fixity_check_service.rb +16 -17
  364. data/app/services/hyrax/file_set_type_service.rb +55 -0
  365. data/app/services/hyrax/graph_exporter.rb +64 -8
  366. data/app/services/hyrax/list_source_exporter.rb +16 -34
  367. data/app/services/hyrax/listeners.rb +22 -0
  368. data/app/services/hyrax/listeners/proxy_deposit_listener.rb +20 -0
  369. data/app/services/hyrax/listeners/workflow_listener.rb +36 -0
  370. data/app/services/hyrax/multiple_membership_checker.rb +2 -1
  371. data/app/services/hyrax/quick_classification_query.rb +2 -3
  372. data/app/services/hyrax/resource_visibility_propagator.rb +1 -1
  373. data/app/services/hyrax/search_service.rb +108 -0
  374. data/app/services/hyrax/simple_schema_loader.rb +3 -1
  375. data/app/services/hyrax/statistics/depositors/summary.rb +0 -1
  376. data/app/services/hyrax/statistics/system_stats.rb +0 -1
  377. data/app/services/hyrax/thumbnail_path_service.rb +6 -1
  378. data/app/services/hyrax/time_service.rb +10 -0
  379. data/app/services/hyrax/versioning_service.rb +4 -28
  380. data/app/services/hyrax/work_uploads_handler.rb +166 -0
  381. data/app/services/hyrax/workflow/action_taken_service.rb +14 -1
  382. data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +3 -1
  383. data/app/services/hyrax/workflow/permission_generator.rb +14 -9
  384. data/app/services/hyrax/workflow/workflow_action_service.rb +1 -1
  385. data/app/services/hyrax/workflow/workflow_factory.rb +12 -10
  386. data/app/services/hyrax/working_directory.rb +0 -1
  387. data/app/services/hyrax/works/managed_works_service.rb +14 -2
  388. data/app/views/_controls.html.erb +1 -1
  389. data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
  390. data/app/views/hyrax/base/_member.html.erb +1 -1
  391. data/app/views/hyrax/base/_representative_media.html.erb +1 -1
  392. data/app/views/hyrax/base/iiif_viewers/_universal_viewer.html.erb +1 -1
  393. data/app/views/hyrax/base/show.html.erb +2 -2
  394. data/app/views/hyrax/batch_select/_add_button.html.erb +1 -1
  395. data/app/views/hyrax/collections/_default_group.html.erb +2 -0
  396. data/app/views/hyrax/collections/show.html.erb +1 -1
  397. data/app/views/hyrax/dashboard/works/_default_group.html.erb +2 -0
  398. data/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb +1 -1
  399. data/app/views/hyrax/leases/_list_expired_active_leases.html.erb +2 -1
  400. data/app/views/hyrax/my/works/_default_group.html.erb +2 -0
  401. data/app/views/layouts/hyrax.html.erb +0 -15
  402. data/bin/db-migrate-seed.sh +9 -0
  403. data/bin/db-wait.sh +14 -0
  404. data/bin/hyrax-entrypoint.sh +15 -0
  405. data/chart/fcrepo/.gitignore +2 -0
  406. data/chart/fcrepo/.helmignore +23 -0
  407. data/chart/fcrepo/Chart.yaml +11 -0
  408. data/chart/fcrepo/README.md +50 -0
  409. data/chart/fcrepo/templates/NOTES.txt +21 -0
  410. data/chart/fcrepo/templates/_helpers.tpl +68 -0
  411. data/chart/fcrepo/templates/configmap-env.yaml +19 -0
  412. data/chart/fcrepo/templates/deployment.yaml +109 -0
  413. data/chart/fcrepo/templates/ingress.yaml +41 -0
  414. data/chart/fcrepo/templates/pvc.yaml +20 -0
  415. data/chart/fcrepo/templates/secret.yaml +12 -0
  416. data/chart/fcrepo/templates/service.yaml +15 -0
  417. data/chart/fcrepo/templates/serviceaccount.yaml +12 -0
  418. data/chart/fcrepo/templates/tests/test-connection.yaml +15 -0
  419. data/chart/fcrepo/values.yaml +79 -0
  420. data/chart/hyrax/.gitignore +2 -0
  421. data/chart/hyrax/.helmignore +23 -0
  422. data/chart/hyrax/Chart.yaml +27 -0
  423. data/chart/hyrax/README.md +69 -0
  424. data/chart/hyrax/templates/NOTES.txt +21 -0
  425. data/chart/hyrax/templates/_helpers.tpl +92 -0
  426. data/chart/hyrax/templates/configmap-env.yaml +32 -0
  427. data/chart/hyrax/templates/deployment.yaml +79 -0
  428. data/chart/hyrax/templates/fcrepo-secret.yaml +13 -0
  429. data/chart/hyrax/templates/hpa.yaml +28 -0
  430. data/chart/hyrax/templates/ingress.yaml +41 -0
  431. data/chart/hyrax/templates/secrets.yaml +12 -0
  432. data/chart/hyrax/templates/service.yaml +15 -0
  433. data/chart/hyrax/templates/serviceaccount.yaml +12 -0
  434. data/chart/hyrax/templates/tests/test-connection.yaml +15 -0
  435. data/chart/hyrax/values.yaml +97 -0
  436. data/config/initializers/indexing_adapter_initializer.rb +7 -12
  437. data/config/initializers/listeners.rb +2 -0
  438. data/config/locales/hyrax.en.yml +1 -1
  439. data/config/metadata/basic_metadata.yaml +13 -0
  440. data/db/seeds.rb +20 -0
  441. data/docker-compose.yml +132 -0
  442. data/documentation/developing-your-hyrax-based-app.md +271 -0
  443. data/documentation/legacyREADME.md +336 -0
  444. data/documentation/note-about-versions.md +15 -0
  445. data/hyrax.gemspec +7 -8
  446. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +4 -6
  447. data/lib/generators/hyrax/templates/config/locales/hyrax.es.yml +1 -1
  448. data/lib/generators/hyrax/templates/db/seeds.rb +16 -14
  449. data/lib/generators/hyrax/templates/uv.html +1 -1
  450. data/lib/generators/hyrax/work_resource/templates/controller.rb.erb +0 -5
  451. data/lib/generators/hyrax/work_resource/templates/form.rb.erb +1 -1
  452. data/lib/generators/hyrax/work_resource/templates/work.html.erb_spec.rb.erb +3 -2
  453. data/lib/hyrax.rb +17 -0
  454. data/lib/hyrax/configuration.rb +340 -200
  455. data/lib/hyrax/event_store.rb +5 -0
  456. data/lib/hyrax/form_fields.rb +1 -1
  457. data/lib/hyrax/indexer.rb +19 -3
  458. data/lib/hyrax/publisher.rb +71 -2
  459. data/lib/hyrax/resource_sync/change_list_writer.rb +1 -1
  460. data/lib/hyrax/resource_sync/resource_list_writer.rb +1 -1
  461. data/lib/hyrax/schema.rb +2 -2
  462. data/lib/hyrax/specs/capybara.rb +98 -0
  463. data/lib/hyrax/specs/clamav.rb +15 -0
  464. data/lib/hyrax/specs/disable_animations_in_test_environment.rb +53 -0
  465. data/lib/hyrax/specs/engine_routes.rb +11 -0
  466. data/lib/hyrax/specs/shared_specs/change_set.rb +11 -0
  467. data/lib/hyrax/specs/shared_specs/factories/strategies/json_strategy.rb +13 -0
  468. data/lib/hyrax/specs/shared_specs/factories/strategies/valkyrie_resource.rb +0 -11
  469. data/lib/hyrax/specs/shared_specs/hydra_works.rb +6 -0
  470. data/lib/hyrax/specs/shared_specs/indexers.rb +22 -5
  471. data/lib/hyrax/specs/shared_specs/metadata.rb +64 -0
  472. data/lib/hyrax/specs/spy_listener.rb +52 -26
  473. data/lib/hyrax/transactions/container.rb +13 -1
  474. data/lib/hyrax/transactions/steps/add_file_sets.rb +35 -0
  475. data/lib/hyrax/transactions/steps/save.rb +10 -4
  476. data/lib/hyrax/transactions/steps/save_access_control.rb +29 -0
  477. data/lib/hyrax/transactions/steps/set_default_admin_set.rb +1 -1
  478. data/lib/hyrax/transactions/update_work.rb +3 -1
  479. data/lib/hyrax/transactions/work_create.rb +3 -1
  480. data/lib/hyrax/version.rb +1 -1
  481. data/lib/tasks/collection_type_global_id.rake +22 -0
  482. data/lib/tasks/default_admin_set.rake +5 -0
  483. data/lib/wings.rb +1 -1
  484. data/lib/wings/active_fedora_converter.rb +71 -123
  485. data/lib/wings/active_fedora_converter/default_work.rb +129 -0
  486. data/lib/wings/active_fedora_converter/nested_resource.rb +25 -0
  487. data/lib/wings/attribute_transformer.rb +28 -1
  488. data/lib/wings/converter_value_mapper.rb +70 -3
  489. data/lib/wings/model_registry.rb +4 -3
  490. data/lib/wings/model_transformer.rb +25 -7
  491. data/lib/wings/orm_converter.rb +19 -23
  492. data/lib/wings/services/custom_queries/find_collections_by_type.rb +1 -1
  493. data/lib/wings/services/custom_queries/find_file_metadata.rb +65 -38
  494. data/lib/wings/services/file_converter_service.rb +6 -55
  495. data/lib/wings/services/file_metadata_builder.rb +12 -8
  496. data/lib/wings/setup.rb +56 -9
  497. data/lib/wings/transformer_value_mapper.rb +1 -0
  498. data/lib/wings/valkyrie/metadata_adapter.rb +2 -2
  499. data/lib/wings/valkyrie/persister.rb +13 -14
  500. data/lib/wings/valkyrie/storage.rb +94 -0
  501. data/tasks/benchmark.rake +56 -0
  502. data/template.rb +1 -3
  503. metadata +346 -54
  504. data/lib/hyrax/callbacks.rb +0 -27
  505. data/lib/wings/hydra/pcdm/models/concerns/collection_valkyrie_behavior.rb +0 -28
  506. data/lib/wings/hydra/pcdm/models/concerns/object_valkyrie_behavior.rb +0 -28
  507. data/lib/wings/hydra/pcdm/models/concerns/pcdm_valkyrie_behavior.rb +0 -171
  508. data/lib/wings/hydra/works/models/concerns/collection_valkyrie_behavior.rb +0 -31
  509. data/lib/wings/hydra/works/models/concerns/file_set_valkyrie_behavior.rb +0 -31
  510. data/lib/wings/hydra/works/models/concerns/work_valkyrie_behavior.rb +0 -60
  511. data/lib/wings/models/concerns/collection_behavior.rb +0 -39
  512. data/lib/wings/models/multi_checksum.rb +0 -18
  513. data/lib/wings/services/id_converter_service.rb +0 -15
  514. data/lib/wings/valkyrie/storage/active_fedora.rb +0 -27
@@ -0,0 +1,15 @@
1
+ apiVersion: v1
2
+ kind: Pod
3
+ metadata:
4
+ name: "{{ include "hyrax.fullname" . }}-test-connection"
5
+ labels:
6
+ {{- include "hyrax.labels" . | nindent 4 }}
7
+ annotations:
8
+ "helm.sh/hook": test-success
9
+ spec:
10
+ containers:
11
+ - name: wget
12
+ image: busybox
13
+ command: ['wget']
14
+ args: ['{{ include "hyrax.fullname" . }}:{{ .Values.service.port }}']
15
+ restartPolicy: Never
@@ -0,0 +1,97 @@
1
+ # Default values for hyrax.
2
+ # This is a YAML-formatted file.
3
+ # Declare variables to be passed into your templates.
4
+
5
+ replicaCount: 1
6
+
7
+ image:
8
+ repository: samveralabs/dassie
9
+ pullPolicy: IfNotPresent
10
+ # Overrides the image tag whose default is the chart appVersion.
11
+ tag: ""
12
+
13
+ imagePullSecrets: []
14
+ nameOverride: ""
15
+ fullnameOverride: ""
16
+
17
+ serviceAccount:
18
+ # Specifies whether a service account should be created
19
+ create: true
20
+ # Annotations to add to the service account
21
+ annotations: {}
22
+ # The name of the service account to use.
23
+ # If not set and create is true, a name is generated using the fullname template
24
+ name: ""
25
+
26
+ podAnnotations: {}
27
+
28
+ podSecurityContext: {}
29
+ # fsGroup: 2000
30
+
31
+ securityContext: {}
32
+ # capabilities:
33
+ # drop:
34
+ # - ALL
35
+ # readOnlyRootFilesystem: true
36
+ # runAsNonRoot: true
37
+ # runAsUser: 1000
38
+
39
+ service:
40
+ type: ClusterIP
41
+ port: 80
42
+
43
+ ingress:
44
+ enabled: false
45
+ annotations: {}
46
+ # kubernetes.io/ingress.class: nginx
47
+ # kubernetes.io/tls-acme: "true"
48
+ hosts:
49
+ - host: hyrax.local
50
+ paths: []
51
+ tls: []
52
+
53
+ resources: {}
54
+
55
+ fcrepo:
56
+ enabled: true
57
+ fcrepoSecretName: "hyrax.fcrepo.fullname"
58
+ externalDatabaseUsername: "hyrax"
59
+ servicePort: 8080
60
+ postgresql:
61
+ enabled: false
62
+
63
+ memcached:
64
+ enabled: false
65
+
66
+ postgresql:
67
+ enabled: true
68
+ image:
69
+ repository: bitnami/postgresql
70
+ tag: 12.3.0
71
+ postgresqlUsername: hyrax
72
+ postgresqlPassword: hyrax_pass
73
+ postgresqlDatabase: hyrax
74
+ servicePort: 5432
75
+ # cpu: 1000m
76
+ # memory: 1Gi
77
+ # persistence:
78
+ # size: 10Gi
79
+
80
+ redis:
81
+ enabled: true
82
+
83
+ solr:
84
+ enabled: true
85
+
86
+ autoscaling:
87
+ enabled: false
88
+ minReplicas: 1
89
+ maxReplicas: 100
90
+ targetCPUUtilizationPercentage: 80
91
+ # targetMemoryUtilizationPercentage: 80
92
+
93
+ nodeSelector: {}
94
+
95
+ tolerations: []
96
+
97
+ affinity: {}
@@ -1,14 +1,9 @@
1
1
  # frozen_string_literal: true
2
- require 'valkyrie/indexing_adapter'
3
- require 'valkyrie/indexing/solr/indexing_adapter'
4
- require 'valkyrie/indexing/null_indexing_adapter'
5
2
 
6
- Rails.application.config.to_prepare do
7
- Valkyrie::IndexingAdapter.register(
8
- Valkyrie::Indexing::Solr::IndexingAdapter.new,
9
- :solr_index
10
- )
11
- Valkyrie::IndexingAdapter.register(
12
- Valkyrie::Indexing::NullIndexingAdapter.new, :null_index
13
- )
14
- end
3
+ Valkyrie::IndexingAdapter.register(
4
+ Valkyrie::Indexing::Solr::IndexingAdapter.new,
5
+ :solr_index
6
+ )
7
+ Valkyrie::IndexingAdapter.register(
8
+ Valkyrie::Indexing::NullIndexingAdapter.new, :null_index
9
+ )
@@ -6,6 +6,8 @@ Hyrax.publisher.subscribe(Hyrax::Listeners::BatchNotificationListener.new)
6
6
  Hyrax.publisher.subscribe(Hyrax::Listeners::ObjectLifecycleListener.new)
7
7
  Hyrax.publisher.subscribe(Hyrax::Listeners::FileSetLifecycleListener.new)
8
8
  Hyrax.publisher.subscribe(Hyrax::Listeners::FileSetLifecycleNotificationListener.new)
9
+ Hyrax.publisher.subscribe(Hyrax::Listeners::ProxyDepositListener.new)
10
+ Hyrax.publisher.subscribe(Hyrax::Listeners::WorkflowListener.new)
9
11
 
10
12
  # Publish events from old style Hyrax::Callbacks to trigger the listeners
11
13
  # When callbacks are removed and replaced with direct event publication, drop these blocks
@@ -576,7 +576,7 @@ en:
576
576
  desc: Deposit new work through this collection
577
577
  label: Deposit new work through this collection
578
578
  delete:
579
- confirmation: Delete this collection?
579
+ confirmation: Deleting this collection will permanently remove this collection from the repository. Any items in this collection will remain in the repository. Are you sure you want to delete this collection?
580
580
  desc: Delete this collection
581
581
  label: Delete collection
582
582
  edit:
@@ -19,6 +19,9 @@ attributes:
19
19
  multiple: true
20
20
  form:
21
21
  primary: false
22
+ index_keys:
23
+ - "based_near_sim"
24
+ - "based_near_tesim"
22
25
  bibliographic_citation:
23
26
  type: string
24
27
  multiple: true
@@ -33,11 +36,15 @@ attributes:
33
36
  form:
34
37
  required: true
35
38
  primary: true
39
+ index_keys:
40
+ - "creator_tesim"
36
41
  date_created:
37
42
  type: date_time
38
43
  multiple: true
39
44
  form:
40
45
  primary: false
46
+ index_keys:
47
+ - "date_created_tesim"
41
48
  description:
42
49
  type: string
43
50
  multiple: true
@@ -55,6 +62,7 @@ attributes:
55
62
  multiple: true
56
63
  index_keys:
57
64
  - "keyword_sim"
65
+ - "keyword_tesim"
58
66
  form:
59
67
  primary: false
60
68
  publisher:
@@ -83,11 +91,16 @@ attributes:
83
91
  multiple: true
84
92
  form:
85
93
  primary: false
94
+ index_keys:
95
+ - "related_url_tesim"
86
96
  resource_type:
87
97
  type: string
88
98
  multiple: true
89
99
  form:
90
100
  primary: false
101
+ index_keys:
102
+ - "resource_type_sim"
103
+ - "resource_type_tesim"
91
104
  rights_notes:
92
105
  type: string
93
106
  multiple: true
@@ -0,0 +1,20 @@
1
+ ActiveFedora.fedora.connection.send(:init_base_path)
2
+
3
+ puts "\n== Creating default collection types"
4
+ Hyrax::CollectionType.find_or_create_default_collection_type
5
+ Hyrax::CollectionType.find_or_create_admin_set_type
6
+
7
+ puts "\n== Loading workflows"
8
+ Hyrax::Workflow::WorkflowImporter.load_workflows
9
+ errors = Hyrax::Workflow::WorkflowImporter.load_errors
10
+ abort("Failed to process all workflows:\n #{errors.join('\n ')}") unless errors.empty?
11
+
12
+ puts "\n== Creating default admin set"
13
+ admin_set_id = AdminSet.find_or_create_default_admin_set_id
14
+
15
+ # I have found that when I come back to a development
16
+ # environment, that I may have an AdminSet in Fedora, but it is
17
+ # not indexed in Solr. This remediates that situation by
18
+ # ensuring we have an indexed AdminSet
19
+ puts "\n== Ensuring the found or created admin set is indexed"
20
+ AdminSet.find(admin_set_id).update_index
@@ -0,0 +1,132 @@
1
+ version: '3.7'
2
+
3
+ services:
4
+ app: &app
5
+ build:
6
+ context: .
7
+ target: hyrax-engine-dev
8
+ args:
9
+ - EXTRA_APK_PACKAGES=git less
10
+ image: hyrax-engine-dev
11
+ stdin_open: true
12
+ tty: true
13
+ user: root
14
+ env_file:
15
+ - .env
16
+ - .dassie/.env
17
+ environment:
18
+ - RAILS_ROOT=/app/samvera/hyrax-webapp
19
+ depends_on:
20
+ - chrome
21
+ - db_migrate
22
+ - fcrepo
23
+ - memcached
24
+ - postgres
25
+ - redis
26
+ - solr
27
+ ports:
28
+ - 3000:3000
29
+ volumes:
30
+ - .dassie:/app/samvera/hyrax-webapp:cached
31
+ - .:/app/samvera/hyrax-engine:cached
32
+ - hyrax-derivatives:/app/samvera/hyrax-webapp/derivatives
33
+ - hyrax-uploads:/app/samvera/hyrax-webapp/uploads
34
+ - rails-public:/app/samvera/hyrax-webapp/public
35
+ - rails-tmp:/app/samvera/hyrax-webapp/tmp
36
+
37
+ chrome:
38
+ image: selenium/standalone-chrome:3.141
39
+ logging:
40
+ driver: none
41
+ volumes:
42
+ - /dev/shm:/dev/shm
43
+ shm_size: 2G
44
+ ports:
45
+ - "4444:4444"
46
+ - "5959:5900"
47
+
48
+ db_migrate:
49
+ image: hyrax-engine-dev
50
+ user: root
51
+ env_file:
52
+ - .env
53
+ entrypoint: ["sh", "-c"]
54
+ command: db-migrate-seed.sh
55
+ depends_on:
56
+ - postgres
57
+ volumes:
58
+ - .dassie:/app/samvera/hyrax-webapp:cached
59
+ - .:/app/samvera/hyrax-engine:cached
60
+ - rails-public:/app/samvera/hyrax-webapp/public
61
+ - rails-tmp:/app/samvera/hyrax-webapp/tmp
62
+
63
+ postgres:
64
+ image: postgres:latest
65
+ restart: always
66
+ environment:
67
+ - POSTGRES_USER=hyrax_user
68
+ - POSTGRES_PASSWORD=hyrax_password
69
+ - POSTGRES_DB=hyrax
70
+ - POSTGRES_HOST_AUTH_METHOD=trust
71
+ ports:
72
+ - "5432:5432"
73
+ volumes:
74
+ - db:/var/lib/postgresql/data
75
+
76
+ fcrepo:
77
+ image: cbeer/fcrepo4:4.7
78
+ volumes:
79
+ - fcrepo:/data
80
+ ports:
81
+ - 8080:8080
82
+ environment:
83
+ - JAVA_OPTS=${JAVA_OPTS} -Dfcrepo.modeshape.configuration="classpath:/config/file-simple/repository.json" -Dfcrepo.object.directory="/data/objects" -Dfcrepo.binary.directory="/data/binaries"
84
+
85
+ memcached:
86
+ image: bitnami/memcached
87
+ ports:
88
+ - '11211:11211'
89
+
90
+ redis:
91
+ image: redis:5-alpine
92
+ volumes:
93
+ - redis:/data
94
+
95
+ sidekiq:
96
+ build:
97
+ context: .
98
+ target: hyrax-engine-dev-worker
99
+ env_file:
100
+ - .env
101
+ - .dassie/.env
102
+ volumes:
103
+ - .dassie:/app/samvera/hyrax-webapp:cached
104
+ - .:/app/samvera/hyrax-engine:cached
105
+ - hyrax-derivatives:/app/samvera/hyrax-webapp/derivatives
106
+ - hyrax-uploads:/app/samvera/hyrax-webapp/uploads
107
+ - sidekiq-public:/app/samvera/hyrax-webapp/public
108
+ - sidekiq-tmp:/app/samvera/hyrax-webapp/tmp
109
+
110
+ solr:
111
+ image: solr:8.7
112
+ ports:
113
+ - 8983:8983
114
+ command:
115
+ - sh
116
+ - "-c"
117
+ - "precreate-core hyrax_test /opt/solr/server/configsets/hyraxconf; precreate-core hyrax-valkyrie-test /opt/solr/server/configsets/hyraxconf; solr-precreate hyrax /opt/solr/server/configsets/hyraxconf"
118
+ volumes:
119
+ - solr_home:/opt/solr/server/solr
120
+ - .dassie/solr/conf:/opt/solr/server/configsets/hyraxconf
121
+
122
+ volumes:
123
+ db:
124
+ fcrepo:
125
+ hyrax-derivatives:
126
+ hyrax-uploads:
127
+ rails-public:
128
+ rails-tmp:
129
+ redis:
130
+ sidekiq-public:
131
+ sidekiq-tmp:
132
+ solr_home:
@@ -0,0 +1,271 @@
1
+ # Developing Your Hyrax-based Application
2
+
3
+ ## Table of Contents
4
+
5
+ * [Introduction](#introduction)
6
+ * [Prerequisites](#prerequisites)
7
+ * [Characterization](#characterization)
8
+ * [Derivatives](#derivatives)
9
+ * [Transcoding](#transcoding)
10
+ * [Environments](#environments)
11
+ * [Ruby](#ruby)
12
+ * [Redis](#redis)
13
+ * [Rails](#rails)
14
+ * [JavaScript runtime](#javascript-runtime)
15
+ * [Creating a Hyrax\-based app](#creating-a-hyrax-based-app)
16
+ * [Start servers](#start-servers)
17
+ * [Start background workers](#start-background-workers)
18
+ * [Create default administrative set](#create-default-administrative-set)
19
+ * [Generate a work type](#generate-a-work-type)
20
+ * [Enable notifications](#enable-notifications)
21
+ * [Managing a Hyrax\-based app](#managing-a-hyrax-based-app)
22
+ * [Toggling Features](#toggling-features)
23
+
24
+ ## Introduction
25
+
26
+ A Hyrax-based application includes lots of dependencies. We provide a [Docker image for getting started with your Hyrax-based application](/CONTAINERS.md#docker-image-for-hyrax-based-applications).
27
+
28
+ <aside><p><em><strong>Note:</em></strong> The Docker image describes the canonical dependencies. In a way, it is executable documentation. The following documentation is our best effort to transcribe that executable documentation into a narrative. In other words, this documentation may drift away from the Docker details.</p></aside>
29
+
30
+ You can also try [Running Hyrax-based application in local VM](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide#running-hyrax-based-application-in-local-vm) which uses Ubuntu.
31
+
32
+ This document contains instructions specific to setting up an app with __Hyrax
33
+ v3.0.0-rc3__. If you are looking for instructions on installing a different
34
+ version, be sure to select the appropriate branch or tag from the drop-down
35
+ menu above.
36
+
37
+ ## Prerequisites
38
+
39
+ Prerequisites are required for both creating a Hyrax\-based app and contributing new features to Hyrax. After installing the prerequisites...
40
+
41
+ * If you would like to create a new application using Hyrax follow the instructions for [Creating a Hyrax\-based app](#creating-a-hyrax-based-app).
42
+ * If you would like to create new features for Hyrax follow the instructions for [Developing the Hyrax Engine](/README.md#developing-the-hyrax-engine).
43
+
44
+ Hyrax requires the following software to work:
45
+
46
+ 1. [Solr](http://lucene.apache.org/solr/) version >= 5.x (tested up to 8.7.0)
47
+ 1. [Fedora Commons](http://www.fedora-commons.org/) digital repository version >= 4.5.1 (tested up to 4.7.5)
48
+ 1. A SQL RDBMS (MySQL, PostgreSQL), though **note** that SQLite will be used by default if you're looking to get up and running quickly
49
+ 1. [Redis](http://redis.io/), a key-value store
50
+ 1. [ImageMagick](http://www.imagemagick.org/) with JPEG-2000 support
51
+ 1. [FITS](#characterization) version 1.0.x (1.0.5 is known to be good, 1.1.0 is known to be bad: https://github.com/harvard-lts/fits/issues/140)
52
+ 1. [LibreOffice](#derivatives)
53
+ 1. [ffmpeg](#transcoding)
54
+
55
+ **NOTE: The [Hyrax Development Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide) has instructions for installing Solr and Fedora in a development environment.**
56
+
57
+ ### Characterization
58
+
59
+ FITS can be installed on OSX using Homebrew by running the command: `brew install fits`
60
+
61
+ **OR**
62
+
63
+ 1. Go to http://projects.iq.harvard.edu/fits/downloads and download a copy of FITS (see above to pick a known working version) & unpack it somewhere on your machine.
64
+ 1. Mark fits.sh as executable: `chmod a+x fits.sh`
65
+ 1. Run `fits.sh -h` from the command line and see a help message to ensure FITS is properly installed
66
+ 1. Give your Hyrax app access to FITS by:
67
+ 1. Adding the full fits.sh path to your PATH (e.g., in your .bash\_profile), **OR**
68
+ 1. Changing `config/initializers/hyrax.rb` to point to your FITS location: `config.fits_path = "/<your full path>/fits.sh"`
69
+
70
+ ### Derivatives
71
+
72
+ Install [LibreOffice](https://www.libreoffice.org/). If `which soffice` returns a path, you're done. Otherwise, add the full path to soffice to your PATH (in your `.bash_profile`, for instance). On OSX, soffice is **inside** LibreOffice.app. Your path may look like "/path/to/LibreOffice.app/Contents/MacOS/"
73
+
74
+ You may also require [ghostscript](http://www.ghostscript.com/) if it does not come with your compiled version LibreOffice. `brew install ghostscript` should resolve the dependency on an OSX-based machine with Homebrew installed.
75
+
76
+ **NOTE**: Derivatives are served from the filesystem in Hyrax.
77
+
78
+ ### Transcoding
79
+
80
+ Hyrax includes support for transcoding audio and video files with ffmpeg > 1.0 installed.
81
+
82
+ On OSX, you can use Homebrew to install ffmpeg:
83
+
84
+ `brew install libvpx ffmpeg`
85
+
86
+ Otherwise, to compile ffmpeg yourself, see the [ffmpeg compilation guide](https://trac.ffmpeg.org/wiki/CompilationGuide).
87
+
88
+ Once ffmpeg has been installed, enable transcoding by setting `config.enable_ffmpeg = true` in `config/initializers/hyrax.rb`. You may also configure the location of ffmpeg using `config.ffmpeg_path`.
89
+
90
+ ## Environments
91
+
92
+ Note here that the following commands assume you're setting up Hyrax in a development environment (using the Rails built-in development environment). If you're setting up a production or production-like environment, you may wish to tell Rails that by prepending `RAILS_ENV=production` to the commands that follow, e.g., `rails`, `rake`, `bundle`, and so on.
93
+
94
+ ## Ruby
95
+
96
+ First, you'll need a working Ruby installation. You can install this via your operating system's package manager -- you are likely to get farther with OSX, Linux, or UNIX than Windows but your mileage may vary -- but we recommend using a Ruby version manager such as [RVM](https://rvm.io/) or [rbenv](https://github.com/sstephenson/rbenv).
97
+
98
+ Hyrax supports Ruby 2.5, 2.6, and 2.7. When starting a new project, we recommend using the latest Ruby 2.7 version.
99
+
100
+ ## Redis
101
+
102
+ [Redis](http://redis.io/) is a key-value store that Hyrax uses to provide activity streams on repository objects and users, and helps when modifying order-persisting objects by managing multi-threaded actions on data (preventing race conditions as a global mutex).
103
+
104
+ Starting up Redis will depend on your operating system, and may in fact already be started on your system. You may want to consult the [Redis documentation](http://redis.io/documentation) for help doing this.
105
+
106
+ ## Rails
107
+
108
+ Hyrax requires Rails 5. We recommend the latest Rails 5.2 release.
109
+
110
+ ```
111
+ # If you don't already have Rails at your disposal...
112
+ gem install rails -v 5.2.4.4
113
+ ```
114
+
115
+ ### JavaScript runtime
116
+
117
+ Rails requires that you have a JavaScript runtime installed (e.g. nodejs or rubyracer). Either install nodejs or uncomment the `rubyracer` line in your Gemfile and run `bundle install` before running Hyrax's install generator.
118
+
119
+ NOTE: [nodejs](https://nodejs.org/en/) is preinstalled on most Mac computers and doesn't require a gem. To test if nodejs is already installed, execute `node -v` in the terminal and the version of nodejs will be displayed if it is installed.
120
+
121
+ ## Creating a Hyrax-based app
122
+
123
+ NOTE: The steps need to be done in order to create a new Hyrax based app.
124
+
125
+ Generate a new Rails application using the template.
126
+
127
+ ```
128
+ rails _5.2.4.4_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v3.0.0-rc3/template.rb
129
+ ```
130
+
131
+ Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
132
+
133
+ * Adding Hyrax (and any of its dependencies) to your application `Gemfile`, to declare that Hyrax is a dependency of your application
134
+ * Running `bundle install`, to install Hyrax and its dependencies
135
+ * Running Hyrax's install generator, to add a number of files that Hyrax requires within your Rails app, including e.g. database migrations
136
+ * Loading all of Hyrax's database migrations into your application's database
137
+ * Loading Hyrax's default workflows into your application's database
138
+ * Create default collection types (e.g. Admin Set, User Collection)
139
+
140
+ ### Start servers
141
+
142
+ To test-drive your new Hyrax application in development mode, spin up the servers that Hyrax needs (Solr, Fedora, and Rails):
143
+
144
+ ```
145
+ bin/rails hydra:server
146
+ ```
147
+
148
+ And now you should be able to browse to [localhost:3000](http://localhost:3000/) and see the application.
149
+
150
+ Notes:
151
+ * This web server is purely for development purposes. You will want to use a more fully featured [web server](https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide#web-server) for production-like environments.
152
+ * You have the option to start each of these services individually. More information on [solr_wrapper](https://github.com/cbeer/solr_wrapper) and [fcrepo_wrapper](https://github.com/cbeer/fcrepo_wrapper) will help you set this up. Start rails with `rails s`.
153
+
154
+ ### Start background workers
155
+
156
+ Many of the services performed by Hyrax are resource intensive, and therefore are well suited to running as background jobs that can be managed and executed by a message queuing system. Examples include:
157
+
158
+ * File ingest
159
+ * Derivative generation
160
+ * Characterization
161
+ * Fixity
162
+ * Solr indexing
163
+
164
+ Hyrax implements these jobs using the Rails [ActiveJob](http://edgeguides.rubyonrails.org/active_job_basics.html) framework, allowing you to choose the message queue system of your choice.
165
+
166
+ For initial development, it is recommended that you change the default ActiveJob adapter from `:async` to `:inline`. This adapter will execute jobs immediately (in the foreground) as they are received. This can be accomplished by adding the following to your `config/environments/development.rb`
167
+
168
+ ```
169
+ class Application < Rails::Application
170
+ # ...
171
+ config.active_job.queue_adapter = :inline
172
+ # ...
173
+ end
174
+ ```
175
+
176
+ For testing, it is recommended that you use the [built-in `:test` adapter](http://api.rubyonrails.org/classes/ActiveJob/QueueAdapters/TestAdapter.html) which stores enqueued and performed jobs, running only those configured to run during test setup. To do this, add the following to `config/environments/test.rb`:
177
+
178
+ ```ruby
179
+ Rails.application.configure do
180
+ # ...
181
+ config.active_job.queue_adapter = :test
182
+ # ...
183
+ end
184
+ ```
185
+
186
+ **For production applications** you will want to use a more robust message queue system such as [Sidekiq](http://sidekiq.org/). The Hyrax Development Guide has a detailed walkthrough of [installing and configuring Sidekiq](https://github.com/samvera/hyrax/wiki/Using-Sidekiq-with-Hyrax).
187
+
188
+ ### Create default administrative set
189
+
190
+ **After** Fedora and Solr are running, create the default administrative set -- into which all works will be deposited unless assigned to other administrative sets -- by running the following command:
191
+
192
+ ```
193
+ rails hyrax:default_admin_set:create
194
+ ```
195
+
196
+ This command also makes sure that Hyrax's built-in workflows are loaded for your application and available for the default administrative set.
197
+
198
+ **NOTE**: You will want to run this command the first time this code is deployed to a new environment as well.
199
+
200
+ ### Generate a work type
201
+
202
+ Using Hyrax requires generating at least one type of repository object, or "work type." Hyrax allows you to generate the work types required in your application by using a Rails generator-based tool. You may generate one or more of these work types.
203
+
204
+ Pass a (CamelCased) model name to Hyrax's work generator to get started, e.g.:
205
+
206
+ ```
207
+ rails generate hyrax:work Work
208
+ ```
209
+
210
+ or
211
+
212
+ ```
213
+ rails generate hyrax:work MovingImage
214
+ ```
215
+
216
+ If your applications requires your work type to be namespaced, namespaces can be included by adding a slash to the model name which creates a new class called `MovingImage` within the `My` namespace:
217
+
218
+ ```
219
+ rails generate hyrax:work My/MovingImage
220
+ ```
221
+
222
+ You may wish to [customize your work type](https://github.com/samvera/hyrax/wiki/Customizing-your-work-types) now that it's been generated.
223
+
224
+ ### Enable notifications
225
+
226
+ Hyrax 2 uses a WebSocket-based user notifications system, which requires Redis. To enable user notifications, make sure that you have configured ActionCable to use Redis as the adapter in your application's `config/cable.yml`. E.g., for the `development` Rails environment:
227
+
228
+ ```yaml
229
+ development:
230
+ adapter: redis
231
+ url: redis://localhost:6379
232
+ ```
233
+
234
+ Using Rails up to version 5.1.4, ActionCable will not work with the 4.x series of the `redis` gem, so you will also need to pin your application to a 3.x release by adding this to your `Gemfile`:
235
+
236
+ ```ruby
237
+ gem 'redis', '~> 3.0'
238
+ ```
239
+
240
+ And then run `bundle update redis`.
241
+
242
+ Note that the Hyrax Management Guide contains additional information on [how to configure ActionCable in production environments](https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide#notifications).
243
+
244
+ ## Managing a Hyrax-based app
245
+
246
+ The [Hyrax Management Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide) provides tips for how to manage, customize, and enhance your Hyrax application, including guidance specific to:
247
+
248
+ * Production implementations
249
+ * Configuration of background workers
250
+ * Integration with e.g., Dropbox, Google Analytics, and Zotero
251
+ * Audiovisual transcoding with `ffmpeg`
252
+ * Setting up administrative users
253
+ * Metadata customization
254
+ * Virus checking
255
+ * Workflows
256
+
257
+ ### Toggling Features
258
+
259
+ Some features in Hyrax can be flipped on and off from either the Administrative
260
+ Dashboard or via a YAML configuration file at `config/features.yml`. An example
261
+ of the YAML file is below:
262
+
263
+ ```yaml
264
+ assign_admin_set:
265
+ enabled: "false"
266
+ proxy_deposit:
267
+ enabled: "false"
268
+ ```
269
+
270
+ If both options exist, whichever option is set from the Administrative Dashboard
271
+ will take precedence.