hyrax 5.0.4 → 5.1.0.pre.beta1

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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/.dassie/Gemfile +11 -12
  3. data/.dassie/bin/rails +0 -5
  4. data/.dassie/bin/rake +0 -5
  5. data/.dassie/config/application.rb +2 -1
  6. data/.dassie/config/environments/development.rb +1 -1
  7. data/.dassie/config/environments/production.rb +4 -2
  8. data/.dassie/config/environments/test.rb +1 -1
  9. data/.dassie/config/initializers/riiif.rb +20 -18
  10. data/.dassie/db/schema.rb +109 -110
  11. data/.github/workflows/lint-build-test.yml +1 -1
  12. data/.koppie/Gemfile +10 -11
  13. data/.koppie/bin/rails +0 -5
  14. data/.koppie/bin/rake +0 -5
  15. data/.koppie/config/application.rb +2 -1
  16. data/.koppie/config/environments/development.rb +1 -1
  17. data/.koppie/config/environments/production.rb +4 -2
  18. data/.koppie/config/environments/test.rb +1 -1
  19. data/.koppie/config/initializers/hyrax.rb +20 -17
  20. data/.koppie/config/initializers/riiif.rb +21 -18
  21. data/Dockerfile +7 -6
  22. data/app/actors/hyrax/actors/add_to_work_actor.rb +1 -1
  23. data/app/actors/hyrax/actors/apply_order_actor.rb +1 -1
  24. data/app/assets/stylesheets/hyrax/_tinymce.scss +6 -0
  25. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +1 -0
  26. data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +4 -4
  27. data/app/controllers/hyrax/api/zotero_controller.rb +1 -1
  28. data/app/jobs/batch_create_job.rb +2 -2
  29. data/app/models/admin_set.rb +2 -2
  30. data/app/models/concerns/hyrax/permissions/writable.rb +1 -2
  31. data/app/models/concerns/hyrax/valkyrie_lazy_migration.rb +1 -0
  32. data/app/models/hyrax/collection_type.rb +4 -4
  33. data/app/models/single_use_link.rb +1 -1
  34. data/app/services/hyrax/listeners.rb +1 -0
  35. data/app/services/hyrax/statistics/term_query.rb +1 -1
  36. data/app/services/hyrax/user_stat_importer.rb +1 -1
  37. data/app/services/hyrax/workflow.rb +8 -0
  38. data/app/validators/hyrax/has_one_title_validator.rb +1 -1
  39. data/config/initializers/1_healthz.rb +2 -1
  40. data/config/initializers/ar_test_fixture_monkey_patch.rb +8 -0
  41. data/config/initializers/arel_rails_7_2_monkey_patch.rb +6 -0
  42. data/config/initializers/listeners.rb +4 -2
  43. data/config/initializers/new_framework_defaults_7_2.rb +8 -0
  44. data/docker-compose-sirenia.yml +1 -1
  45. data/documentation/developing-your-hyrax-based-app.md +6 -6
  46. data/hyrax.gemspec +8 -8
  47. data/lib/generators/hyrax/config_generator.rb +0 -5
  48. data/lib/generators/hyrax/install_generator.rb +1 -1
  49. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +21 -19
  50. data/lib/hyrax/configuration.rb +1 -0
  51. data/lib/hyrax/controlled_vocabulary/importer/language.rb +1 -1
  52. data/lib/hyrax/engine.rb +15 -10
  53. data/lib/hyrax/version.rb +1 -1
  54. data/lib/hyrax.rb +4 -0
  55. data/template.rb +6 -1
  56. metadata +41 -42
  57. data/.dassie/bin/spring +0 -17
  58. data/.dassie/config/initializers/mini_magick.rb +0 -6
  59. data/.dassie/config/spring.rb +0 -6
  60. data/.koppie/bin/spring +0 -17
  61. data/.koppie/config/initializers/mini_magick.rb +0 -6
  62. data/.koppie/config/spring.rb +0 -6
  63. data/config/initializers/reform_rails_6_1_monkey_patch.rb +0 -27
  64. data/lib/generators/hyrax/templates/config/initializers/mini_magick.rb +0 -6
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ require 'hyrax/callbacks'
2
3
  require 'hyrax/role_registry'
