Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies to support Ruby 3.3 and Rails 7.2 #6913

Merged
merged 44 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1ea669f
Support Ruby 3.3 and Rails 7.2
randalldfloyd Oct 2, 2024
920eca1
Upgrade to rails 7.2 and bump dependencies
cjcolvar Oct 2, 2024
9e1ff8a
Require callbacks required
cjcolvar Oct 2, 2024
46e33e6
Autoload FileListener
cjcolvar Oct 2, 2024
dd79d08
Deal with reloadable constants that get autoloaded during initialization
randalldfloyd Oct 7, 2024
21b8eac
Changing to correct usage of nulldb adapter when no DB ops are desired
randalldfloyd Oct 8, 2024
a08c76e
Fixing how Uglifier is configured due to compile errors in Rails 7
randalldfloyd Oct 9, 2024
7ffefa5
Resolving test suite incompatibilities for Rails 7.2
randalldfloyd Oct 11, 2024
840e36d
Rails 7.2 db:migrate updated schema
randalldfloyd Oct 11, 2024
e2f33ab
Patching Arel to add deprecated table_name alias, which is used exten…
randalldfloyd Oct 11, 2024
e8ca710
Upgrading rspec-rails
randalldfloyd Oct 14, 2024
0ee7f53
Patching AR to add deprecated fixture_path alias, which is used exten…
randalldfloyd Oct 14, 2024
99893ff
Temporarily override active_fedora until changed upstream
randalldfloyd Oct 15, 2024
8d46141
Various fixes to specs dealing mostly with changes in rspec/rspec-rails
randalldfloyd Oct 15, 2024
98f2362
Removing extensions from template render calls due to changes in rspe…
randalldfloyd Oct 15, 2024
5f814d8
Include TaggedLogging in FactoryBot to workaround issue
cjcolvar Oct 22, 2024
a1bf3a1
Workaround for missing method in FactoryBot::SyntaxRunner
cjcolvar Oct 22, 2024
89c9a6c
Remove override that is no longer needed
cjcolvar Oct 22, 2024
2c39fce
More workarounds for perform_enqueued_jobs
cjcolvar Oct 22, 2024
a50e3f1
Test with patched hydra-editor
cjcolvar Nov 11, 2024
485800e
Skipping send of uncountable when iterating across instance variables
randalldfloyd Dec 4, 2024
0a05e5c
Ensure that remote_files in attributes has been permitted
randalldfloyd Dec 11, 2024
ef66ca8
Use ActiveSupport::BroadcastLogger
cjcolvar Dec 9, 2024
2942d68
Allow for zero-arg invoking
cjcolvar Dec 13, 2024
bef3762
Use errors#add instead of <<
cjcolvar Dec 13, 2024
bdb08ab
Use typical pattern for removing constant instead of removed ActiveSu…
cjcolvar Dec 13, 2024
05aacaf
Reverting previous workaround for spec now that strong parameters are…
randalldfloyd Dec 13, 2024
cfd6cee
Changing expectations where ::Hash was testing equal to ActionControl…
randalldfloyd Dec 13, 2024
cf2f47b
Rounding date comparisons in expectations due to drift when using the…
randalldfloyd Dec 13, 2024
51636bf
Merge branch 'main' into ruby-3.3_rails-7.2
Jan 21, 2025
37ddc62
Update to Ruby 3.3 in Dockerfile
dlpierce Jan 21, 2025
d3986e6
Update to Alpine 3.21
dlpierce Jan 21, 2025
89f3342
Refix db_config in spec_helper
dlpierce Jan 21, 2025
b29a850
Removing MiniMagick shell_api configuration because posix-spawn was r…
randalldfloyd Jan 22, 2025
38fdbcb
view_paths is immutable in Rails 7.1
dlpierce Jan 22, 2025
e17c9dd
Must use to_formatted_s to pass a format now
dlpierce Jan 22, 2025
c943709
Update spring_watcher_listen to allow newer spring
dlpierce Jan 22, 2025
d9c6876
Title needed when stubbing collection model in view specs for links t…
randalldfloyd Jan 22, 2025
b4ff5ea
Temporarily reverting spring-watcher-listen to get test suite working…
randalldfloyd Jan 23, 2025
7a90f3e
drop spring on the floor; remember to listen
dlpierce Jan 23, 2025
e1c8877
expect our mock specifically
dlpierce Jan 23, 2025
4e779ed
Merge branch 'main' into ruby-3.3_rails-7.2
randalldfloyd Jan 23, 2025
665f810
Changing fcrepo image to 6.5.1 official release
randalldfloyd Jan 24, 2025
f9968b2
Override to ActiveFedora may not be needed with upstream release
randalldfloyd Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .dassie/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ gem 'devise-guests', '~> 0.8'
# Required because grpc and google-protobuf gem's binaries are not compatible with Alpine Linux.
# To install the package in Alpine: `apk add ruby-grpc`
# The pinned versions should match the version provided by the Alpine packages.
if RUBY_PLATFORM =~ /musl/
path '/usr/lib/ruby/gems/3.2.0' do
gem 'google-protobuf', '~> 3.24.4', force_ruby_platform: true
gem 'grpc', '~> 1.59.3', force_ruby_platform: true
end
end

