hyrax 5.0.4 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/.dassie/.env +4 -0
  3. data/.dassie/Gemfile +15 -11
  4. data/.dassie/app/controllers/application_controller.rb +4 -0
  5. data/.dassie/app/helpers/hyrax_helper.rb +4 -0
  6. data/.dassie/app/models/ability.rb +4 -0
  7. data/.dassie/app/models/user.rb +11 -0
  8. data/.dassie/app/views/shared/_footer.html.erb +17 -0
  9. data/.dassie/bin/rails +0 -5
  10. data/.dassie/bin/rake +0 -5
  11. data/.dassie/config/application.rb +2 -1
  12. data/.dassie/config/database.yml +18 -0
  13. data/.dassie/config/environments/development.rb +1 -1
  14. data/.dassie/config/environments/production.rb +5 -3
  15. data/.dassie/config/environments/test.rb +1 -1
  16. data/.dassie/config/fedora.yml +6 -6
  17. data/.dassie/config/initializers/profiler.rb +5 -0
  18. data/.dassie/config/initializers/riiif.rb +20 -18
  19. data/.dassie/config/locales/hyrax.en.yml +1 -1
  20. data/.dassie/config/puma.rb +55 -5
  21. data/.dassie/config/routes.rb +2 -0
  22. data/.dassie/db/migrate/20250328100249_user_roles.rb +20 -0
  23. data/.dassie/db/schema.rb +122 -110
  24. data/.github/workflows/lint-build-test.yml +35 -6
  25. data/.github/workflows/main.yml +4 -4
  26. data/.koppie/.env +1 -1
  27. data/.koppie/Gemfile +13 -10
  28. data/.koppie/app/controllers/application_controller.rb +4 -0
  29. data/.koppie/app/helpers/hyrax_helper.rb +4 -0
  30. data/.koppie/app/models/ability.rb +4 -0
  31. data/.koppie/app/models/user.rb +10 -0
  32. data/.koppie/app/views/shared/_footer.html.erb +17 -0
  33. data/.koppie/bin/rails +0 -5
  34. data/.koppie/bin/rake +0 -5
  35. data/.koppie/config/application.rb +2 -1
  36. data/.koppie/config/database.yml +2 -9
  37. data/.koppie/config/environments/development.rb +10 -1
  38. data/.koppie/config/environments/production.rb +5 -3
  39. data/.koppie/config/environments/test.rb +1 -1
  40. data/.koppie/config/initializers/1_valkyrie.rb +5 -5
  41. data/.koppie/config/initializers/hyrax.rb +20 -17
  42. data/.koppie/config/initializers/profiler.rb +5 -0
  43. data/.koppie/config/initializers/riiif.rb +21 -18
  44. data/.koppie/config/locales/hyrax.en.yml +2 -2
  45. data/.koppie/config/puma.rb +26 -7
  46. data/.koppie/config/routes.rb +2 -0
  47. data/.koppie/db/schema.rb +109 -110
  48. data/Dockerfile +110 -51
  49. data/app/actors/hyrax/actors/add_to_work_actor.rb +1 -1
  50. data/app/actors/hyrax/actors/apply_order_actor.rb +1 -1
  51. data/app/assets/stylesheets/hyrax/_tinymce.scss +6 -0
  52. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +1 -0
  53. data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +4 -4
  54. data/app/controllers/hyrax/api/zotero_controller.rb +1 -1
  55. data/app/controllers/hyrax/file_sets_controller.rb +11 -0
  56. data/app/jobs/batch_create_job.rb +2 -2
  57. data/app/models/admin_set.rb +2 -2
  58. data/app/models/concerns/hyrax/permissions/writable.rb +1 -2
  59. data/app/models/concerns/hyrax/valkyrie_lazy_migration.rb +1 -0
  60. data/app/models/hyrax/collection_type.rb +4 -4
  61. data/app/models/single_use_link.rb +1 -1
  62. data/app/services/hyrax/listeners.rb +1 -0
  63. data/app/services/hyrax/statistics/term_query.rb +1 -1
  64. data/app/services/hyrax/user_stat_importer.rb +1 -1
  65. data/app/services/hyrax/workflow.rb +8 -0
  66. data/app/validators/hyrax/has_one_title_validator.rb +1 -1
  67. data/app/views/hyrax/base/iiif_viewers/_universal_viewer.html.erb +1 -1
  68. data/bin/db-migrate-seed.sh +1 -1
  69. data/bin/dev-entrypoint.sh +3 -0
  70. data/config/initializers/1_healthz.rb +2 -1
  71. data/config/initializers/ar_test_fixture_monkey_patch.rb +8 -0
  72. data/config/initializers/arel_rails_7_2_monkey_patch.rb +6 -0
  73. data/config/initializers/listeners.rb +4 -2
  74. data/config/initializers/new_framework_defaults_7_2.rb +8 -0
  75. data/docker-compose-dassie.yml +2 -2
  76. data/docker-compose-koppie.yml +2 -2
  77. data/docker-compose-sirenia.yml +3 -3
  78. data/documentation/developing-your-hyrax-based-app.md +6 -6
  79. data/hyrax.gemspec +9 -9
  80. data/lib/generators/hyrax/config_generator.rb +0 -5
  81. data/lib/generators/hyrax/install_generator.rb +1 -6
  82. data/lib/generators/hyrax/templates/.env +1 -1
  83. data/lib/generators/hyrax/templates/config/initializers/1_valkyrie.rb +21 -19
  84. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +21 -19
  85. data/lib/generators/hyrax/templates/db/migrate/20170131142607_add_permission_template_to_sipity_workflow.rb.erb +1 -1
  86. data/lib/generators/hyrax/templates/db/migrate/20170810190549_update_collection_type_column_options.rb.erb +1 -1
  87. data/lib/generators/hyrax/templates/db/migrate/20230821153635_add_fields_to_counter_metric.rb.erb +1 -1
  88. data/lib/hyrax/configuration.rb +1 -0
  89. data/lib/hyrax/controlled_vocabulary/importer/language.rb +1 -1
  90. data/lib/hyrax/engine.rb +15 -10
  91. data/lib/hyrax/version.rb +1 -1
  92. data/lib/hyrax.rb +4 -0
  93. data/lib/tasks/workflow.rake +1 -2
  94. data/template.rb +6 -1
  95. metadata +49 -44
  96. data/.dassie/bin/spring +0 -17
  97. data/.dassie/config/initializers/mini_magick.rb +0 -6
  98. data/.dassie/config/spring.rb +0 -6
  99. data/.koppie/bin/spring +0 -17
  100. data/.koppie/config/initializers/mini_magick.rb +0 -6
  101. data/.koppie/config/spring.rb +0 -6
  102. data/config/initializers/reform_rails_6_1_monkey_patch.rb +0 -27
  103. data/lib/generators/hyrax/templates/config/initializers/mini_magick.rb +0 -6
