From aa9de04ba7544638c639d97f888c6e62997d1e5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 04:35:50 +0000 Subject: [PATCH 1/2] Build(deps): Bump rails from 7.0.8 to 7.1.2 Bumps [rails](https://github.com/rails/rails) from 7.0.8 to 7.1.2. - [Release notes](https://github.com/rails/rails/releases) - [Commits](https://github.com/rails/rails/compare/v7.0.8...v7.1.2) --- updated-dependencies: - dependency-name: rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 172 +++++++++++------- .../alaveteli_features.gemspec | 2 +- 3 files changed, 104 insertions(+), 72 deletions(-) diff --git a/Gemfile b/Gemfile index 8ee8d27bf6..71d68b62e8 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ # the new version. It is always preferable to upgrade our code. source 'https://rubygems.org' -gem 'rails', '~> 7.0.8' +gem 'rails', '~> 7.1.2' gem 'pg', '~> 1.5.4' diff --git a/Gemfile.lock b/Gemfile.lock index ab09a89d3f..ef4009bccf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -49,7 +49,7 @@ PATH flipper (~> 0.10) flipper-active_record (~> 0.10) mime-types (< 4.0.0) - rails (~> 7.0.4) + rails (>= 7.0.4, < 7.2.0) PATH remote: gems/excel_analyzer @@ -62,73 +62,82 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) + actioncable (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8) - actionpack (= 7.0.8) - activejob (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + zeitwerk (~> 2.6) + actionmailbox (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8) - actionpack (= 7.0.8) - actionview (= 7.0.8) - activejob (= 7.0.8) - activesupport (= 7.0.8) + actionmailer (7.1.2) + actionpack (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activesupport (= 7.1.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8) - actionview (= 7.0.8) - activesupport (= 7.0.8) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.2) + actionview (= 7.1.2) + activesupport (= 7.1.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8) - actionpack (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.2) + actionpack (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8) - activesupport (= 7.0.8) + actionview (7.1.2) + activesupport (= 7.1.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) active_model_otp (2.3.2) activemodel rotp (~> 6.2.0) - activejob (7.0.8) - activesupport (= 7.0.8) + activejob (7.1.2) + activesupport (= 7.1.2) globalid (>= 0.3.6) - activemodel (7.0.8) - activesupport (= 7.0.8) - activerecord (7.0.8) - activemodel (= 7.0.8) - activesupport (= 7.0.8) - activestorage (7.0.8) - actionpack (= 7.0.8) - activejob (= 7.0.8) - activerecord (= 7.0.8) - activesupport (= 7.0.8) + activemodel (7.1.2) + activesupport (= 7.1.2) + activerecord (7.1.2) + activemodel (= 7.1.2) + activesupport (= 7.1.2) + timeout (>= 0.4.0) + activestorage (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activesupport (= 7.1.2) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.8) + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) @@ -161,7 +170,9 @@ GEM faraday (~> 0.9) faraday_middleware (~> 0.10) nokogiri (~> 1.6, >= 1.6.8) + base64 (0.2.0) bcrypt (3.1.20) + bigdecimal (3.1.4) bindex (0.8.1) bootstrap-sass (2.3.2.2) sass (~> 3.2) @@ -195,12 +206,14 @@ GEM daemons (1.4.1) dalli (3.2.6) dante (0.2.0) - date (3.3.3) + date (3.3.4) declarative (0.0.20) diff-lcs (1.5.0) digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) docile (1.4.0) + drb (2.2.0) + ruby2_keywords erubi (1.12.0) eventmachine (1.2.7) exception_notification (4.5.0) @@ -288,6 +301,10 @@ GEM icalendar (2.10.1) ice_cube (~> 0.16) ice_cube (0.16.4) + io-console (0.6.0) + irb (1.9.0) + rdoc + reline (>= 0.3.8) iso_country_codes (0.7.8) jmespath (1.6.2) jquery-rails (4.6.0) @@ -333,7 +350,8 @@ GEM i18n (>= 0.6.4, <= 2) multi_json (1.15.0) multipart-post (2.3.0) - net-imap (0.3.7) + mutex_m (0.2.0) + net-imap (0.4.4) date net-protocol net-pop (0.1.2) @@ -344,7 +362,7 @@ GEM net-ssh (>= 2.6.5, < 8.0.0) net-sftp (4.0.0) net-ssh (>= 5.0.0, < 8.0.0) - net-smtp (0.3.3) + net-smtp (0.4.0) net-protocol net-ssh (7.2.1) net-ssh-gateway (2.0.0) @@ -377,27 +395,34 @@ GEM pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) + psych (5.1.1.1) + stringio public_suffix (5.0.4) racc (1.7.3) rack (2.2.8) + rack-session (1.0.1) + rack (< 3) rack-test (2.1.0) rack (>= 1.3) rack-utf8_sanitizer (1.9.1) rack (>= 1.0, < 4.0) - rails (7.0.8) - actioncable (= 7.0.8) - actionmailbox (= 7.0.8) - actionmailer (= 7.0.8) - actionpack (= 7.0.8) - actiontext (= 7.0.8) - actionview (= 7.0.8) - activejob (= 7.0.8) - activemodel (= 7.0.8) - activerecord (= 7.0.8) - activestorage (= 7.0.8) - activesupport (= 7.0.8) + rackup (1.0.0) + rack (< 3) + webrick + rails (7.1.2) + actioncable (= 7.1.2) + actionmailbox (= 7.1.2) + actionmailer (= 7.1.2) + actionpack (= 7.1.2) + actiontext (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activemodel (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) bundler (>= 1.15.0) - railties (= 7.0.8) + railties (= 7.1.2) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -412,19 +437,24 @@ GEM rails-i18n (7.0.5) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.8) - actionpack (= 7.0.8) - activesupport (= 7.0.8) - method_source + railties (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.1.0) + rdoc (6.6.0) + psych (>= 4.0.0) recaptcha (5.16.0) redcarpet (3.6.0) redis (4.8.1) regexp_parser (2.8.3) + reline (0.4.0) + io-console (~> 0.5) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -482,6 +512,7 @@ GEM rubocop-ast (>= 1.30.0, < 2.0) ruby-ole (1.2.12.1) ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) rubyzip (2.3.2) sass (3.4.25) sass-rails (5.0.8) @@ -515,6 +546,7 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) statistics2 (0.54) + stringio (3.0.9) stripe (5.55.0) syck (1.4.1) syslog_protocol (0.9.2) @@ -525,7 +557,7 @@ GEM rack (>= 1, < 3) thor (1.3.0) tilt (2.0.10) - timeout (0.4.0) + timeout (0.4.1) trailblazer-option (0.1.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -624,7 +656,7 @@ DEPENDENCIES pry (~> 0.14.2) rack (~> 2.2.8) rack-utf8_sanitizer (~> 1.9.1) - rails (~> 7.0.8) + rails (~> 7.1.2) rails-controller-testing rails-i18n (~> 7.0.5) recaptcha (~> 5.16.0) diff --git a/gems/alaveteli_features/alaveteli_features.gemspec b/gems/alaveteli_features/alaveteli_features.gemspec index b6f856c4dd..df2b9cd0d7 100644 --- a/gems/alaveteli_features/alaveteli_features.gemspec +++ b/gems/alaveteli_features/alaveteli_features.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_dependency "rails", "~> 7.0.4" + spec.add_dependency "rails", ">= 7.0.4", "< 7.2.0" spec.add_dependency "flipper", "~> 0.10" spec.add_dependency "flipper-active_record", "~> 0.10" # Mime types 3 needs Ruby 2.0.0 or greater, but we need to support 1.9.3 so From f0d82301ddba7ca2daa8dd776da5edfe80cfbb79 Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Mon, 13 Nov 2023 09:22:38 +0000 Subject: [PATCH 2/2] WIP lets get the tests running and see what is broken --- config/application.rb | 5 ++--- config/storage.yml-example | 6 ++++++ lib/no_constraint_disabling.rb | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/config/application.rb b/config/application.rb index 25e5a6a13c..11a29e7684 100644 --- a/config/application.rb +++ b/config/application.rb @@ -32,7 +32,6 @@ class Application < Rails::Application # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") config.autoloader = :zeitwerk - config.active_record.legacy_connection_handling = false config.active_support.use_rfc4122_namespaced_uuids = true # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. @@ -82,8 +81,6 @@ class Application < Rails::Application config.autoload_paths << "#{Rails.root}/app/controllers/concerns" config.autoload_paths << "#{Rails.root}/app/models/concerns" - config.enable_dependency_loading = true - # See Rails::Configuration for more options ENV['RECAPTCHA_SITE_KEY'] = AlaveteliConfiguration.recaptcha_site_key ENV['RECAPTCHA_SECRET_KEY'] = AlaveteliConfiguration.recaptcha_secret_key @@ -100,5 +97,7 @@ class Application < Rails::Application # Allow the generation of full URLs in emails config.action_mailer.default_url_options = { host: AlaveteliConfiguration.domain } + + config.active_storage.service = :local end end diff --git a/config/storage.yml-example b/config/storage.yml-example index fee9833c2f..956d94cb5d 100644 --- a/config/storage.yml-example +++ b/config/storage.yml-example @@ -57,3 +57,9 @@ attachments_test: &attachments_test attachments: <<: *attachments_<%= Rails.env %> + +## Local ## + +local: + service: Disk + root: <%= Rails.root.join('tmp/storage/local') %> diff --git a/lib/no_constraint_disabling.rb b/lib/no_constraint_disabling.rb index 6e520d6fb8..c8132524a3 100644 --- a/lib/no_constraint_disabling.rb +++ b/lib/no_constraint_disabling.rb @@ -26,7 +26,7 @@ module ActiveRecord class FixtureSet def self.create_fixtures(fixtures_directory, fixture_set_names, class_names = {}, config = ActiveRecord::Base) fixture_set_names = Array(fixture_set_names).map(&:to_s) - class_names = ClassCache.new class_names, config + class_names.stringify_keys! # FIXME: Apparently JK uses this. connection = block_given? ? yield : ActiveRecord::Base.connection