diff --git a/Gemfile b/Gemfile index 838c05e6b..f55c10432 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,21 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } - +# Ruby 3.3+ compatibility gems +gem 'logger' +gem 'bigdecimal' # Will be removed from stdlib in Ruby 3.4 +gem 'ostruct' # Will be removed from stdlib in Ruby 3.5 +gem 'mutex_m' # Will be removed from stdlib in Ruby 3.4 +gem 'fiddle' # Will be removed from stdlib in Ruby 3.5 # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' gem 'rails', '~> 6.1.3', '>= 6.1.3.2' -# Use sqlite3 as the database for Active Record -gem 'sqlite3', '~> 1.4' -# Use Puma as the app server +# Use sqlite3 as the database for Active Record - updated for Ruby 3.3 compatibility +gem 'sqlite3', '~> 1.6.0' +# Use Puma as the app server - updated for Ruby 3.3 compatibility gem 'puma', '~> 5.0' +# Updated nio4r for Ruby 3.3 compatibility +gem 'nio4r', '~> 2.7' # Use Active Model has_secure_password # gem 'bcrypt', '~> 3.1.7' @@ -18,23 +25,18 @@ gem 'puma', '~> 5.0' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] + gem 'rspec-rails', '~> 5.0.0' end group :development do gem 'listen', '~> 3.3' + gem 'foreman', '~> 0.87.2' + gem 'rubocop' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] -group :development do - gem 'foreman', '~> 0.87.2' -end - -group :development, :test do - gem 'rspec-rails', '~> 5.0.0' -end - group :test do gem 'rspec-json_expectations' gem 'shoulda-matchers', '~> 4.0' diff --git a/Gemfile.lock b/Gemfile.lock index b381cde8b..72b6ef56b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,138 +1,174 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.3.2) - actionpack (= 6.1.3.2) - activesupport (= 6.1.3.2) + actioncable (6.1.7.10) + actionpack (= 6.1.7.10) + activesupport (= 6.1.7.10) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.3.2) - actionpack (= 6.1.3.2) - activejob (= 6.1.3.2) - activerecord (= 6.1.3.2) - activestorage (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionmailbox (6.1.7.10) + actionpack (= 6.1.7.10) + activejob (= 6.1.7.10) + activerecord (= 6.1.7.10) + activestorage (= 6.1.7.10) + activesupport (= 6.1.7.10) mail (>= 2.7.1) - actionmailer (6.1.3.2) - actionpack (= 6.1.3.2) - actionview (= 6.1.3.2) - activejob (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionmailer (6.1.7.10) + actionpack (= 6.1.7.10) + actionview (= 6.1.7.10) + activejob (= 6.1.7.10) + activesupport (= 6.1.7.10) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.3.2) - actionview (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionpack (6.1.7.10) + actionview (= 6.1.7.10) + activesupport (= 6.1.7.10) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3.2) - actionpack (= 6.1.3.2) - activerecord (= 6.1.3.2) - activestorage (= 6.1.3.2) - activesupport (= 6.1.3.2) + actiontext (6.1.7.10) + actionpack (= 6.1.7.10) + activerecord (= 6.1.7.10) + activestorage (= 6.1.7.10) + activesupport (= 6.1.7.10) nokogiri (>= 1.8.5) - actionview (6.1.3.2) - activesupport (= 6.1.3.2) + actionview (6.1.7.10) + activesupport (= 6.1.7.10) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.3.2) - activesupport (= 6.1.3.2) + activejob (6.1.7.10) + activesupport (= 6.1.7.10) globalid (>= 0.3.6) - activemodel (6.1.3.2) - activesupport (= 6.1.3.2) - activerecord (6.1.3.2) - activemodel (= 6.1.3.2) - activesupport (= 6.1.3.2) - activestorage (6.1.3.2) - actionpack (= 6.1.3.2) - activejob (= 6.1.3.2) - activerecord (= 6.1.3.2) - activesupport (= 6.1.3.2) - marcel (~> 1.0.0) - mini_mime (~> 1.0.2) - activesupport (6.1.3.2) + activemodel (6.1.7.10) + activesupport (= 6.1.7.10) + activerecord (6.1.7.10) + activemodel (= 6.1.7.10) + activesupport (= 6.1.7.10) + activestorage (6.1.7.10) + actionpack (= 6.1.7.10) + activejob (= 6.1.7.10) + activerecord (= 6.1.7.10) + activesupport (= 6.1.7.10) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7.10) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - builder (3.2.4) - byebug (11.1.3) - concurrent-ruby (1.1.8) + ast (2.4.3) + base64 (0.3.0) + bigdecimal (3.2.2) + builder (3.3.0) + byebug (12.0.0) + concurrent-ruby (1.3.5) crass (1.0.6) - diff-lcs (1.4.4) - erubi (1.10.0) - ffi (1.15.0) + date (3.4.1) + diff-lcs (1.6.2) + erubi (1.13.1) + ffi (1.17.2-arm64-darwin) + ffi (1.17.2-x86_64-darwin) + fiddle (1.1.8) foreman (0.87.2) - globalid (0.4.2) - activesupport (>= 4.2.0) - i18n (1.8.10) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.7) concurrent-ruby (~> 1.0) - listen (3.5.1) + json (2.13.2) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.9.1) + logger (1.7.0) + loofah (2.24.1) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) + nokogiri (>= 1.12.0) + mail (2.8.1) mini_mime (>= 0.1.1) - marcel (1.0.1) - method_source (1.0.0) - mini_mime (1.0.3) - minitest (5.14.4) - nio4r (2.5.7) - nokogiri (1.11.3-x86_64-darwin) + net-imap + net-pop + net-smtp + marcel (1.0.4) + method_source (1.1.0) + mini_mime (1.1.5) + mini_portile2 (2.8.9) + minitest (5.25.5) + mutex_m (0.3.0) + net-imap (0.5.9) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.1) + net-protocol + nio4r (2.7.4) + nokogiri (1.18.9-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-darwin) racc (~> 1.4) - puma (5.3.1) + ostruct (0.6.3) + parallel (1.27.0) + parser (3.3.9.0) + ast (~> 2.4.1) + racc + prism (1.4.0) + puma (5.6.9) nio4r (~> 2.0) - racc (1.5.2) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (6.1.3.2) - actioncable (= 6.1.3.2) - actionmailbox (= 6.1.3.2) - actionmailer (= 6.1.3.2) - actionpack (= 6.1.3.2) - actiontext (= 6.1.3.2) - actionview (= 6.1.3.2) - activejob (= 6.1.3.2) - activemodel (= 6.1.3.2) - activerecord (= 6.1.3.2) - activestorage (= 6.1.3.2) - activesupport (= 6.1.3.2) + racc (1.8.1) + rack (2.2.17) + rack-test (2.2.0) + rack (>= 1.3) + rails (6.1.7.10) + actioncable (= 6.1.7.10) + actionmailbox (= 6.1.7.10) + actionmailer (= 6.1.7.10) + actionpack (= 6.1.7.10) + actiontext (= 6.1.7.10) + actionview (= 6.1.7.10) + activejob (= 6.1.7.10) + activemodel (= 6.1.7.10) + activerecord (= 6.1.7.10) + activestorage (= 6.1.7.10) + activesupport (= 6.1.7.10) bundler (>= 1.15.0) - railties (= 6.1.3.2) + railties (= 6.1.7.10) sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) - railties (6.1.3.2) - actionpack (= 6.1.3.2) - activesupport (= 6.1.3.2) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (6.1.7.10) + actionpack (= 6.1.7.10) + activesupport (= 6.1.7.10) method_source - rake (>= 0.8.7) + rake (>= 12.2) thor (~> 1.0) - rake (13.0.3) - rb-fsevent (0.11.0) - rb-inotify (0.10.1) + rainbow (3.1.1) + rake (13.3.0) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) ffi (~> 1.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + regexp_parser (2.11.1) + rspec-core (3.13.5) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.13.0) rspec-json_expectations (2.2.0) - rspec-mocks (3.10.2) + rspec-mocks (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-rails (5.0.1) + rspec-support (~> 3.13.0) + rspec-rails (5.0.3) actionpack (>= 5.2) activesupport (>= 5.2) railties (>= 5.2) @@ -140,38 +176,68 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.10.2) + rspec-support (3.13.4) + rubocop (1.79.2) + json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.46.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.46.0) + parser (>= 3.3.7.2) + prism (~> 1.4) + ruby-progressbar (1.13.0) shoulda-matchers (4.5.1) activesupport (>= 4.2.0) - sprockets (4.0.2) + sprockets (4.2.2) concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + logger + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (1.4.2) - thor (1.1.0) - tzinfo (2.0.4) + sqlite3 (1.6.9) + mini_portile2 (~> 2.8.0) + thor (1.4.0) + timeout (0.4.3) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - websocket-driver (0.7.3) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + websocket-driver (0.8.0) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.4.2) + zeitwerk (2.7.3) PLATFORMS + arm64-darwin-24 x86_64-darwin-19 DEPENDENCIES + bigdecimal byebug + fiddle foreman (~> 0.87.2) listen (~> 3.3) + logger + mutex_m + nio4r (~> 2.7) + ostruct puma (~> 5.0) rails (~> 6.1.3, >= 6.1.3.2) rspec-json_expectations rspec-rails (~> 5.0.0) + rubocop shoulda-matchers (~> 4.0) - sqlite3 (~> 1.4) + sqlite3 (~> 1.6.0) tzinfo-data BUNDLED WITH diff --git a/config/boot.rb b/config/boot.rb index d69bd27dc..db180fa50 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. +require "logger" # Required for Ruby 3.3+ compatibility diff --git a/config/database.yml b/config/database.yml index 4a8a1b26f..d22c586d7 100644 --- a/config/database.yml +++ b/config/database.yml @@ -4,22 +4,25 @@ # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' # -default: &default +# Note: YAML aliases removed for Ruby 3.3+ compatibility (Psych::AliasesNotEnabled) + +development: adapter: sqlite3 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 5000 - -development: - <<: *default database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: - <<: *default + adapter: sqlite3 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + timeout: 5000 database: db/test.sqlite3 production: - <<: *default + adapter: sqlite3 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + timeout: 5000 database: db/production.sqlite3