data/.dassie/db/schema.rb CHANGED
@@ -10,8 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2024_05_06_070809) do
14
-
13
+ ActiveRecord::Schema[7.2].define(version: 2025_03_28_100249) do
15
14
  # These are extensions that must be enabled in order to support this database
16
15
  enable_extension "plpgsql"
17
16
  enable_extension "uuid-ossp"
@@ -22,8 +21,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
22
21
  t.string "document_id"
23
22
  t.string "document_type"
24
23
  t.binary "title"
25
- t.datetime "created_at", null: false
26
- t.datetime "updated_at", null: false
24
+ t.datetime "created_at", precision: nil, null: false
25
+ t.datetime "updated_at", precision: nil, null: false
27
26
  t.index ["document_id"], name: "index_bookmarks_on_document_id"
28
27
  t.index ["user_id"], name: "index_bookmarks_on_user_id"
29
28
  end
@@ -34,8 +33,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
34
33
  t.string "checked_uri"
35
34
  t.string "expected_result"
36
35
  t.string "actual_result"
37
- t.datetime "created_at", null: false
38
- t.datetime "updated_at", null: false
36
+ t.datetime "created_at", precision: nil, null: false
37
+ t.datetime "updated_at", precision: nil, null: false
39
38
  t.boolean "passed"
40
39
  t.index ["checked_uri"], name: "index_checksum_audit_logs_on_checked_uri"
41
40
  t.index ["file_set_id", "file_id"], name: "by_file_set_id_and_file_id"
@@ -49,8 +48,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
49
48
  t.string "target_url"
50
49
  t.integer "height"
51
50
  t.integer "width"
52
- t.datetime "created_at", null: false
53
- t.datetime "updated_at", null: false
51
+ t.datetime "created_at", precision: nil, null: false
52
+ t.datetime "updated_at", precision: nil, null: false
54
53
  end
55
54
 
56
55
  create_table "collection_type_participants", force: :cascade do |t|
@@ -58,16 +57,16 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
58
57
  t.string "agent_type"
59
58
  t.string "agent_id"
60
59
  t.string "access"
61
- t.datetime "created_at", null: false
62
- t.datetime "updated_at", null: false
60
+ t.datetime "created_at", precision: nil, null: false
61
+ t.datetime "updated_at", precision: nil, null: false
63
62
  t.index ["hyrax_collection_type_id"], name: "hyrax_collection_type_id"
64
63
  end
65
64
 
66
65
  create_table "content_blocks", force: :cascade do |t|
67
66
  t.string "name"
68
67
  t.text "value"
69
- t.datetime "created_at", null: false
70
- t.datetime "updated_at", null: false
68
+ t.datetime "created_at", precision: nil, null: false
69
+ t.datetime "updated_at", precision: nil, null: false
71
70
  t.string "external_key"
72
71
  end
73
72
 
@@ -84,8 +83,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
84
83
  t.integer "rgt", null: false
85
84
  t.integer "depth", default: 0, null: false
86
85
  t.integer "children_count", default: 0, null: false
87
- t.datetime "created_at", null: false
88
- t.datetime "updated_at", null: false
86
+ t.datetime "created_at", precision: nil, null: false
87
+ t.datetime "updated_at", precision: nil, null: false
89
88
  t.index ["lft"], name: "index_curation_concerns_operations_on_lft"