3
4
 
4
5
  module Hyrax
@@ -13,7 +13,7 @@ module Hyrax
13
13
  stdout_logger.formatter = proc do |_severity, _datetime, _progname, msg|
14
14
  "#{msg}\n"
15
15
  end
16
- Hyrax.logger.extend(ActiveSupport::Logger.broadcast(stdout_logger))
16
+ ActiveSupport::BroadcastLogger.new(Hyrax.logger, stdout_logger)
17
17
  end
18
18
 
19
19
  def import
data/lib/hyrax/engine.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Hyrax
3
- class Engine < ::Rails::Engine
3
+ class Engine < ::Rails::Engine # rubocop:disable Metrics/ClassLength
4
4
  isolate_namespace Hyrax
5
5
 
6
6
  require 'almond-rails'
@@ -60,12 +60,15 @@ module Hyrax
60
60
  # raises PG::ConnectionBad. There's no good common ancestor to assume. That's why this test
61
61
  # is in its own tiny chunk of code – so we know that whatever the StandardError is, it's coming
62
62
  # from the attempt to connect.
63
- can_connect = begin
64
- ActiveRecord::Base.connection
65
- true
66
- rescue StandardError
67
- false
68
- end
63
+ #
64
+ # (Some time later...) Simply accessing the connection obj is not raising PG::ConnectionBad,
65
+ # so let's call active? too.
66
+ can_connect =
67
+ begin
68
+ ActiveRecord::Base.connection.active?
69
+ rescue StandardError
70
+ false
71
+ end
69
72
 
70
73
  can_persist = can_connect && begin
71
74
  Hyrax.config.persist_registered_roles!
@@ -88,9 +91,11 @@ module Hyrax
88
91
  end
89
92
 
90
93
  initializer 'requires' do
91
- require 'wings' unless Hyrax.config.disable_wings
92
- require 'freyja' unless Hyrax.config.disable_freyja
93
- require 'frigg' unless Hyrax.config.disable_frigg
94
+ ActiveSupport::Reloader.to_prepare do
95
+ require 'wings' unless Hyrax.config.disable_wings
96
+ require 'freyja' unless Hyrax.config.disable_freyja
97
+ require 'frigg' unless Hyrax.config.disable_frigg
98
+ end
94
99
  end
95
100
 
96
101
  initializer 'routing' do
data/lib/hyrax/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hyrax
3
- VERSION = '5.0.4'
3
+ VERSION = '5.1.0-beta1'
4
4
  end
data/lib/hyrax.rb CHANGED
@@ -46,6 +46,10 @@ module Hyrax
46
46
  autoload :ResourceSync
47
47
  autoload :Zotero
48
48
  autoload :Listeners
49
+ autoload :Workflow
50
+ autoload :SimpleSchemaLoader
51
+ autoload :VirusScanner
52
+ autoload :DerivativeBucketedStorage
49
53
  end
50
54
 
51
55
  ##
data/template.rb CHANGED
@@ -1,4 +1,9 @@
1
1
  # frozen_string_literal: true
2
- gem 'hyrax', '5.0.4'
2
+
3
+ insert_into_file 'config/application.rb', after: /config\.load_defaults [0-9.]+$/ do
4
+ "\n config.add_autoload_paths_to_load_path = true"
5
+ end
6
+
7
+ gem 'hyrax', '5.1.0-beta1'
3
8
  run 'bundle install'
4
9
  generate 'hyrax:install', '-f'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyrax
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.4
4
+ version: 5.1.0.pre.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -11,10 +11,9 @@ authors:
11
11
  - Jeremy Friesen
