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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc6adf0f9c62325c3f4131eb7264f543818e25f38b2d85ea1d96c0f877ffe934
4
- data.tar.gz: 2d8aebcc3a2064ab0af8d45121df00e20197862ecd3b9d166ca9fcfcdcf7b02b
3
+ metadata.gz: '08508f785d195263cfe808e128a93f0144a0da56aa7e8d5fbd08a1ddd543c448'
4
+ data.tar.gz: 0e64095cd09810042c20ade46070ae392a4c0506c14acf5ea99e5fc9453ec8e9
5
5
  SHA512:
6
- metadata.gz: c006cdfa3fe00dbcfafb470bdd115c2a5131bef1a2209588d3f42fd71b9b0598435c85a47b4e2405f1fa22314fa0552819d9560c10d73d9ce8055701c4e8c21b
7
- data.tar.gz: 689bb72271db54acf6564a7107fc298f41106d1c2c512429717ba3ff7a398f9d1071a7f8b230086676d9b228717948a5226c098486559c7eb84c733334939a11
6
+ metadata.gz: c7d0e18940b7243f192e9d03c8b59b7918aed1fbead26089a92471731c7affe71dd4a82d1d750ceac28c3577ef75c904eb0255f6ced70453be8433639ba51a8e
7
+ data.tar.gz: c76473bb4d5b0f8fc7ab8c795aa2f8f44f392c5f9e6f423767375c5218b4afec97608e40ebb67b232eb9d4e1ae8158e73726f3932e95912bab699bf58dc56cac
data/.dassie/Gemfile CHANGED
@@ -18,19 +18,21 @@ gem 'devise-guests', '~> 0.8'
18
18
  # Required because grpc and google-protobuf gem's binaries are not compatible with Alpine Linux.
19
19
  # To install the package in Alpine: `apk add ruby-grpc`
20
20
  # The pinned versions should match the version provided by the Alpine packages.
21
- if RUBY_PLATFORM =~ /musl/
22
- path '/usr/lib/ruby/gems/3.2.0' do
23
- gem 'google-protobuf', '~> 3.24.4', force_ruby_platform: true
24
- gem 'grpc', '~> 1.59.3', force_ruby_platform: true
25
- end
26
- end
21
+
22
+ # Disabled due to dependency mismatches in Alpine packages (grpc 1.62.1 needs protobuf ~> 3.25)
23
+ # if RUBY_PLATFORM =~ /musl/
24
+ # path '/usr/lib/ruby/gems/3.3.0' do
25
+ # gem 'google-protobuf', '~> 3.24.4', force_ruby_platform: true
26
+ # gem 'grpc', '~> 1.62.1', force_ruby_platform: true
27
+ # end
28
+ # end
27
29
 
28
30
  gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
29
31
  gem 'jbuilder', '~> 2.5'
30
32
  gem 'jquery-rails'
31
33
  gem 'pg', '~> 1.3'
32
34
  gem 'puma'
33
- gem 'rails', '~> 6.1', '>= 6.1.7.10'
35
+ gem 'rails', '~> 7.2', '< 8.0'
34
36
  gem 'riiif', '~> 2.1'
35
37
  gem 'rsolr', '>= 1.0', '< 3'
36
38
  gem 'sass-rails', '~> 6.0'
@@ -39,6 +41,7 @@ gem 'turbolinks', '~> 5'
39
41
  gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
40
42
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
41
43
  gem 'uglifier', '>= 1.3.0'
44
+ gem 'activerecord-nulldb-adapter', '~> 1.1'
42
45
 
43
46
  group :development do
44
47
  gem 'better_errors' # add command line in browser when errors
@@ -46,10 +49,6 @@ group :development do
46
49
 
47
50
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
48
51
  gem 'web-console', '>= 3.3.0'
49
- gem 'listen', '>= 3.0.5', '< 3.2'
50
- # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
51
- gem 'spring'
52
- gem 'spring-watcher-listen', '~> 2.0.0'
53
52
  end
54
53
 
55
54
  group :development, :test do
@@ -57,4 +56,4 @@ group :development, :test do
57
56
  gem 'pry-doc'