90
89
  t.index ["parent_id"], name: "index_curation_concerns_operations_on_parent_id"
91
90
  t.index ["rgt"], name: "index_curation_concerns_operations_on_rgt"
@@ -95,29 +94,29 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
95
94
  create_table "featured_works", force: :cascade do |t|
96
95
  t.integer "order", default: 5
97
96
  t.string "work_id"
98
- t.datetime "created_at", null: false
99
- t.datetime "updated_at", null: false
97
+ t.datetime "created_at", precision: nil, null: false
98
+ t.datetime "updated_at", precision: nil, null: false
100
99
  t.index ["order"], name: "index_featured_works_on_order"
101
100
  t.index ["work_id"], name: "index_featured_works_on_work_id"
102
101
  end
103
102
 
104
103
  create_table "file_download_stats", force: :cascade do |t|
105
- t.datetime "date"
104
+ t.datetime "date", precision: nil
106
105
  t.integer "downloads"
107
106
  t.string "file_id"
108
- t.datetime "created_at", null: false
109
- t.datetime "updated_at", null: false
107
+ t.datetime "created_at", precision: nil, null: false
108
+ t.datetime "updated_at", precision: nil, null: false
110
109
  t.integer "user_id"
111
110
  t.index ["file_id"], name: "index_file_download_stats_on_file_id"
112
111
  t.index ["user_id"], name: "index_file_download_stats_on_user_id"
113
112
  end
114
113
 
115
114
  create_table "file_view_stats", force: :cascade do |t|
116
- t.datetime "date"
115
+ t.datetime "date", precision: nil
117
116
  t.integer "views"
118
117
  t.string "file_id"
119
- t.datetime "created_at", null: false
120
- t.datetime "updated_at", null: false
118
+ t.datetime "created_at", precision: nil, null: false
119
+ t.datetime "updated_at", precision: nil, null: false
121
120
  t.integer "user_id"
122
121
  t.index ["file_id"], name: "index_file_view_stats_on_file_id"
123
122
  t.index ["user_id"], name: "index_file_view_stats_on_user_id"
@@ -147,8 +146,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
147
146
  t.date "date"
148
147
  t.integer "total_item_investigations"
149
148
  t.integer "total_item_requests"
150
- t.datetime "created_at", null: false
151
- t.datetime "updated_at", null: false
149
+ t.datetime "created_at", precision: nil, null: false
150
+ t.datetime "updated_at", precision: nil, null: false
152
151
  t.string "title"
153
152
  t.integer "year_of_publication"
154
153
  t.string "publisher"
@@ -161,15 +160,15 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
161
160
 
162
161
  create_table "hyrax_default_administrative_set", force: :cascade do |t|
163
162
  t.string "default_admin_set_id", null: false
164
- t.datetime "created_at", null: false
165
- t.datetime "updated_at", null: false
163
+ t.datetime "created_at", precision: nil, null: false
164
+ t.datetime "updated_at", precision: nil, null: false
166
165
  end
167
166
 
168
167
  create_table "hyrax_features", force: :cascade do |t|
169
168
  t.string "key", null: false
170
169
  t.boolean "enabled", default: false, null: false
171
- t.datetime "created_at", null: false
172
- t.datetime "updated_at", null: false
170
+ t.datetime "created_at", precision: nil, null: false
171
+ t.datetime "updated_at", precision: nil, null: false
173
172
  end
174
173
 
175
174
  create_table "job_io_wrappers", force: :cascade do |t|
@@ -180,8 +179,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
180
179
  t.string "original_name"
181
180
  t.string "path"
182
181
  t.string "relation"
183
- t.datetime "created_at", null: false
184
- t.datetime "updated_at", null: false
182
+ t.datetime "created_at", precision: nil, null: false
183
+ t.datetime "updated_at", precision: nil, null: false
185
184
  t.index ["uploaded_file_id"], name: "index_job_io_wrappers_on_uploaded_file_id"
186
185
  t.index ["user_id"], name: "index_job_io_wrappers_on_user_id"
187
186
  end
@@ -196,8 +195,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
196
195
 
197
196
  create_table "mailboxer_conversations", id: :serial, force: :cascade do |t|
198
197
  t.string "subject", default: ""
199
- t.datetime "created_at", null: false
200
- t.datetime "updated_at", null: false
198
+ t.datetime "created_at", precision: nil, null: false
199
+ t.datetime "updated_at", precision: nil, null: false
201
200
  end
202
201
 
203
202
  create_table "mailboxer_notifications", id: :serial, force: :cascade do |t|
@@ -212,10 +211,10 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
212
211
  t.string "notified_object_type"
213
212
  t.integer "notified_object_id"
214
213
  t.string "attachment"
215
- t.datetime "updated_at", null: false
216
- t.datetime "created_at", null: false
214
+ t.datetime "updated_at", precision: nil, null: false
215
+ t.datetime "created_at", precision: nil, null: false
217
216
  t.boolean "global", default: false