12
12
  - Trey Pendragon
13
13
  - Esmé Cowles
14
- autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
- date: 2025-02-10 00:00:00.000000000 Z
16
+ date: 2025-03-04 00:00:00.000000000 Z
18
17
  dependencies:
19
18
  - !ruby/object:Gem::Dependency
20
19
  name: rails
@@ -22,28 +21,34 @@ dependencies:
22
21
  requirements:
23
22
  - - "~>"
24
23
  - !ruby/object:Gem::Version
25
- version: '6.1'
24
+ version: '7.2'
25
+ - - "<"
26
+ - !ruby/object:Gem::Version
27
+ version: '8.0'
26
28
  type: :runtime
27
29
  prerelease: false
28
30
  version_requirements: !ruby/object:Gem::Requirement
29
31
  requirements:
30
32
  - - "~>"
31
33
  - !ruby/object:Gem::Version
32
- version: '6.1'
34
+ version: '7.2'
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: '8.0'
33
38
  - !ruby/object:Gem::Dependency
34
39
  name: active-fedora
35
40
  requirement: !ruby/object:Gem::Requirement
36
41
  requirements:
37
42
  - - "~>"
38
43
  - !ruby/object:Gem::Version
39
- version: '14.0'
44
+ version: '15.0'
40
45
  type: :runtime
41
46
  prerelease: false
42
47
  version_requirements: !ruby/object:Gem::Requirement
43
48
  requirements:
44
49
  - - "~>"
45
50
  - !ruby/object:Gem::Version
46
- version: '14.0'
51
+ version: '15.0'
47
52
  - !ruby/object:Gem::Dependency
48
53
  name: almond-rails
49
54
  requirement: !ruby/object:Gem::Requirement
@@ -342,28 +347,28 @@ dependencies:
342
347
  requirements:
343
348
  - - "~>"
344
349
  - !ruby/object:Gem::Version
345
- version: '3.3'
350
+ version: '4.0'
346
351
  type: :runtime
347
352
  prerelease: false
348
353
  version_requirements: !ruby/object:Gem::Requirement
349
354
  requirements:
350
355
  - - "~>"
351
356
  - !ruby/object:Gem::Version
352
- version: '3.3'
357
+ version: '4.0'
353
358
  - !ruby/object:Gem::Dependency
354
359
  name: hydra-editor
355
360
  requirement: !ruby/object:Gem::Requirement
356
361
  requirements:
357
362
  - - "~>"
358
363
  - !ruby/object:Gem::Version
359
- version: '6.0'
364
+ version: '7.0'
360
365
  type: :runtime
361
366
  prerelease: false
362
367
  version_requirements: !ruby/object:Gem::Requirement
363
368
  requirements:
364
369
  - - "~>"
365
370
  - !ruby/object:Gem::Version
366
- version: '6.0'
371
+ version: '7.0'
367
372
  - !ruby/object:Gem::Dependency
368
373
  name: hydra-file_characterization
369
374
  requirement: !ruby/object:Gem::Requirement
@@ -384,14 +389,14 @@ dependencies:
384
389
  requirements:
385
390
  - - "~>"
386
391
  - !ruby/object:Gem::Version
387
- version: '12.0'
392
+ version: '13.0'
388
393
  type: :runtime
389
394
  prerelease: false
390
395
  version_requirements: !ruby/object:Gem::Requirement
391
396
  requirements:
392
397
  - - "~>"
393
398
  - !ruby/object:Gem::Version
394
- version: '12.0'
399
+ version: '13.0'
395
400
  - !ruby/object:Gem::Dependency
396
401
  name: hydra-works
397
402
  requirement: !ruby/object:Gem::Requirement
@@ -468,6 +473,20 @@ dependencies:
468
473
  - - ">="
469
474
  - !ruby/object:Gem::Version
470
475
  version: '0'