# Disabled due to dependency mismatches in Alpine packages (grpc 1.62.1 needs protobuf ~> 3.25)
# if RUBY_PLATFORM =~ /musl/
# path '/usr/lib/ruby/gems/3.3.0' do
# gem 'google-protobuf', '~> 3.24.4', force_ruby_platform: true
# gem 'grpc', '~> 1.62.1', force_ruby_platform: true
# end
# end

gemspec name: 'hyrax', path: ENV.fetch('HYRAX_ENGINE_PATH', '..')
gem 'jbuilder', '~> 2.5'
gem 'jquery-rails'
gem 'pg', '~> 1.3'
gem 'puma'
gem 'rails', '~> 6.1', '>= 6.1.7.10'
gem 'rails', '~> 7.2', '< 8.0'
gem 'riiif', '~> 2.1'
gem 'rsolr', '>= 1.0', '< 3'
gem 'sass-rails', '~> 6.0'
Expand All @@ -39,22 +41,20 @@ gem 'turbolinks', '~> 5'
gem 'twitter-typeahead-rails', '0.11.1.pre.corejavascript'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'uglifier', '>= 1.3.0'
gem 'activerecord-nulldb-adapter', git: 'https://github.com/taylorthurlow/nulldb', branch: 'fix/activerecord72-register-adapter'
gem 'hydra-editor', github: 'samvera/hydra-editor', branch: 'revert_and_modernize'

group :development do
gem 'better_errors' # add command line in browser when errors
gem 'binding_of_caller' # deeper stack trace used by better errors

# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

group :development, :test do
gem 'debug', '>= 1.0.0'
gem 'pry-doc'
gem 'pry-rails'
gem 'pry-rescue'
end
end
5 changes: 0 additions & 5 deletions .dassie/bin/rails
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
5 changes: 0 additions & 5 deletions .dassie/bin/rake
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
require_relative '../config/boot'
require 'rake'
Rake.application.run
17 changes: 0 additions & 17 deletions .dassie/bin/spring

This file was deleted.

2 changes: 1 addition & 1 deletion .dassie/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
config.assets.prefix = '/dev-assets'

# Raises error for missing translations
config.action_view.raise_on_missing_translations = true
config.i18n.raise_on_missing_translations = true

# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
Expand Down
6 changes: 4 additions & 2 deletions .dassie/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(harmony: true)
# config.assets.css_compressor = :sass
config.assets.configure do |env|
env.js_compressor = :uglifier
# env.css_compressor = :sass
end

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
Expand Down
2 changes: 1 addition & 1 deletion .dassie/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
config.active_support.deprecation = :stderr

# Raises error for missing translations
config.action_view.raise_on_missing_translations = true
config.i18n.raise_on_missing_translations = true
end
6 changes: 0 additions & 6 deletions .dassie/config/initializers/mini_magick.rb

This file was deleted.

38 changes: 20 additions & 18 deletions .dassie/config/initializers/riiif.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,31 @@
module Hyrax
# Adds file locking to Riiif::File
# @see RiiifFileResolver
class RiiifFile < Riiif::File
include ActiveSupport::Benchmarkable

attr_reader :id
def initialize(input_path, tempfile = nil, id:)
super(input_path, tempfile)
raise(ArgumentError, "must specify id") if id.blank?
@id = id
end
Rails.application.reloader.to_prepare do
class RiiifFile < Riiif::File
include ActiveSupport::Benchmarkable

attr_reader :id
def initialize(input_path, tempfile = nil, id:)
super(input_path, tempfile)
raise(ArgumentError, "must specify id") if id.blank?
@id = id
end

# Wrap extract in a read lock and benchmark it
def extract(transformation, image_info = nil)
Riiif::Image.file_resolver.file_locks[id].with_read_lock do
benchmark "RiiifFile extracted #{path} with #{transformation.to_params}", level: :debug do
super
# Wrap extract in a read lock and benchmark it
def extract(transformation, image_info = nil)
Riiif::Image.file_resolver.file_locks[id].with_read_lock do
benchmark "RiiifFile extracted #{path} with #{transformation.to_params}", level: :debug do
super
end
end
end
end

private
private

def logger
Hyrax.logger
def logger
Hyrax.logger
end
end
end

Expand Down
6 changes: 0 additions & 6 deletions .dassie/config/spring.rb

This file was deleted.

Loading
Loading