218
- t.datetime "expires"
217
+ t.datetime "expires", precision: nil
219
218
  t.index ["conversation_id"], name: "index_mailboxer_notifications_on_conversation_id"
220
219
  t.index ["notified_object_id", "notified_object_type"], name: "index_mailboxer_notifications_on_notified_object_id_and_type"
221
220
  t.index ["notified_object_type", "notified_object_id"], name: "mailboxer_notifications_notified_object"
@@ -231,8 +230,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
231
230
  t.boolean "trashed", default: false
232
231
  t.boolean "deleted", default: false
233
232
  t.string "mailbox_type", limit: 25
234
- t.datetime "created_at", null: false
235
- t.datetime "updated_at", null: false
233
+ t.datetime "created_at", precision: nil, null: false
234
+ t.datetime "updated_at", precision: nil, null: false
236
235
  t.boolean "is_delivered", default: false
237
236
  t.string "delivery_method"
238
237
  t.string "message_id"
@@ -246,15 +245,15 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
246
245
  t.text "counters"
247
246
  t.bigint "seq", default: 0
248
247
  t.binary "rand"
249
- t.datetime "created_at", null: false
250
- t.datetime "updated_at", null: false
248
+ t.datetime "created_at", precision: nil, null: false
249
+ t.datetime "updated_at", precision: nil, null: false
251
250
  t.index ["namespace"], name: "index_minter_states_on_namespace", unique: true
252
251
  end
253
252
 
254
253
  create_table "orm_resources", id: :text, default: -> { "(uuid_generate_v4())::text" }, force: :cascade do |t|
255
254
  t.jsonb "metadata", default: {}, null: false
256
- t.datetime "created_at", null: false
257
- t.datetime "updated_at", null: false
255
+ t.datetime "created_at", precision: nil, null: false
256
+ t.datetime "updated_at", precision: nil, null: false
258
257
  t.string "internal_resource"
259
258
  t.integer "lock_version"
260
259
  t.index ["internal_resource"], name: "index_orm_resources_on_internal_resource"
@@ -268,8 +267,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
268
267
  t.string "agent_type"
269
268
  t.string "agent_id"
270
269
  t.string "access"
271
- t.datetime "created_at", null: false
272
- t.datetime "updated_at", null: false
270
+ t.datetime "created_at", precision: nil, null: false
271
+ t.datetime "updated_at", precision: nil, null: false
273
272
  t.index ["permission_template_id", "agent_id", "agent_type", "access"], name: "uk_permission_template_accesses", unique: true
274
273
  t.index ["permission_template_id"], name: "index_permission_template_accesses_on_permission_template_id"
275
274
  end
@@ -277,8 +276,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
277
276
  create_table "permission_templates", force: :cascade do |t|
278
277
  t.string "source_id"
279
278
  t.string "visibility"
280
- t.datetime "created_at", null: false
281
- t.datetime "updated_at", null: false
279
+ t.datetime "created_at", precision: nil, null: false
280
+ t.datetime "updated_at", precision: nil, null: false
282
281
  t.date "release_date"
283
282
  t.string "release_period"
284
283
  t.index ["source_id"], name: "index_permission_templates_on_source_id", unique: true
@@ -288,12 +287,12 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
288
287
  t.string "work_id", null: false
289
288
  t.bigint "sending_user_id", null: false
290
289
  t.bigint "receiving_user_id", null: false
291
- t.datetime "fulfillment_date"
290
+ t.datetime "fulfillment_date", precision: nil
292
291
  t.string "status", default: "pending", null: false
293
292
  t.text "sender_comment"
294
293
  t.text "receiver_comment"
295
- t.datetime "created_at", null: false
296
- t.datetime "updated_at", null: false
294
+ t.datetime "created_at", precision: nil, null: false
295
+ t.datetime "updated_at", precision: nil, null: false
297
296
  t.index ["receiving_user_id"], name: "index_proxy_deposit_requests_on_receiving_user_id"
298
297
  t.index ["sending_user_id"], name: "index_proxy_deposit_requests_on_sending_user_id"
299
298
  end
@@ -301,16 +300,16 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
301
300
  create_table "proxy_deposit_rights", force: :cascade do |t|
302
301
  t.bigint "grantor_id"
303
302
  t.bigint "grantee_id"
304
- t.datetime "created_at", null: false
305
- t.datetime "updated_at", null: false
303
+ t.datetime "created_at", precision: nil, null: false
304
+ t.datetime "updated_at", precision: nil, null: false
306
305
  t.index ["grantee_id"], name: "index_proxy_deposit_rights_on_grantee_id"
307
306
  t.index ["grantor_id"], name: "index_proxy_deposit_rights_on_grantor_id"
308
307
  end
309
308
 
310
309
  create_table "qa_local_authorities", force: :cascade do |t|
311
310
  t.string "name"
312
- t.datetime "created_at", null: false
313
- t.datetime "updated_at", null: false
311
+ t.datetime "created_at", precision: nil, null: false
312
+ t.datetime "updated_at", precision: nil, null: false
314
313
  t.index ["name"], name: "index_qa_local_authorities_on_name", unique: true
315
314
  end
316
315
 