476
+ - !ruby/object:Gem::Dependency
477
+ name: listen
478
+ requirement: !ruby/object:Gem::Requirement
479
+ requirements:
480
+ - - "~>"
481
+ - !ruby/object:Gem::Version
482
+ version: '3.9'
483
+ type: :runtime
484
+ prerelease: false
485
+ version_requirements: !ruby/object:Gem::Requirement
486
+ requirements:
487
+ - - "~>"
488
+ - !ruby/object:Gem::Version
489
+ version: '3.9'
471
490
  - !ruby/object:Gem::Dependency
472
491
  name: mailboxer
473
492
  requirement: !ruby/object:Gem::Requirement
@@ -552,20 +571,6 @@ dependencies:
552
571
  - - "~>"
553
572
  - !ruby/object:Gem::Version
554
573
  version: '0.9'
555
- - !ruby/object:Gem::Dependency
556
- name: posix-spawn
557
- requirement: !ruby/object:Gem::Requirement
558
- requirements:
559
- - - ">="
560
- - !ruby/object:Gem::Version
561
- version: '0'
562
- type: :runtime
563
- prerelease: false
564
- version_requirements: !ruby/object:Gem::Requirement
565
- requirements:
566
- - - ">="
567
- - !ruby/object:Gem::Version
568
- version: '0'
569
574
  - !ruby/object:Gem::Dependency
570
575
  name: qa
571
576
  requirement: !ruby/object:Gem::Requirement
@@ -854,14 +859,14 @@ dependencies:
854
859
  name: database_cleaner
855
860
  requirement: !ruby/object:Gem::Requirement
856
861
  requirements:
857
- - - "~>"
862
+ - - ">="
858
863
  - !ruby/object:Gem::Version
859
864
  version: '1.3'
860
865
  type: :development
861
866
  prerelease: false
862
867
  version_requirements: !ruby/object:Gem::Requirement
863
868
  requirements:
864
- - - "~>"
869
+ - - ">="
865
870
  - !ruby/object:Gem::Version
866
871
  version: '1.3'
867
872
  - !ruby/object:Gem::Dependency
@@ -968,14 +973,14 @@ dependencies:
968
973
  requirements:
969
974
  - - "~>"
970
975
  - !ruby/object:Gem::Version
971
- version: '6.0'
976
+ version: '7.0'
972
977
  type: :development
973
978
  prerelease: false
974
979
  version_requirements: !ruby/object:Gem::Requirement
975
980
  requirements:
976
981
  - - "~>"
977
982
  - !ruby/object:Gem::Version
978
- version: '6.0'
983
+ version: '7.0'
979
984
  - !ruby/object:Gem::Dependency
980
985
  name: rspec_junit_formatter
981
986
  requirement: !ruby/object:Gem::Requirement
@@ -1206,7 +1211,6 @@ files:
1206
1211
  - ".dassie/bin/rails"
1207
1212
  - ".dassie/bin/rake"
1208
1213
  - ".dassie/bin/setup"
1209
- - ".dassie/bin/spring"
1210
1214
  - ".dassie/bin/update"
1211
1215
  - ".dassie/bin/yarn"
1212
1216
  - ".dassie/config.ru"
@@ -1237,7 +1241,6 @@ files:
1237
1241
  - ".dassie/config/initializers/hyrax.rb"
1238
1242
  - ".dassie/config/initializers/mailboxer.rb"
1239
1243
  - ".dassie/config/initializers/mime_types.rb"
1240
- - ".dassie/config/initializers/mini_magick.rb"
1241
1244
  - ".dassie/config/initializers/publisher.rb"
1242
1245
  - ".dassie/config/initializers/redis_config.rb"
1243
1246
  - ".dassie/config/initializers/riiif.rb"
@@ -1277,7 +1280,6 @@ files:
1277
1280
  - ".dassie/config/role_map.yml"
1278
1281
  - ".dassie/config/routes.rb"
1279
1282
  - ".dassie/config/solr.yml"