58
57
  gem 'pry-rails'
59
58
  gem 'pry-rescue'
60
- end
59
+ end
data/.dassie/bin/rails CHANGED
@@ -1,9 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
2
  APP_PATH = File.expand_path('../config/application', __dir__)
8
3
  require_relative '../config/boot'
9
4
  require 'rails/commands'
data/.dassie/bin/rake CHANGED
@@ -1,9 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
2
  require_relative '../config/boot'
8
3
  require 'rake'
9
4
  Rake.application.run
@@ -9,7 +9,8 @@ Bundler.require(*Rails.groups)
9
9
  module Dassie
10
10
  class Application < Rails::Application
11
11
  # Initialize configuration defaults for originally generated Rails version.
12
- config.load_defaults 6.0
12
+ config.load_defaults 7.2
13
+ config.add_autoload_paths_to_load_path = true
13
14
 
14
15
  # Settings in config/environments/* take precedence over those specified here.
15
16
  # Application configuration can go into files in config/initializers
@@ -65,7 +65,7 @@ Rails.application.configure do
65
65
  config.assets.prefix = '/dev-assets'
66
66
 
67
67
  # Raises error for missing translations
68
- config.action_view.raise_on_missing_translations = true
68
+ config.i18n.raise_on_missing_translations = true
69
69
 
70
70
  # Use an evented file watcher to asynchronously detect changes in source code,
71
71
  # routes, locales, etc. This feature depends on the listen gem.
@@ -23,8 +23,10 @@ Rails.application.configure do
23
23
  config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
24
24
 
25
25
  # Compress JavaScripts and CSS.
26
- config.assets.js_compressor = Uglifier.new(harmony: true)
27
- # config.assets.css_compressor = :sass
26
+ config.assets.configure do |env|
27
+ env.js_compressor = :uglifier
28
+ # env.css_compressor = :sass
29
+ end
28
30
 
29
31
  # Do not fallback to assets pipeline if a precompiled asset is missed.
30
32
  config.assets.compile = false
@@ -43,5 +43,5 @@ Rails.application.configure do
43
43
  config.active_support.deprecation = :stderr
44
44
 
45
45
  # Raises error for missing translations
46
- config.action_view.raise_on_missing_translations = true
46
+ config.i18n.raise_on_missing_translations = true
47
47
  end
@@ -35,29 +35,31 @@ end
35
35
  module Hyrax
36
36
  # Adds file locking to Riiif::File
37
37
  # @see RiiifFileResolver
38
- class RiiifFile < Riiif::File
39
- include ActiveSupport::Benchmarkable
40
-
41
- attr_reader :id
42
- def initialize(input_path, tempfile = nil, id:)
43
- super(input_path, tempfile)
44
- raise(ArgumentError, "must specify id") if id.blank?
45
- @id = id
46
- end
38
+ Rails.application.reloader.to_prepare do
39
+ class RiiifFile < Riiif::File
40
+ include ActiveSupport::Benchmarkable
41
+
42
+ attr_reader :id
43
+ def initialize(input_path, tempfile = nil, id:)
44
+ super(input_path, tempfile)
45
+ raise(ArgumentError, "must specify id") if id.blank?
46
+ @id = id
47
+ end
47
48
 
48
- # Wrap extract in a read lock and benchmark it
49
- def extract(transformation, image_info = nil)
50
- Riiif::Image.file_resolver.file_locks[id].with_read_lock do
51
- benchmark "RiiifFile extracted #{path} with #{transformation.to_params}", level: :debug do
52
- super
49
+ # Wrap extract in a read lock and benchmark it
50
+ def extract(transformation, image_info = nil)
51
+ Riiif::Image.file_resolver.file_locks[id].with_read_lock do
52
+ benchmark "RiiifFile extracted #{path} with #{transformation.to_params}", level: :debug do
53
+ super
54
+ end
53
55
  end
54
56
  end
55
- end
56
57
 
57
- private
58
+ private
58
59
 
59
- def logger
60
- Hyrax.logger
60
+ def logger
61
+ Hyrax.logger
62
+ end
61
63
  end
62
64
  end
63
65