@@ -318,18 +317,31 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
318
317
  t.bigint "local_authority_id"
319
318
  t.string "label"
320
319
  t.string "uri"
321
- t.datetime "created_at", null: false
322
- t.datetime "updated_at", null: false
320
+ t.datetime "created_at", precision: nil, null: false
321
+ t.datetime "updated_at", precision: nil, null: false
323
322
  t.index ["local_authority_id"], name: "index_qa_local_authority_entries_on_local_authority_id"
324
323
  t.index ["uri"], name: "index_qa_local_authority_entries_on_uri", unique: true
325
324
  end
326
325
 
326
+ create_table "roles", id: :serial, force: :cascade do |t|
327
+ t.string "name"
328
+ end
329
+
330
+ create_table "roles_users", id: false, force: :cascade do |t|
331
+ t.integer "role_id"
332
+ t.integer "user_id"
333
+ t.index ["role_id", "user_id"], name: "index_roles_users_on_role_id_and_user_id"
334
+ t.index ["role_id"], name: "index_roles_users_on_role_id"
335
+ t.index ["user_id", "role_id"], name: "index_roles_users_on_user_id_and_role_id"
336
+ t.index ["user_id"], name: "index_roles_users_on_user_id"
337
+ end
338
+
327
339
  create_table "searches", id: :serial, force: :cascade do |t|
328
340
  t.binary "query_params"
329
341
  t.integer "user_id"
330
342
  t.string "user_type"
331
- t.datetime "created_at", null: false
332
- t.datetime "updated_at", null: false
343
+ t.datetime "created_at", precision: nil, null: false
344
+ t.datetime "updated_at", precision: nil, null: false
333
345
  t.index ["user_id"], name: "index_searches_on_user_id"
334
346
  end
335
347
 
@@ -337,16 +349,16 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
337
349
  t.string "download_key"
338
350
  t.string "path"
339
351
  t.string "item_id"
340
- t.datetime "expires"
341
- t.datetime "created_at", null: false
342
- t.datetime "updated_at", null: false
352
+ t.datetime "expires", precision: nil
353
+ t.datetime "created_at", precision: nil, null: false
354
+ t.datetime "updated_at", precision: nil, null: false
343
355
  end
344
356
 
345
357
  create_table "sipity_agents", force: :cascade do |t|
346
358
  t.string "proxy_for_id", null: false
347
359
  t.string "proxy_for_type", null: false
348
- t.datetime "created_at", null: false
349
- t.datetime "updated_at", null: false
360
+ t.datetime "created_at", precision: nil, null: false
361
+ t.datetime "updated_at", precision: nil, null: false
350
362
  t.index ["proxy_for_id", "proxy_for_type"], name: "sipity_agents_proxy_for", unique: true
351
363
  end
352
364
 
@@ -354,8 +366,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
354
366
  t.integer "entity_id", null: false
355
367
  t.integer "agent_id", null: false
356
368
  t.text "comment"
357
- t.datetime "created_at", null: false
358
- t.datetime "updated_at", null: false
369
+ t.datetime "created_at", precision: nil, null: false
370
+ t.datetime "updated_at", precision: nil, null: false
359
371
  t.index ["agent_id"], name: "index_sipity_comments_on_agent_id"
360
372
  t.index ["created_at"], name: "index_sipity_comments_on_created_at"
361
373
  t.index ["entity_id"], name: "index_sipity_comments_on_entity_id"
@@ -365,8 +377,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
365
377
  t.string "proxy_for_global_id", null: false
366
378
  t.integer "workflow_id", null: false
367
379
  t.integer "workflow_state_id"
368
- t.datetime "created_at", null: false
369
- t.datetime "updated_at", null: false
380
+ t.datetime "created_at", precision: nil, null: false
381
+ t.datetime "updated_at", precision: nil, null: false
370
382
  t.index ["proxy_for_global_id"], name: "sipity_entities_proxy_for_global_id", unique: true
371
383
  t.index ["workflow_id"], name: "index_sipity_entities_on_workflow_id"
372
384
  t.index ["workflow_state_id"], name: "index_sipity_entities_on_workflow_state_id"
@@ -376,8 +388,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
376
388
  t.integer "workflow_role_id", null: false
377
389
  t.integer "entity_id", null: false
378
390
  t.integer "agent_id", null: false
379
- t.datetime "created_at", null: false
380
- t.datetime "updated_at", null: false
391
+ t.datetime "created_at", precision: nil, null: false
392
+ t.datetime "updated_at", precision: nil, null: false
381
393
  t.index ["agent_id"], name: "sipity_entity_specific_responsibilities_agent"
382
394
  t.index ["entity_id"], name: "sipity_entity_specific_responsibilities_entity"
383
395
  t.index ["workflow_role_id", "entity_id", "agent_id"], name: "sipity_entity_specific_responsibilities_aggregate", unique: true
@@ -389,8 +401,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
389
401
  t.string "scope_for_notification_type", null: false
390
402
  t.string "reason_for_notification", null: false
391
403
  t.integer "notification_id", null: false