1280
- - ".dassie/config/spring.rb"
1281
1283
  - ".dassie/config/storage.yml"
1282
1284
  - ".dassie/config/tinymce.yml"
1283
1285
  - ".dassie/config/uv/uv-config.json"
@@ -1482,7 +1484,6 @@ files:
1482
1484
  - ".koppie/bin/rails"
1483
1485
  - ".koppie/bin/rake"
1484
1486
  - ".koppie/bin/setup"
1485
- - ".koppie/bin/spring"
1486
1487
  - ".koppie/bin/update"
1487
1488
  - ".koppie/bin/yarn"
1488
1489
  - ".koppie/config.ru"
@@ -1519,7 +1520,6 @@ files:
1519
1520
  - ".koppie/config/initializers/inflections.rb"
1520
1521
  - ".koppie/config/initializers/mailboxer.rb"
1521
1522
  - ".koppie/config/initializers/mime_types.rb"
1522
- - ".koppie/config/initializers/mini_magick.rb"
1523
1523
  - ".koppie/config/initializers/publisher.rb"
1524
1524
  - ".koppie/config/initializers/redis_config.rb"
1525
1525
  - ".koppie/config/initializers/riiif.rb"
@@ -1546,7 +1546,6 @@ files:
1546
1546
  - ".koppie/config/routes.rb"
1547
1547
  - ".koppie/config/sidekiq.yml"
1548
1548
  - ".koppie/config/solr.yml"
1549
- - ".koppie/config/spring.rb"
1550
1549
  - ".koppie/config/storage.yml"
1551
1550
  - ".koppie/config/tinymce.yml"
1552
1551
  - ".koppie/config/uv/uv-config.json"
@@ -2493,6 +2492,7 @@ files:
2493
2492
  - app/services/hyrax/work_resource_query_service.rb
2494
2493
  - app/services/hyrax/work_thumbnail_path_service.rb
2495
2494
  - app/services/hyrax/work_uploads_handler.rb
2495
+ - app/services/hyrax/workflow.rb
2496
2496
  - app/services/hyrax/workflow/abstract_notification.rb
2497
2497
  - app/services/hyrax/workflow/action_taken_service.rb
2498
2498
  - app/services/hyrax/workflow/actionable_objects.rb
@@ -2998,11 +2998,13 @@ files:
2998
2998
  - config/features.rb
2999
2999
  - config/i18n-tasks.yml
3000
3000
  - config/initializers/1_healthz.rb
3001
+ - config/initializers/ar_test_fixture_monkey_patch.rb
3002
+ - config/initializers/arel_rails_7_2_monkey_patch.rb
3001
3003
  - config/initializers/file_length_patch.rb
3002
3004
  - config/initializers/indexing_adapter_initializer.rb
3003
3005
  - config/initializers/kaminari_engine_patch.rb
3004
3006
  - config/initializers/listeners.rb
3005
- - config/initializers/reform_rails_6_1_monkey_patch.rb
3007
+ - config/initializers/new_framework_defaults_7_2.rb
3006
3008
  - config/initializers/simple_form.rb
3007
3009
  - config/initializers/storage_adapter_initializer.rb
3008
3010
  - config/initializers/valkyrie_id_equality.rb
@@ -3087,7 +3089,6 @@ files:
3087
3089
  - lib/generators/hyrax/templates/config/initializers/1_valkyrie.rb
3088
3090
  - lib/generators/hyrax/templates/config/initializers/file_services.rb
3089
3091
  - lib/generators/hyrax/templates/config/initializers/hyrax.rb
3090
- - lib/generators/hyrax/templates/config/initializers/mini_magick.rb
3091
3092
  - lib/generators/hyrax/templates/config/initializers/publisher.rb
3092
3093
  - lib/generators/hyrax/templates/config/initializers/redis_config.rb
3093
3094
  - lib/generators/hyrax/templates/config/initializers/riiif.rb