392
- t.datetime "created_at", null: false
393
- t.datetime "updated_at", null: false
404
+ t.datetime "created_at", precision: nil, null: false
405
+ t.datetime "updated_at", precision: nil, null: false
394
406
  t.index ["notification_id"], name: "sipity_notifiable_contexts_notification_id"
395
407
  t.index ["scope_for_notification_id", "scope_for_notification_type", "reason_for_notification", "notification_id"], name: "sipity_notifiable_contexts_concern_surrogate", unique: true
396
408
  t.index ["scope_for_notification_id", "scope_for_notification_type", "reason_for_notification"], name: "sipity_notifiable_contexts_concern_context"
@@ -401,8 +413,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
401
413
  t.integer "notification_id", null: false
402
414
  t.integer "role_id", null: false
403
415
  t.string "recipient_strategy", null: false
404
- t.datetime "created_at", null: false
405
- t.datetime "updated_at", null: false
416
+ t.datetime "created_at", precision: nil, null: false
417
+ t.datetime "updated_at", precision: nil, null: false
406
418
  t.index ["notification_id", "role_id", "recipient_strategy"], name: "sipity_notifications_recipients_surrogate"
407
419
  t.index ["notification_id"], name: "sipity_notification_recipients_notification"
408
420
  t.index ["recipient_strategy"], name: "sipity_notification_recipients_recipient_strategy"
@@ -412,8 +424,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
412
424
  create_table "sipity_notifications", force: :cascade do |t|
413
425
  t.string "name", null: false
414
426
  t.string "notification_type", null: false
415
- t.datetime "created_at", null: false
416
- t.datetime "updated_at", null: false
427
+ t.datetime "created_at", precision: nil, null: false
428
+ t.datetime "updated_at", precision: nil, null: false
417
429
  t.index ["name"], name: "index_sipity_notifications_on_name", unique: true
418
430
  t.index ["notification_type"], name: "index_sipity_notifications_on_notification_type"
419
431
  end
@@ -421,8 +433,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
421
433
  create_table "sipity_roles", force: :cascade do |t|
422
434
  t.string "name", null: false
423
435
  t.text "description"
424
- t.datetime "created_at", null: false
425
- t.datetime "updated_at", null: false
436
+ t.datetime "created_at", precision: nil, null: false
437
+ t.datetime "updated_at", precision: nil, null: false
426
438
  t.index ["name"], name: "index_sipity_roles_on_name", unique: true
427
439
  end
428
440
 
@@ -430,8 +442,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
430
442
  t.integer "workflow_id", null: false
431
443
  t.integer "resulting_workflow_state_id"
432
444
  t.string "name", null: false
433
- t.datetime "created_at", null: false
434
- t.datetime "updated_at", null: false
445
+ t.datetime "created_at", precision: nil, null: false
446
+ t.datetime "updated_at", precision: nil, null: false
435
447
  t.index ["resulting_workflow_state_id"], name: "sipity_workflow_actions_resulting_workflow_state"
436
448
  t.index ["workflow_id", "name"], name: "sipity_workflow_actions_aggregate", unique: true
437
449
  t.index ["workflow_id"], name: "sipity_workflow_actions_workflow"
@@ -441,48 +453,48 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
441
453
  t.string "service_name", null: false
442
454
  t.integer "weight", null: false
443
455
  t.integer "workflow_action_id", null: false
444
- t.datetime "created_at", null: false
445
- t.datetime "updated_at", null: false
456
+ t.datetime "created_at", precision: nil, null: false
457
+ t.datetime "updated_at", precision: nil, null: false
446
458
  t.index ["workflow_action_id"], name: "index_sipity_workflow_methods_on_workflow_action_id"
447
459
  end
448
460
 
449
461
  create_table "sipity_workflow_responsibilities", force: :cascade do |t|
450
462
  t.integer "agent_id", null: false
451
463
  t.integer "workflow_role_id", null: false
452
- t.datetime "created_at", null: false
453
- t.datetime "updated_at", null: false
464
+ t.datetime "created_at", precision: nil, null: false
465
+ t.datetime "updated_at", precision: nil, null: false
454
466
  t.index ["agent_id", "workflow_role_id"], name: "sipity_workflow_responsibilities_aggregate", unique: true
455
467
  end
456
468
 
457
469
  create_table "sipity_workflow_roles", force: :cascade do |t|
458
470
  t.integer "workflow_id", null: false
459
471
  t.integer "role_id", null: false
460
- t.datetime "created_at", null: false
461
- t.datetime "updated_at", null: false
472
+ t.datetime "created_at", precision: nil, null: false
473
+ t.datetime "updated_at", precision: nil, null: false
462
474
  t.index ["workflow_id", "role_id"], name: "sipity_workflow_roles_aggregate", unique: true
463
475
  end
464
476
 
465
477
  create_table "sipity_workflow_state_action_permissions", force: :cascade do |t|
466
478
  t.integer "workflow_role_id", null: false
467
479
  t.integer "workflow_state_action_id", null: false
468
- t.datetime "created_at", null: false
469
- t.datetime "updated_at", null: false
480
+ t.datetime "created_at", precision: nil, null: false
481
+ t.datetime "updated_at", precision: nil, null: false
470
482
  t.index ["workflow_role_id", "workflow_state_action_id"], name: "sipity_workflow_state_action_permissions_aggregate", unique: true
471
483
  end
472
484
 
473
485
  create_table "sipity_workflow_state_actions", force: :cascade do |t|
474
486
  t.integer "originating_workflow_state_id", null: false
475
487
  t.integer "workflow_action_id", null: false
476
- t.datetime "created_at", null: false
477
- t.datetime "updated_at", null: false
488
+ t.datetime "created_at", precision: nil, null: false
489
+ t.datetime "updated_at", precision: nil, null: false
478
490
  t.index ["originating_workflow_state_id", "workflow_action_id"], name: "sipity_workflow_state_actions_aggregate", unique: true
479
491
  end
480
492
 
481
493
  create_table "sipity_workflow_states", force: :cascade do |t|
482
494
  t.integer "workflow_id", null: false
483
495
  t.string "name", null: false
484
- t.datetime "created_at", null: false
485
- t.datetime "updated_at", null: false
496
+ t.datetime "created_at", precision: nil, null: false
497
+ t.datetime "updated_at", precision: nil, null: false
486
498
  t.index ["name"], name: "index_sipity_workflow_states_on_name"
487
499
  t.index ["workflow_id", "name"], name: "sipity_type_state_aggregate", unique: true
488
500
  end
@@ -491,8 +503,8 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
491
503
  t.string "name", null: false
492
504
  t.string "label"
493
505
  t.text "description"
494
- t.datetime "created_at", null: false
495
- t.datetime "updated_at", null: false
506
+ t.datetime "created_at", precision: nil, null: false
507
+ t.datetime "updated_at", precision: nil, null: false
496
508
  t.integer "permission_template_id"
497
509
  t.boolean "active"
498
510
  t.boolean "allows_access_grant"
@@ -501,34 +513,34 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
501
513
 
502
514
  create_table "tinymce_assets", force: :cascade do |t|
503
515
  t.string "file"
504
- t.datetime "created_at", null: false
505
- t.datetime "updated_at", null: false
516
+ t.datetime "created_at", precision: nil, null: false
517
+ t.datetime "updated_at", precision: nil, null: false
506
518
  end
507
519
 
508
520
  create_table "trophies", force: :cascade do |t|
509
521
  t.integer "user_id"
510
522
  t.string "work_id"
511
- t.datetime "created_at", null: false
512
- t.datetime "updated_at", null: false
523
+ t.datetime "created_at", precision: nil, null: false
524
+ t.datetime "updated_at", precision: nil, null: false
513
525
  end
514
526
 
515
527
  create_table "uploaded_files", force: :cascade do |t|
516
528
  t.string "file"
517
529
  t.bigint "user_id"
518
530
  t.string "file_set_uri"
519
- t.datetime "created_at", null: false
520
- t.datetime "updated_at", null: false
531
+ t.datetime "created_at", precision: nil, null: false
532
+ t.datetime "updated_at", precision: nil, null: false
521
533
  t.index ["file_set_uri"], name: "index_uploaded_files_on_file_set_uri"
522
534
  t.index ["user_id"], name: "index_uploaded_files_on_user_id"
523
535
  end
524
536
 
525
537
  create_table "user_stats", force: :cascade do |t|
526
538
  t.integer "user_id"
527
- t.datetime "date"
539
+ t.datetime "date", precision: nil
528
540
  t.integer "file_views"
529
541
  t.integer "file_downloads"
530
- t.datetime "created_at", null: false
531
- t.datetime "updated_at", null: false
542
+ t.datetime "created_at", precision: nil, null: false
543
+ t.datetime "updated_at", precision: nil, null: false
532
544
  t.integer "work_views"
533
545
  t.index ["user_id"], name: "index_user_stats_on_user_id"
534
546
  end
@@ -537,10 +549,10 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
537
549
  t.string "email", default: "", null: false
538
550
  t.string "encrypted_password", default: "", null: false
539
551
  t.string "reset_password_token"
540
- t.datetime "reset_password_sent_at"
541
- t.datetime "remember_created_at"
542
- t.datetime "created_at", null: false
543
- t.datetime "updated_at", null: false
552
+ t.datetime "reset_password_sent_at", precision: nil
553
+ t.datetime "remember_created_at", precision: nil
554
+ t.datetime "created_at", precision: nil, null: false
555
+ t.datetime "updated_at", precision: nil, null: false
544
556
  t.boolean "guest", default: false
545
557
  t.string "facebook_handle"
546
558
  t.string "twitter_handle"
@@ -558,7 +570,7 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
558
570
  t.string "avatar_file_name"
559
571
  t.string "avatar_content_type"
560
572
  t.integer "avatar_file_size"
561
- t.datetime "avatar_updated_at"
573
+ t.datetime "avatar_updated_at", precision: nil
562
574
  t.string "linkedin_handle"
563
575
  t.string "orcid"
564
576
  t.string "arkivo_token"