@@ -3425,7 +3426,6 @@ licenses:
3425
3426
  - Apache-2.0
3426
3427
  metadata:
3427
3428
  rubygems_mfa_required: 'true'
3428
- post_install_message:
3429
3429
  rdoc_options: []
3430
3430
  require_paths:
3431
3431
  - lib
@@ -3440,8 +3440,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3440
3440
  - !ruby/object:Gem::Version
3441
3441
  version: '0'
3442
3442
  requirements: []
3443
- rubygems_version: 3.5.22
3444
- signing_key:
3443
+ rubygems_version: 3.6.2
3445
3444
  specification_version: 4
3446
3445
  summary: Hyrax is a front-end based on the robust Samvera framework, providing a user
3447
3446
  interface for common repository features. Hyrax offers the ability to create repository
data/.dassie/bin/spring DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This file loads Spring without using Bundler, in order to be fast.
4
- # It gets overwritten when you run the `spring binstub` command.
5
-
6
- unless defined?(Spring)
7
- require 'rubygems'
8
- require 'bundler'
9
-
10
- lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11
- spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
12
- if spring
13
- Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14
- gem 'spring', spring.version
15
- require 'spring/binstub'
16
- end
17
- end
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'mini_magick'
3
-
4
- MiniMagick.configure do |config|
5
- config.shell_api = "posix-spawn"
6
- end
@@ -1,6 +0,0 @@
1
- %w[
2
- .ruby-version
3
- .rbenv-vars
4
- tmp/restart.txt
5
- tmp/caching-dev.txt
6
- ].each { |path| Spring.watch(path) }
data/.koppie/bin/spring DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This file loads Spring without using Bundler, in order to be fast.
4
- # It gets overwritten when you run the `spring binstub` command.
5
-
6
- unless defined?(Spring)
7
- require 'rubygems'
8
- require 'bundler'
9
-
10
- lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11
- spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
12
- if spring
13
- Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14
- gem 'spring', spring.version
15
- require 'spring/binstub'
16
- end
17
- end
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'mini_magick'
3
-
4
- MiniMagick.configure do |config|
5
- config.shell_api = "posix-spawn"
6
- end
@@ -1,6 +0,0 @@
1
- %w[
2
- .ruby-version
3
- .rbenv-vars
4
- tmp/restart.txt
5
- tmp/caching-dev.txt
6
- ].each { |path| Spring.watch(path) }
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Taken from https://github.com/trailblazer/reform-rails/issues/86#issuecomment-763120151
4
- # rubocop:disable Metrics/CyclomaticComplexity
5
- # rubocop:disable Lint/UselessAssignment
6
- module Reform
7
- class Contract < Disposable::Twin
8
- class Result
9
- private
10
-
11
- # this doesn't do nested errors (e.g. )
12
- def filter_for(method, *args)
13
- @results.collect { |r| r.public_send(method, *args).to_h }
14
- .inject({}) { |hah, err| hah.merge(err) { |_key, old_v, new_v| (new_v.is_a?(Array) ? (old_v |= new_v) : old_v.merge(new_v)) } }
15
- .find_all do |_k, v| # filter :nested=>{:something=>["too nested!"]} #DISCUSS: do we want that here?
16
- if v.is_a?(Hash)
17
- nested_errors = v.select { |attr_key, val| attr_key.is_a?(Integer) && val.is_a?(Array) && val.any? }
18
- v = nested_errors.to_a if nested_errors.any?
19
- end
20
- v.is_a?(ActiveModel::DeprecationHandlingMessageArray)
21
- end.to_h
22
- end
23
- end
24
- end
25
- end
26
- # rubocop:enable Metrics/CyclomaticComplexity
27
- # rubocop:disable Lint/UselessAssignment
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'mini_magick'
3
-
4
- MiniMagick.configure do |config|
5
- config.shell_api = "posix-spawn"
6
- end