@@ -575,16 +587,16 @@ ActiveRecord::Schema.define(version: 2024_05_06_070809) do
575
587
  t.string "datastream_id"
576
588
  t.string "version_id"
577
589
  t.string "committer_login"
578
- t.datetime "created_at", null: false
579
- t.datetime "updated_at", null: false
590
+ t.datetime "created_at", precision: nil, null: false
591
+ t.datetime "updated_at", precision: nil, null: false
580
592
  end
581
593
 
582
594
  create_table "work_view_stats", force: :cascade do |t|
583
- t.datetime "date"
595
+ t.datetime "date", precision: nil
584
596
  t.integer "work_views"
585
597
  t.string "work_id"
586
- t.datetime "created_at", null: false
587
- t.datetime "updated_at", null: false
598
+ t.datetime "created_at", precision: nil, null: false
599
+ t.datetime "updated_at", precision: nil, null: false
588
600
  t.integer "user_id"
589
601
  t.index ["user_id"], name: "index_work_view_stats_on_user_id"
590
602
  t.index ["work_id"], name: "index_work_view_stats_on_work_id"
@@ -17,6 +17,7 @@ on:
17
17
 
18
18
  env:
19
19
  REGISTRY: ghcr.io
20
+ IMAGE_NAME: ${{ github.repository }}-dev
20
21
  DOCKER_BUILDKIT: 1
21
22
  COMPOSE_DOCKER_CLI_BUILD: 1
22
23
 
@@ -27,7 +28,7 @@ jobs:
27
28
  - uses: actions/checkout@v4
28
29
  - uses: ruby/setup-ruby@v1
29
30
  with:
30
- ruby-version: '3.2'
31
+ ruby-version: '3.3'
31
32
  bundler-cache: true
32
33
  cache-version: 1
33
34
  - name: Rubocop
@@ -47,22 +48,50 @@ jobs:
47
48
  steps:
48
49
  - name: Checkout
49
50
  uses: actions/checkout@v4
51
+ - name: Auth to ghcr.io
52
+ uses: docker/login-action@v3
53
+ with:
54
+ registry: ${{ env.REGISTRY }}
55
+ username: ${{ github.actor }}
56
+ password: ${{ secrets.GITHUB_TOKEN }}
50
57
  - name: Set up Docker Buildx
51
58
  uses: docker/setup-buildx-action@v3
59
+ - name: Setup image tags
60
+ id: image-meta
61
+ uses: docker/metadata-action@v5
62
+ with:
63
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
64
+ tags: |
65
+ type=raw,value=latest,enable={{is_default_branch}}
66
+ type=ref,event=pr
67
+ type=sha,format=long,prefix=
52
68
  - name: Build and export
53
69
  uses: docker/build-push-action@v6
54
70
  with:
71
+ build-args: |
72
+ BUILD_TIMESTAMP=${{ fromJSON(steps.image-meta.outputs.json).labels['org.opencontainers.image.created'] }}
73
+ BUILD_GITSHA=${{ github.sha }}
55
74
  cache-from: type=gha
56
75
  cache-to: type=gha, mode=max
57
76
  context: .
58
77
  target: hyrax-engine-dev
59
- tags: samvera/hyrax-dev:latest,samvera/hyrax-dev:${{ github.sha }}
60
- outputs: type=docker,dest=/tmp/hyrax-dev-${{ github.sha }}.tar
78
+ push: true # ${{ github.event_name != 'pull_request' }}
79
+ tags: ${{ steps.image-meta.outputs.tags }}
80
+ labels: ${{ steps.image-meta.outputs.labels }}
81
+ outputs: type=docker,dest=${{runner.temp}}/hyrax-dev-${{ github.sha }}.tar
82
+ - name: Trigger Nurax Deployment
83
+ uses: peter-evans/repository-dispatch@v3
84
+ if: ${{ github.ref == 'refs/heads/main' }}
85
+ with:
86
+ token: ${{ secrets.NURAX_ACCESS_TOKEN }}
87
+ event-type: deploy
88
+ repository: samvera-labs/nurax
89
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
61
90
  - name: Upload built image artifact
62
91
  uses: actions/upload-artifact@v4
63
92
  with:
64
93
  name: hyrax-dev
65
- path: /tmp/hyrax-dev-${{ github.sha }}.tar
94
+ path: ${{runner.temp}}/hyrax-dev-${{ github.sha }}.tar
66
95
 
67
96
  test:
68
97
  needs: build
@@ -86,10 +115,10 @@ jobs:
86
115
  uses: actions/download-artifact@v4
87
116
  with:
88
117
  name: hyrax-dev
89
- path: /tmp
118
+ path: ${{runner.temp}}
90
119
  - name: Start containers
91
120
  run: |
92
- docker load --input /tmp/hyrax-dev-${{ github.sha }}.tar
121
+ docker load --input ${{runner.temp}}/hyrax-dev-${{ github.sha }}.tar
93
122
  docker image ls -a
94
123
  docker compose -f docker-compose-${{ matrix.ci_test_app }}.yml up -d --quiet-pull --pull missing --no-build
95
124
  - name: RSpec