From 89c3be5bf9e46e4fc9f2e76b0d9fc4df4964afb7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 02:31:15 +0000 Subject: [PATCH 01/45] chore(deps): update all non-major bundler dependencies --- Gemfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index bf6d6800..87463eb1 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem 'carrierwave', '~> 3.1', '>= 3.1.1' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' -gem 'concurrent-ruby', '1.3.4' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update +gem 'concurrent-ruby', '1.3.5' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'dav4rack_ext', '~> 1.0' gem 'doorkeeper', '~> 5.8', '>= 5.8.1' @@ -22,20 +22,20 @@ gem 'icalendar', '~> 2.10', '>= 2.10.3' gem 'improvmx', '~> 0.2.1' gem 'isbn_validation', '~> 1.2', '>= 1.2.2' gem 'jsonapi-authorization', '~> 3.0', '>= 3.0.2' -gem 'jsonapi-resources', '~> 0.9.1' -gem 'message_bus', '~> 4.3', '>= 4.3.8' -gem 'mini_magick', '~> 5.1', '>= 5.1.2' +gem 'jsonapi-resources', '~> 0.10.7' +gem 'message_bus', '~> 4.3', '>= 4.3.9' +gem 'mini_magick', '~> 5.2' gem 'paper_trail', '~> 16.0' gem 'paranoia', '~> 3.0', '>= 3.0.1' gem 'pg', '~> 1.5', '>= 1.5.9' gem 'phonelib' gem 'puma', '~> 6.6' -gem 'pundit', '~> 2.4' +gem 'pundit', '~> 2.5' gem 'rack-attack', '~> 6.7' gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' -gem 'rails', '~> 7.0.0', '>= 7.0.8.7' +gem 'rails', '~> 7.2.2', '>= 7.2.2.1' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' -gem 'redis', '~> 5.3' +gem 'redis', '~> 5.4' gem 'roo', '~> 2.10', '>= 2.10.1' gem 'ruby-filemagic', '~> 0.7', '>= 0.7.3' gem 'rubyzip', '~> 2.4', '>= 2.4.1' @@ -76,10 +76,10 @@ end group :test do gem 'guard-rspec', require: false gem 'rspec-rails' - gem 'rubocop', '~> 1.72', '>= 1.72.1', require: false - gem 'rubocop-factory_bot', '~> 2.26', '>= 2.26.1', require: false + gem 'rubocop', '~> 1.73', '>= 1.73.2', require: false + gem 'rubocop-factory_bot', '~> 2.27', require: false gem 'rubocop-performance', '~> 1.24', '>= 1.24.0', require: false - gem 'rubocop-rails', '~> 2.30', '>= 2.30.0', require: false + gem 'rubocop-rails', '~> 2.30', '>= 2.30.3', require: false gem 'rubocop-rspec', '~> 3.5', '>= 3.5.0', require: false gem 'rubocop-rspec_rails', '~> 2.30', '>= 2.30.0', require: false gem 'simplecov', require: false From a6712d5c22055f67388080104f141c54677b2586 Mon Sep 17 00:00:00 2001 From: lodewiges <131907615+lodewiges@users.noreply.github.com> Date: Sun, 9 Mar 2025 16:35:22 +0100 Subject: [PATCH 02/45] Update Gemfile --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 87463eb1..35f01349 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem 'carrierwave', '~> 3.1', '>= 3.1.1' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' -gem 'concurrent-ruby', '1.3.5' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update +gem 'concurrent-ruby', '1.3.4' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'dav4rack_ext', '~> 1.0' gem 'doorkeeper', '~> 5.8', '>= 5.8.1' @@ -22,7 +22,7 @@ gem 'icalendar', '~> 2.10', '>= 2.10.3' gem 'improvmx', '~> 0.2.1' gem 'isbn_validation', '~> 1.2', '>= 1.2.2' gem 'jsonapi-authorization', '~> 3.0', '>= 3.0.2' -gem 'jsonapi-resources', '~> 0.10.7' +gem 'jsonapi-resources', '~> 0.9.1' gem 'message_bus', '~> 4.3', '>= 4.3.9' gem 'mini_magick', '~> 5.2' gem 'paper_trail', '~> 16.0' From 09a8336e5127562a5457d6370c215e4cdf916756 Mon Sep 17 00:00:00 2001 From: lodewiges <131907615+lodewiges@users.noreply.github.com> Date: Sun, 9 Mar 2025 16:35:58 +0100 Subject: [PATCH 03/45] Update Gemfile --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 35f01349..d79e8baf 100644 --- a/Gemfile +++ b/Gemfile @@ -33,7 +33,7 @@ gem 'puma', '~> 6.6' gem 'pundit', '~> 2.5' gem 'rack-attack', '~> 6.7' gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' -gem 'rails', '~> 7.2.2', '>= 7.2.2.1' +gem 'rails', '~> 7.0.0', '>= 7.0.8.7' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' gem 'redis', '~> 5.4' gem 'roo', '~> 2.10', '>= 2.10.1' From af1bfac6cb9ca9f64d086903ef859c8b1c963228 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Sun, 9 Mar 2025 17:03:53 +0100 Subject: [PATCH 04/45] moved factory bot to plugins rubocop --- .rubocop.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 66500cef..40e239f3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,10 +1,10 @@ require: - - rubocop-factory_bot - rubocop-rspec_rails plugins: - - rubocop-rspec + - rubocop-factory_bot - rubocop-performance + - rubocop-rspec - rubocop-rails AllCops: From 83989238e009d3f011aa27e08234a9732580b45a Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Sun, 9 Mar 2025 17:05:06 +0100 Subject: [PATCH 05/45] generated gem.lock file --- Gemfile.lock | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 324f3dbb..e6f9e5a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -251,7 +251,7 @@ GEM net-pop net-smtp marcel (1.0.4) - message_bus (4.3.8) + message_bus (4.3.9) rack (>= 1.1.3) method_source (1.1.0) mime-types (3.4.1) @@ -260,7 +260,7 @@ GEM mina (1.2.4) open4 (~> 1.3.4) rake - mini_magick (5.1.2) + mini_magick (5.2.0) benchmark logger mini_mime (1.1.5) @@ -315,7 +315,9 @@ GEM public_suffix (6.0.1) puma (6.6.0) nio4r (~> 2.0) - pundit (2.4.0) + puma (6.6.0-java) + nio4r (~> 2.0) + pundit (2.5.0) activesupport (>= 3.0.0) raabro (1.4.0) racc (1.8.1) @@ -366,7 +368,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rb-readline (0.5.5) - redis (5.3.0) + redis (5.4.0) redis-client (>= 0.22.0) redis-client (0.23.0) connection_pool @@ -422,7 +424,7 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.11.0) - rubocop (1.72.1) + rubocop (1.73.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -435,13 +437,14 @@ GEM unicode-display_width (>= 2.4.0, < 4.0) rubocop-ast (1.38.0) parser (>= 3.3.1.0) - rubocop-factory_bot (2.26.1) - rubocop (~> 1.61) + rubocop-factory_bot (2.27.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) rubocop-performance (1.24.0) lint_roller (~> 1.1) rubocop (>= 1.72.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-rails (2.30.0) + rubocop-rails (2.30.3) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) @@ -582,9 +585,9 @@ DEPENDENCIES jsonapi-authorization (~> 3.0, >= 3.0.2) jsonapi-resources (~> 0.9.1) listen - message_bus (~> 4.3, >= 4.3.8) + message_bus (~> 4.3, >= 4.3.9) mina - mini_magick (~> 5.1, >= 5.1.2) + mini_magick (~> 5.2) paper_trail (~> 16.0) paranoia (~> 3.0, >= 3.0.1) pg (~> 1.5, >= 1.5.9) @@ -592,20 +595,20 @@ DEPENDENCIES pry-byebug (~> 3.10.1) pry-rails (~> 0.3.11) puma (~> 6.6) - pundit (~> 2.4) + pundit (~> 2.5) rack-attack (~> 6.7) rack-cors (~> 2.0, >= 2.0.2) rack-mini-profiler rails (~> 7.0.0, >= 7.0.8.7) rails-i18n (~> 7.0, >= 7.0.10) rb-readline - redis (~> 5.3) + redis (~> 5.4) roo (~> 2.10, >= 2.10.1) rspec-rails - rubocop (~> 1.72, >= 1.72.1) - rubocop-factory_bot (~> 2.26, >= 2.26.1) + rubocop (~> 1.73, >= 1.73.2) + rubocop-factory_bot (~> 2.27) rubocop-performance (~> 1.24, >= 1.24.0) - rubocop-rails (~> 2.30, >= 2.30.0) + rubocop-rails (~> 2.30, >= 2.30.3) rubocop-rspec (~> 3.5, >= 3.5.0) rubocop-rspec_rails (~> 2.30, >= 2.30.0) ruby-filemagic (~> 0.7, >= 0.7.3) From 70b972b0b09f5ab3136a96b9113128286bb573bf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 9 Mar 2025 23:01:30 +0000 Subject: [PATCH 06/45] chore(deps): update all non-major bundler dependencies --- Gemfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 41ccca71..f53d8684 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'carrierwave', '~> 3.1', '>= 3.1.1' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' -gem 'concurrent-ruby', '1.3.4' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update +gem 'concurrent-ruby', '1.3.5' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'doorkeeper', '~> 5.8', '>= 5.8.1' gem 'doorkeeper-i18n', '~> 5.2', '>= 5.2.7' @@ -19,7 +19,7 @@ gem 'icalendar', '~> 2.10', '>= 2.10.3' gem 'improvmx', '~> 0.2.1' gem 'isbn_validation', '~> 1.2', '>= 1.2.2' gem 'jsonapi-authorization', '~> 3.0', '>= 3.0.2' -gem 'jsonapi-resources', '~> 0.9.1' +gem 'jsonapi-resources', '~> 0.10.7' gem 'message_bus', '~> 4.3', '>= 4.3.9' gem 'mini_magick', '~> 5.2' gem 'paper_trail', '~> 16.0' @@ -30,15 +30,15 @@ gem 'puma', '~> 6.6' gem 'pundit', '~> 2.5' gem 'rack-attack', '~> 6.7' gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' -gem 'rails', '~> 7.0.0', '>= 7.0.8.7' +gem 'rails', '~> 7.2.2', '>= 7.2.2.1' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' gem 'redis', '~> 5.4' gem 'roo', '~> 2.10', '>= 2.10.1' gem 'ruby-filemagic', '~> 0.7', '>= 0.7.3' gem 'rubyzip', '~> 2.4', '>= 2.4.1' -gem 'sentry-rails', '~> 5.5' -gem 'sentry-ruby', '~> 5.5' -gem 'sentry-sidekiq', '~> 5.5' +gem 'sentry-rails', '~> 5.22', '>= 5.22.4' +gem 'sentry-ruby', '~> 5.22', '>= 5.22.4' +gem 'sentry-sidekiq', '~> 5.22', '>= 5.22.4' gem 'sepa_king', '~> 0.14' gem 'sidekiq', '~> 7.3', '>= 7.3.9' gem 'sidekiq-scheduler', '~> 5.0', '>= 5.0.6' From b657effbbf18c7f25febacba1911bfbc8936d9e7 Mon Sep 17 00:00:00 2001 From: lodewiges <131907615+lodewiges@users.noreply.github.com> Date: Mon, 10 Mar 2025 00:21:45 +0100 Subject: [PATCH 07/45] Update Gemfile --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index f53d8684..2881a7f8 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'carrierwave', '~> 3.1', '>= 3.1.1' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' -gem 'concurrent-ruby', '1.3.5' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update +gem 'concurrent-ruby', '1.3.4' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'doorkeeper', '~> 5.8', '>= 5.8.1' gem 'doorkeeper-i18n', '~> 5.2', '>= 5.2.7' @@ -19,7 +19,7 @@ gem 'icalendar', '~> 2.10', '>= 2.10.3' gem 'improvmx', '~> 0.2.1' gem 'isbn_validation', '~> 1.2', '>= 1.2.2' gem 'jsonapi-authorization', '~> 3.0', '>= 3.0.2' -gem 'jsonapi-resources', '~> 0.10.7' +gem 'jsonapi-resources', '~> 0.9.1' gem 'message_bus', '~> 4.3', '>= 4.3.9' gem 'mini_magick', '~> 5.2' gem 'paper_trail', '~> 16.0' From 5cc0a5e58c1a0e198ec301e229e62b6199ab3fc6 Mon Sep 17 00:00:00 2001 From: lodewiges <131907615+lodewiges@users.noreply.github.com> Date: Mon, 10 Mar 2025 00:22:04 +0100 Subject: [PATCH 08/45] Update Gemfile --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 2881a7f8..abbaa157 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ gem 'puma', '~> 6.6' gem 'pundit', '~> 2.5' gem 'rack-attack', '~> 6.7' gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' -gem 'rails', '~> 7.2.2', '>= 7.2.2.1' +gem 'rails', '~> 7.0.0', '>= 7.0.8.7' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' gem 'redis', '~> 5.4' gem 'roo', '~> 2.10', '>= 2.10.1' From 2130cb5941d0c32ca186aca24a926bacb463c4d0 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 00:24:03 +0100 Subject: [PATCH 09/45] generated gem.lock --- Gemfile.lock | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 31c635c2..10ebd6d2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,4 +1,3 @@ - GEM remote: https://rubygems.org/ specs: @@ -189,9 +188,6 @@ GEM http-cookie (1.0.4) domain_name (~> 0.5) http-form_data (2.3.0) - http_router (0.11.2) - rack (>= 1.0.0) - url_mount (~> 0.2.1) i18n (1.14.7) concurrent-ruby (~> 1.0) iban-tools (1.2.1) @@ -507,9 +503,6 @@ GEM unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) uniform_notifier (1.16.0) - url_mount (0.2.1) - rack - uuidtools (2.2.0) validates_timeliness (7.1.0) activemodel (>= 7.0.0, < 8) timeliness (>= 0.3.10, < 1) @@ -597,9 +590,9 @@ DEPENDENCIES rubocop-rspec_rails (~> 2.30, >= 2.30.0) ruby-filemagic (~> 0.7, >= 0.7.3) rubyzip (~> 2.4, >= 2.4.1) - sentry-rails (~> 5.5) - sentry-ruby (~> 5.5) - sentry-sidekiq (~> 5.5) + sentry-rails (~> 5.22, >= 5.22.4) + sentry-ruby (~> 5.22, >= 5.22.4) + sentry-sidekiq (~> 5.22, >= 5.22.4) sepa_king (~> 0.14) sidekiq (~> 7.3, >= 7.3.9) sidekiq-scheduler (~> 5.0, >= 5.0.6) From ae90b5302633ad31265e974325e5826d8b841b19 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 09:57:22 +0000 Subject: [PATCH 10/45] chore(deps): update all non-major bundler dependencies --- Gemfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index abbaa157..2ceffccd 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'carrierwave', '~> 3.1', '>= 3.1.1' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' -gem 'concurrent-ruby', '1.3.4' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update +gem 'concurrent-ruby', '1.3.5' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'doorkeeper', '~> 5.8', '>= 5.8.1' gem 'doorkeeper-i18n', '~> 5.2', '>= 5.2.7' @@ -19,7 +19,7 @@ gem 'icalendar', '~> 2.10', '>= 2.10.3' gem 'improvmx', '~> 0.2.1' gem 'isbn_validation', '~> 1.2', '>= 1.2.2' gem 'jsonapi-authorization', '~> 3.0', '>= 3.0.2' -gem 'jsonapi-resources', '~> 0.9.1' +gem 'jsonapi-resources', '~> 0.10.7' gem 'message_bus', '~> 4.3', '>= 4.3.9' gem 'mini_magick', '~> 5.2' gem 'paper_trail', '~> 16.0' @@ -30,7 +30,7 @@ gem 'puma', '~> 6.6' gem 'pundit', '~> 2.5' gem 'rack-attack', '~> 6.7' gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' -gem 'rails', '~> 7.0.0', '>= 7.0.8.7' +gem 'rails', '~> 7.2.2', '>= 7.2.2.1' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' gem 'redis', '~> 5.4' gem 'roo', '~> 2.10', '>= 2.10.1' @@ -79,7 +79,7 @@ group :test do gem 'rubocop-performance', '~> 1.24', '>= 1.24.0', require: false gem 'rubocop-rails', '~> 2.30', '>= 2.30.3', require: false gem 'rubocop-rspec', '~> 3.5', '>= 3.5.0', require: false - gem 'rubocop-rspec_rails', '~> 2.30', '>= 2.30.0', require: false + gem 'rubocop-rspec_rails', '~> 2.31', require: false gem 'simplecov', require: false gem 'simplecov-lcov', '~> 0.8.0', require: false gem 'terminal-notifier-guard' From f8f4c24cdef8b3b6aa23b7a13cc8eaba8b23e5cb Mon Sep 17 00:00:00 2001 From: lodewiges <131907615+lodewiges@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:04:23 +0100 Subject: [PATCH 11/45] Update Gemfile --- Gemfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 2ceffccd..e38bbb48 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,6 @@ gem 'carrierwave', '~> 3.1', '>= 3.1.1' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' -gem 'concurrent-ruby', '1.3.5' # can be removed when we upgrade to rails 7.1 https://www.devgem.io/posts/resolving-the-loggerthreadsafelevel-error-in-rails-after-bundle-update gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'doorkeeper', '~> 5.8', '>= 5.8.1' gem 'doorkeeper-i18n', '~> 5.2', '>= 5.2.7' @@ -19,7 +18,7 @@ gem 'icalendar', '~> 2.10', '>= 2.10.3' gem 'improvmx', '~> 0.2.1' gem 'isbn_validation', '~> 1.2', '>= 1.2.2' gem 'jsonapi-authorization', '~> 3.0', '>= 3.0.2' -gem 'jsonapi-resources', '~> 0.10.7' +gem 'jsonapi-resources', '~> 0.9.1' gem 'message_bus', '~> 4.3', '>= 4.3.9' gem 'mini_magick', '~> 5.2' gem 'paper_trail', '~> 16.0' @@ -30,7 +29,7 @@ gem 'puma', '~> 6.6' gem 'pundit', '~> 2.5' gem 'rack-attack', '~> 6.7' gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' -gem 'rails', '~> 7.2.2', '>= 7.2.2.1' +gem 'rails', '~> 7.1.5', '>= 7.1.5.0' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' gem 'redis', '~> 5.4' gem 'roo', '~> 2.10', '>= 2.10.1' From 2a03f4d333f13b1b6e1350cd30f012789a87825f Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 16:09:52 +0100 Subject: [PATCH 12/45] generate gemfile.lock --- Gemfile.lock | 183 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 113 insertions(+), 70 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 10ebd6d2..eb2a3a70 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,73 +1,85 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) + actioncable (7.1.5.1) + actionpack (= 7.1.5.1) + activesupport (= 7.1.5.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + zeitwerk (~> 2.6) + actionmailbox (7.1.5.1) + actionpack (= 7.1.5.1) + activejob (= 7.1.5.1) + activerecord (= 7.1.5.1) + activestorage (= 7.1.5.1) + activesupport (= 7.1.5.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8.7) - actionpack (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activesupport (= 7.0.8.7) + actionmailer (7.1.5.1) + actionpack (= 7.1.5.1) + actionview (= 7.1.5.1) + activejob (= 7.1.5.1) + activesupport (= 7.1.5.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8.7) - actionview (= 7.0.8.7) - activesupport (= 7.0.8.7) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.5.1) + actionview (= 7.1.5.1) + activesupport (= 7.1.5.1) + 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.7) - actionpack (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.5.1) + actionpack (= 7.1.5.1) + activerecord (= 7.1.5.1) + activestorage (= 7.1.5.1) + activesupport (= 7.1.5.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.7) - activesupport (= 7.0.8.7) + actionview (7.1.5.1) + activesupport (= 7.1.5.1) 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.4) activemodel rotp (~> 6.3.0) - activejob (7.0.8.7) - activesupport (= 7.0.8.7) + activejob (7.1.5.1) + activesupport (= 7.1.5.1) globalid (>= 0.3.6) - activemodel (7.0.8.7) - activesupport (= 7.0.8.7) - activerecord (7.0.8.7) - activemodel (= 7.0.8.7) - activesupport (= 7.0.8.7) - activestorage (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activesupport (= 7.0.8.7) + activemodel (7.1.5.1) + activesupport (= 7.1.5.1) + activerecord (7.1.5.1) + activemodel (= 7.1.5.1) + activesupport (= 7.1.5.1) + timeout (>= 0.4.0) + activestorage (7.1.5.1) + actionpack (= 7.1.5.1) + activejob (= 7.1.5.1) + activerecord (= 7.1.5.1) + activesupport (= 7.1.5.1) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.8.7) + activesupport (7.1.5.1) + base64 + benchmark (>= 0.3) + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) + mutex_m + securerandom (>= 0.3) tzinfo (~> 2.0) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) @@ -136,6 +148,7 @@ GEM dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) + drb (2.2.1) erubi (1.13.0) et-orbi (1.2.11) tzinfo @@ -200,8 +213,15 @@ GEM ruby-vips (>= 2.0.17, < 3) improvmx (0.2.1) rest-client (~> 2.0) + io-console (0.8.0) + io-console (0.8.0-java) + irb (1.15.1) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) isbn_validation (1.2.2) activerecord (>= 3) + jar-dependencies (0.5.5) json (2.10.1) json (2.10.1-java) jsonapi-authorization (3.0.2) @@ -247,6 +267,7 @@ GEM minitest (5.25.4) msgpack (1.7.5) msgpack (1.7.5-java) + mutex_m (0.3.0) nenv (0.3.0) net-imap (0.5.6) date @@ -279,6 +300,9 @@ GEM racc pg (1.5.9) phonelib (0.6.58) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -291,6 +315,12 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.11) pry (>= 0.13.0) + psych (5.2.3) + date + stringio + psych (5.2.3-java) + date + jar-dependencies (>= 0.1.7) public_suffix (6.0.1) puma (6.6.0) nio4r (~> 2.0) @@ -308,22 +338,27 @@ GEM rack (>= 2.0.0) rack-mini-profiler (3.0.0) rack (>= 1.2.0) + rack-session (1.0.2) + rack (< 3) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.8.7) - actioncable (= 7.0.8.7) - actionmailbox (= 7.0.8.7) - actionmailer (= 7.0.8.7) - actionpack (= 7.0.8.7) - actiontext (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activemodel (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rackup (1.0.1) + rack (< 3) + webrick + rails (7.1.5.1) + actioncable (= 7.1.5.1) + actionmailbox (= 7.1.5.1) + actionmailer (= 7.1.5.1) + actionpack (= 7.1.5.1) + actiontext (= 7.1.5.1) + actionview (= 7.1.5.1) + activejob (= 7.1.5.1) + activemodel (= 7.1.5.1) + activerecord (= 7.1.5.1) + activestorage (= 7.1.5.1) + activesupport (= 7.1.5.1) bundler (>= 1.15.0) - railties (= 7.0.8.7) + railties (= 7.1.5.1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -334,24 +369,29 @@ GEM rails-i18n (7.0.10) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) - method_source + railties (7.1.5.1) + actionpack (= 7.1.5.1) + activesupport (= 7.1.5.1) + 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.2.1) rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) rb-readline (0.5.5) + rdoc (6.12.0) + psych (>= 4.0.0) redis (5.4.0) redis-client (>= 0.22.0) redis-client (0.23.0) connection_pool regexp_parser (2.10.0) + reline (0.6.0) + io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) rest-client (2.1.0) @@ -432,9 +472,10 @@ GEM rubocop-rspec (3.5.0) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) - rubocop-rspec_rails (2.30.0) - rubocop (~> 1.61) - rubocop-rspec (~> 3, >= 3.0.1) + rubocop-rspec_rails (2.31.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec (~> 3.5) ruby-filemagic (0.7.3) ruby-progressbar (1.13.0) ruby-vips (2.2.2) @@ -443,6 +484,7 @@ GEM rubyzip (2.4.1) rufus-scheduler (3.9.2) fugit (~> 1.1, >= 1.11.1) + securerandom (0.4.1) sentry-rails (5.22.4) railties (>= 5.0) sentry-ruby (~> 5.22.4) @@ -483,6 +525,7 @@ GEM listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) ssrf_filter (1.2.0) + stringio (3.1.5) terminal-notifier-guard (1.7.0) thor (1.3.2) tilt (2.4.0) @@ -512,6 +555,7 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webrick (1.9.1) websocket-driver (0.7.7) base64 websocket-extensions (>= 0.1.0) @@ -542,7 +586,6 @@ DEPENDENCIES carrierwave-bombshelter (~> 0.2, >= 0.2.2) case_transform (~> 0.2) colorize - concurrent-ruby (= 1.3.4) consistency_fail counter_culture (~> 3.8, >= 3.8.2) doorkeeper (~> 5.8, >= 5.8.1) @@ -576,7 +619,7 @@ DEPENDENCIES rack-attack (~> 6.7) rack-cors (~> 2.0, >= 2.0.2) rack-mini-profiler - rails (~> 7.0.0, >= 7.0.8.7) + rails (~> 7.1.5, >= 7.1.5.0) rails-i18n (~> 7.0, >= 7.0.10) rb-readline redis (~> 5.4) @@ -587,7 +630,7 @@ DEPENDENCIES rubocop-performance (~> 1.24, >= 1.24.0) rubocop-rails (~> 2.30, >= 2.30.3) rubocop-rspec (~> 3.5, >= 3.5.0) - rubocop-rspec_rails (~> 2.30, >= 2.30.0) + rubocop-rspec_rails (~> 2.31) ruby-filemagic (~> 0.7, >= 0.7.3) rubyzip (~> 2.4, >= 2.4.1) sentry-rails (~> 5.22, >= 5.22.4) From 0afe737585720f25270759c37a1b5afd3855267a Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 16:13:11 +0100 Subject: [PATCH 13/45] fix build --- .rubocop.yml | 9 ++------- Dockerfile | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 40e239f3..1152536f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,14 +1,12 @@ -require: - - rubocop-rspec_rails - plugins: - rubocop-factory_bot - rubocop-performance - rubocop-rspec - rubocop-rails + - rubocop-rspec_rails AllCops: - TargetRailsVersion: 7.0 + TargetRailsVersion: 7.1 TargetRubyVersion: 3.3 Exclude: - 'db/schema.rb' @@ -33,9 +31,6 @@ Metrics/BlockLength: - 'config/routes.rb' - 'spec/**/*' -Layout/LineLength: - Max: 100 - Metrics/MethodLength: Exclude: - 'db/migrate/*' diff --git a/Dockerfile b/Dockerfile index da18b0e6..226103ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN apk add --update \ tzdata \ libffi-dev \ build-base \ + yaml-dev \ && rm -rf /var/cache/apk/* RUN mkdir /app From 460a3c524cc011359964ff99086fb5c693ba75c1 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 16:47:31 +0100 Subject: [PATCH 14/45] updated bullet --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index e38bbb48..24d24cbc 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,7 @@ gem 'vpim', '~> 24.2', '>= 24.2.20' group :development, :test do gem 'awesome_print' gem 'brakeman', require: false - gem 'bullet' + gem 'bullet', '~> 7.2' gem 'colorize' gem 'consistency_fail' gem 'dotenv-rails' diff --git a/Gemfile.lock b/Gemfile.lock index eb2a3a70..5972caf5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -101,7 +101,7 @@ GEM msgpack (~> 1.2) brakeman (5.2.3) builder (3.3.0) - bullet (7.0.0) + bullet (7.2.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.1.3) @@ -580,7 +580,7 @@ DEPENDENCIES binding_of_caller bootsnap (~> 1.18, >= 1.18.4) brakeman - bullet + bullet (~> 7.2) carrierwave (~> 3.1, >= 3.1.1) carrierwave-base64 (~> 2.11) carrierwave-bombshelter (~> 0.2, >= 0.2.2) From a745ecc90e655d061fcbce05d623b4fcae2ff6eb Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 17:36:33 +0100 Subject: [PATCH 15/45] fixed lint --- app/controllers/v1/users_controller.rb | 6 ++---- app/jobs/mail_moderation_reminder_job.rb | 4 +--- app/models/import/transaction.rb | 4 +--- app/resources/v1/application_resource.rb | 2 +- app/resources/v1/form/form_resource.rb | 4 +--- app/resources/v1/form/response_resource.rb | 4 +--- app/resources/v1/user_resource.rb | 4 +--- app/validators/not_renullable_validator.rb | 4 +--- config/initializers/faker.rb | 2 +- db/migrate/20250216233318_remove_null_option_boolean.rb | 4 ++-- spec/spec_helper.rb | 1 + .../model_with_conditionally_updatable_attributes.rb | 2 +- 12 files changed, 14 insertions(+), 27 deletions(-) diff --git a/app/controllers/v1/users_controller.rb b/app/controllers/v1/users_controller.rb index 147857f2..1dba2076 100644 --- a/app/controllers/v1/users_controller.rb +++ b/app/controllers/v1/users_controller.rb @@ -84,7 +84,7 @@ def nextcloud groups: nextcloud_groups } end - def batch_import # rubocop:disable Metrics/MethodLength, Metrics/AbcSize + def batch_import # rubocop:disable Metrics/AbcSize authorize model_class file = decode_upload_file(params['file']) @@ -93,9 +93,7 @@ def batch_import # rubocop:disable Metrics/MethodLength, Metrics/AbcSize import = Import::User.new(file, group) - unless import.valid? - return render json: { errors: import.errors }, status: :unprocessable_entity - end + return render json: { errors: import.errors }, status: :unprocessable_entity unless import.valid? import.save!(live_run) render json: { users: import.imported_users.to_json(except: excluded_display_properties), diff --git a/app/jobs/mail_moderation_reminder_job.rb b/app/jobs/mail_moderation_reminder_job.rb index 65fa9b71..5bb36b69 100644 --- a/app/jobs/mail_moderation_reminder_job.rb +++ b/app/jobs/mail_moderation_reminder_job.rb @@ -10,8 +10,6 @@ def perform(stored_mail_id) MailModerationMailer.reminder_for_moderation_email(moderator, stored_mail).deliver_later end - unless Rails.env.development? - MailModerationReminderJob.set(wait: 24.hours).perform_later(stored_mail_id) - end + MailModerationReminderJob.set(wait: 24.hours).perform_later(stored_mail_id) unless Rails.env.development? end end diff --git a/app/models/import/transaction.rb b/app/models/import/transaction.rb index 411e8902..205b8d6b 100644 --- a/app/models/import/transaction.rb +++ b/app/models/import/transaction.rb @@ -22,9 +22,7 @@ def import! def valid?(file) headers = get_headers(file) - unless headers.include?('username') - @errors.add(:import_file, 'username field must be present') - end + @errors.add(:import_file, 'username field must be present') unless headers.include?('username') headers.include?('username') end diff --git a/app/resources/v1/application_resource.rb b/app/resources/v1/application_resource.rb index 9dc43232..74419db8 100644 --- a/app/resources/v1/application_resource.rb +++ b/app/resources/v1/application_resource.rb @@ -43,7 +43,7 @@ def self.search(records, value) value.each do |val| val.split.each do |word| records = records.where( - searchable_fields.map { |field| arel[field].lower.matches("%#{word.downcase}%") }.inject(:or) # rubocop:disable Layout/LineLength + searchable_fields.map { |field| arel[field].lower.matches("%#{word.downcase}%") }.inject(:or) ) end end diff --git a/app/resources/v1/form/form_resource.rb b/app/resources/v1/form/form_resource.rb index ccc26448..8754517c 100644 --- a/app/resources/v1/form/form_resource.rb +++ b/app/resources/v1/form/form_resource.rb @@ -20,9 +20,7 @@ def current_user_response_completed end def self.records(options = {}) - if options[:context][:action] == 'index' - options[:includes] = %i[responses open_questions closed_questions] - end + options[:includes] = %i[responses open_questions closed_questions] if options[:context][:action] == 'index' super end diff --git a/app/resources/v1/form/response_resource.rb b/app/resources/v1/form/response_resource.rb index aa16300c..0b932c88 100644 --- a/app/resources/v1/form/response_resource.rb +++ b/app/resources/v1/form/response_resource.rb @@ -8,9 +8,7 @@ class V1::Form::ResponseResource < V1::ApplicationResource has_many :closed_question_answers, always_include_linkage_data: true def self.records(options = {}) - if options[:context][:action] == 'index' - options[:includes] = %i[open_question_answers closed_question_answers] - end + options[:includes] = %i[open_question_answers closed_question_answers] if options[:context][:action] == 'index' super end diff --git a/app/resources/v1/user_resource.rb b/app/resources/v1/user_resource.rb index bd0e08c7..5782f475 100644 --- a/app/resources/v1/user_resource.rb +++ b/app/resources/v1/user_resource.rb @@ -32,9 +32,7 @@ def avatar_thumb_url upcoming_birthdays = records.upcoming_birthdays records.find_each do |record| context[:model] = record - unless read_user_details?(context) - upcoming_birthdays = upcoming_birthdays.where.not(id: record.id) - end + upcoming_birthdays = upcoming_birthdays.where.not(id: record.id) unless read_user_details?(context) end upcoming_birthdays } diff --git a/app/validators/not_renullable_validator.rb b/app/validators/not_renullable_validator.rb index 069fa701..47c9c1f2 100644 --- a/app/validators/not_renullable_validator.rb +++ b/app/validators/not_renullable_validator.rb @@ -4,8 +4,6 @@ def validate_each(record, attribute, _value) return unless changed - if !changed[0].nil? && changed[1].nil? - record.errors.add(attribute, 'changed from not-nil to nil') - end + record.errors.add(attribute, 'changed from not-nil to nil') if !changed[0].nil? && changed[1].nil? end end diff --git a/config/initializers/faker.rb b/config/initializers/faker.rb index 3b78d942..75a9ea91 100644 --- a/config/initializers/faker.rb +++ b/config/initializers/faker.rb @@ -1 +1 @@ -Faker::Config.locale = 'nl' if Rails.env.development? || Rails.env.test? +Faker::Config.locale = 'nl' if Rails.env.local? diff --git a/db/migrate/20250216233318_remove_null_option_boolean.rb b/db/migrate/20250216233318_remove_null_option_boolean.rb index d84e2181..4524a9fc 100644 --- a/db/migrate/20250216233318_remove_null_option_boolean.rb +++ b/db/migrate/20250216233318_remove_null_option_boolean.rb @@ -1,5 +1,5 @@ class RemoveNullOptionBoolean < ActiveRecord::Migration[7.0] - # rubocop:disable Rails/ReversibleMigration, Rails/BulkChangeTable, Metrics/AbcSize, Layout/LineLength + # rubocop:disable Rails/ReversibleMigration, Rails/BulkChangeTable, Metrics/AbcSize def change execute 'UPDATE static_pages SET publicly_visible = false WHERE publicly_visible IS NULL' execute 'UPDATE users SET sidekiq_access = false WHERE sidekiq_access IS NULL' @@ -34,5 +34,5 @@ def change change_column_default :room_adverts, :publicly_visible, false change_column_null :room_adverts, :publicly_visible, false end - # rubocop:enable Rails/ReversibleMigration, Rails/BulkChangeTable, Metrics/AbcSize, Layout/LineLength + # rubocop:enable Rails/ReversibleMigration, Rails/BulkChangeTable, Metrics/AbcSize end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index adff284d..a2b7cbbd 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,6 +7,7 @@ minimum_coverage_by_file 95 end +require 'active_support' require 'pundit/rspec' require 'vcr' diff --git a/spec/support/behaviors/requests/model_with_conditionally_updatable_attributes.rb b/spec/support/behaviors/requests/model_with_conditionally_updatable_attributes.rb index 6c4e98fe..462a01b4 100644 --- a/spec/support/behaviors/requests/model_with_conditionally_updatable_attributes.rb +++ b/spec/support/behaviors/requests/model_with_conditionally_updatable_attributes.rb @@ -1,4 +1,4 @@ -shared_examples 'a model with conditionally updatable attributes' do |unrestricted_attrs, permissible_attrs, response| # rubocop:disable Layout/LineLength +shared_examples 'a model with conditionally updatable attributes' do |unrestricted_attrs, permissible_attrs, response| let(:new_attrs) do attrs = record.attributes.symbolize_keys.transform_values do |value| case value From 9bd3cd58a8ffdefbc0433fbcbcbfb45653212c9f Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 17:39:20 +0100 Subject: [PATCH 16/45] archived migration --- db/migrate/{ => archive}/20250206102023_tomato_to_sofia.rb | 0 db/migrate/{ => archive}/20250207233328_remove_contact_sync.rb | 0 .../{ => archive}/20250216233318_remove_null_option_boolean.rb | 0 db/migrate/{ => archive}/20250218204807_add_be_rijbewijs.rb | 0 .../20250219195453_remove_unique_index_from_form_responses.rb | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename db/migrate/{ => archive}/20250206102023_tomato_to_sofia.rb (100%) rename db/migrate/{ => archive}/20250207233328_remove_contact_sync.rb (100%) rename db/migrate/{ => archive}/20250216233318_remove_null_option_boolean.rb (100%) rename db/migrate/{ => archive}/20250218204807_add_be_rijbewijs.rb (100%) rename db/migrate/{ => archive}/20250219195453_remove_unique_index_from_form_responses.rb (100%) diff --git a/db/migrate/20250206102023_tomato_to_sofia.rb b/db/migrate/archive/20250206102023_tomato_to_sofia.rb similarity index 100% rename from db/migrate/20250206102023_tomato_to_sofia.rb rename to db/migrate/archive/20250206102023_tomato_to_sofia.rb diff --git a/db/migrate/20250207233328_remove_contact_sync.rb b/db/migrate/archive/20250207233328_remove_contact_sync.rb similarity index 100% rename from db/migrate/20250207233328_remove_contact_sync.rb rename to db/migrate/archive/20250207233328_remove_contact_sync.rb diff --git a/db/migrate/20250216233318_remove_null_option_boolean.rb b/db/migrate/archive/20250216233318_remove_null_option_boolean.rb similarity index 100% rename from db/migrate/20250216233318_remove_null_option_boolean.rb rename to db/migrate/archive/20250216233318_remove_null_option_boolean.rb diff --git a/db/migrate/20250218204807_add_be_rijbewijs.rb b/db/migrate/archive/20250218204807_add_be_rijbewijs.rb similarity index 100% rename from db/migrate/20250218204807_add_be_rijbewijs.rb rename to db/migrate/archive/20250218204807_add_be_rijbewijs.rb diff --git a/db/migrate/20250219195453_remove_unique_index_from_form_responses.rb b/db/migrate/archive/20250219195453_remove_unique_index_from_form_responses.rb similarity index 100% rename from db/migrate/20250219195453_remove_unique_index_from_form_responses.rb rename to db/migrate/archive/20250219195453_remove_unique_index_from_form_responses.rb From e95541ba1799bef9e71f6fb56ecb90776b750864 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 17:42:17 +0100 Subject: [PATCH 17/45] fixed deprecation errors --- spec/rails_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index e08aeb32..22fb5929 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -33,7 +33,7 @@ config.include ActionMailbox::TestHelper # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = Rails.root.join('spec', 'fixtures') + config.fixture_paths = Rails.root.join('spec', 'fixtures') # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false From c52f3980dbd0b43e754c7f4ad8f08e14211dd7c2 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 17:59:13 +0100 Subject: [PATCH 18/45] update rspec-rails --- Gemfile | 2 +- Gemfile.lock | 57 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/Gemfile b/Gemfile index 24d24cbc..2120099c 100644 --- a/Gemfile +++ b/Gemfile @@ -72,7 +72,7 @@ end group :test do gem 'guard-rspec', require: false - gem 'rspec-rails' + gem 'rspec-rails','~> 5.1', '>= 5.1.1' gem 'rubocop', '~> 1.73', '>= 1.73.2', require: false gem 'rubocop-factory_bot', '~> 2.27', require: false gem 'rubocop-performance', '~> 1.24', '>= 1.24.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 5972caf5..7723161c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -124,7 +124,7 @@ GEM activesupport coderay (1.1.3) colorize (0.8.1) - concurrent-ruby (1.3.4) + concurrent-ruby (1.3.5) connection_pool (2.5.0) consistency_fail (0.3.7) counter_culture (3.8.2) @@ -136,7 +136,7 @@ GEM date (3.4.1) date (3.4.1-java) debug_inspector (1.1.0) - diff-lcs (1.5.0) + diff-lcs (1.6.0) docile (1.4.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) @@ -149,7 +149,7 @@ GEM dotenv (= 2.7.6) railties (>= 3.2) drb (2.2.1) - erubi (1.13.0) + erubi (1.13.1) et-orbi (1.2.11) tzinfo exifr (1.4.1) @@ -239,8 +239,8 @@ GEM llhttp-ffi (0.5.0) ffi-compiler (~> 1.0) rake (~> 13.0) - logger (1.6.5) - loofah (2.23.1) + logger (1.6.6) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) lumberjack (1.2.8) @@ -281,9 +281,11 @@ GEM netrc (0.11.0) nio4r (2.7.4) nio4r (2.7.4-java) - nokogiri (1.16.7) + nokogiri (1.18.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) + nokogiri (1.18.3-java) + racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) @@ -331,20 +333,20 @@ GEM raabro (1.4.0) racc (1.8.1) racc (1.8.1-java) - rack (2.2.11) + rack (3.1.11) rack-attack (6.7.0) rack (>= 1.0, < 4) rack-cors (2.0.2) rack (>= 2.0.0) rack-mini-profiler (3.0.0) rack (>= 1.2.0) - rack-session (1.0.2) - rack (< 3) - rack-test (2.1.0) + rack-session (2.1.0) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) rack (>= 1.3) - rackup (1.0.1) - rack (< 3) - webrick + rackup (2.2.1) + rack (>= 3) rails (7.1.5.1) actioncable (= 7.1.5.1) actionmailbox (= 7.1.5.1) @@ -363,9 +365,9 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) + 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) rails-i18n (7.0.10) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) @@ -428,21 +430,21 @@ GEM rspec-mocks (~> 3.11.0) rspec-core (3.11.0) rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec-expectations (3.11.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.11.0) - rspec-mocks (3.11.1) + rspec-mocks (3.11.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.11.0) - rspec-rails (5.1.1) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.11.0) + rspec-rails (6.0.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.11) + rspec-expectations (~> 3.11) + rspec-mocks (~> 3.11) + rspec-support (~> 3.11) + rspec-support (3.11.1) rubocop (1.73.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) @@ -555,7 +557,6 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.9.1) websocket-driver (0.7.7) base64 websocket-extensions (>= 0.1.0) @@ -563,7 +564,7 @@ GEM base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.2) PLATFORMS java From 65279658fcc3460da6561779ecde1ecedeb86b97 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 18:07:03 +0100 Subject: [PATCH 19/45] re add deprecation --- Gemfile | 2 +- spec/rails_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 2120099c..a7e583ec 100644 --- a/Gemfile +++ b/Gemfile @@ -72,7 +72,7 @@ end group :test do gem 'guard-rspec', require: false - gem 'rspec-rails','~> 5.1', '>= 5.1.1' + gem 'rspec-rails', '~> 5.1', '>= 5.1.1' gem 'rubocop', '~> 1.73', '>= 1.73.2', require: false gem 'rubocop-factory_bot', '~> 2.27', require: false gem 'rubocop-performance', '~> 1.24', '>= 1.24.0', require: false diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 22fb5929..e08aeb32 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -33,7 +33,7 @@ config.include ActionMailbox::TestHelper # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_paths = Rails.root.join('spec', 'fixtures') + config.fixture_path = Rails.root.join('spec', 'fixtures') # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false From dc8cd1d4c2c1298c9dcf20285df06dc6df517e49 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 18:15:13 +0100 Subject: [PATCH 20/45] update rspec-rails --- Gemfile | 2 +- Gemfile.lock | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index a7e583ec..7e00f1ff 100644 --- a/Gemfile +++ b/Gemfile @@ -72,7 +72,7 @@ end group :test do gem 'guard-rspec', require: false - gem 'rspec-rails', '~> 5.1', '>= 5.1.1' + gem 'rspec-rails', '~> 6.1', '>= 6.1.5' gem 'rubocop', '~> 1.73', '>= 1.73.2', require: false gem 'rubocop-factory_bot', '~> 2.27', require: false gem 'rubocop-performance', '~> 1.24', '>= 1.24.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 7723161c..55cead01 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -424,27 +424,27 @@ GEM nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) rotp (6.3.0) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.1) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.3) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.2) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-rails (6.0.1) + rspec-support (~> 3.13.0) + rspec-rails (6.1.5) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) - rspec-core (~> 3.11) - rspec-expectations (~> 3.11) - rspec-mocks (~> 3.11) - rspec-support (~> 3.11) - rspec-support (3.11.1) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.2) rubocop (1.73.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) @@ -625,7 +625,7 @@ DEPENDENCIES rb-readline redis (~> 5.4) roo (~> 2.10, >= 2.10.1) - rspec-rails + rspec-rails (~> 6.1, >= 6.1.5) rubocop (~> 1.73, >= 1.73.2) rubocop-factory_bot (~> 2.27) rubocop-performance (~> 1.24, >= 1.24.0) From 70a97bcfb26828cc07b349a79a61fc960963301a Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 19:11:17 +0100 Subject: [PATCH 21/45] downgrade rails --- Gemfile | 2 +- Gemfile.lock | 174 +++++++++++++++++++-------------------------------- 2 files changed, 67 insertions(+), 109 deletions(-) diff --git a/Gemfile b/Gemfile index 7e00f1ff..7c850bad 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ gem 'puma', '~> 6.6' gem 'pundit', '~> 2.5' gem 'rack-attack', '~> 6.7' gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' -gem 'rails', '~> 7.1.5', '>= 7.1.5.0' +gem 'rails', '~> 7.0.8', '>= 7.0.8.7' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' gem 'redis', '~> 5.4' gem 'roo', '~> 2.10', '>= 2.10.1' diff --git a/Gemfile.lock b/Gemfile.lock index 55cead01..cb3f3024 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,85 +1,73 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.1.5.1) - actionpack (= 7.1.5.1) - activesupport (= 7.1.5.1) + actioncable (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - zeitwerk (~> 2.6) - actionmailbox (7.1.5.1) - actionpack (= 7.1.5.1) - activejob (= 7.1.5.1) - activerecord (= 7.1.5.1) - activestorage (= 7.1.5.1) - activesupport (= 7.1.5.1) + actionmailbox (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.5.1) - actionpack (= 7.1.5.1) - actionview (= 7.1.5.1) - activejob (= 7.1.5.1) - activesupport (= 7.1.5.1) + actionmailer (7.0.8.7) + actionpack (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.2) - actionpack (7.1.5.1) - actionview (= 7.1.5.1) - activesupport (= 7.1.5.1) - nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4) - rack-session (>= 1.0.1) + rails-dom-testing (~> 2.0) + actionpack (7.0.8.7) + actionview (= 7.0.8.7) + activesupport (= 7.0.8.7) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - actiontext (7.1.5.1) - actionpack (= 7.1.5.1) - activerecord (= 7.1.5.1) - activestorage (= 7.1.5.1) - activesupport (= 7.1.5.1) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (7.0.8.7) + actionpack (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.5.1) - activesupport (= 7.1.5.1) + actionview (7.0.8.7) + activesupport (= 7.0.8.7) builder (~> 3.1) - erubi (~> 1.11) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) active_model_otp (2.3.4) activemodel rotp (~> 6.3.0) - activejob (7.1.5.1) - activesupport (= 7.1.5.1) + activejob (7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.3.6) - activemodel (7.1.5.1) - activesupport (= 7.1.5.1) - activerecord (7.1.5.1) - activemodel (= 7.1.5.1) - activesupport (= 7.1.5.1) - timeout (>= 0.4.0) - activestorage (7.1.5.1) - actionpack (= 7.1.5.1) - activejob (= 7.1.5.1) - activerecord (= 7.1.5.1) - activesupport (= 7.1.5.1) + activemodel (7.0.8.7) + activesupport (= 7.0.8.7) + activerecord (7.0.8.7) + activemodel (= 7.0.8.7) + activesupport (= 7.0.8.7) + activestorage (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activesupport (= 7.0.8.7) marcel (~> 1.0) - activesupport (7.1.5.1) - base64 - benchmark (>= 0.3) - bigdecimal + mini_mime (>= 1.1.0) + activesupport (7.0.8.7) concurrent-ruby (~> 1.0, >= 1.0.2) - connection_pool (>= 2.2.5) - drb i18n (>= 1.6, < 2) - logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - securerandom (>= 0.3) tzinfo (~> 2.0) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) @@ -148,7 +136,6 @@ GEM dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) - drb (2.2.1) erubi (1.13.1) et-orbi (1.2.11) tzinfo @@ -213,15 +200,8 @@ GEM ruby-vips (>= 2.0.17, < 3) improvmx (0.2.1) rest-client (~> 2.0) - io-console (0.8.0) - io-console (0.8.0-java) - irb (1.15.1) - pp (>= 0.6.0) - rdoc (>= 4.0.0) - reline (>= 0.4.2) isbn_validation (1.2.2) activerecord (>= 3) - jar-dependencies (0.5.5) json (2.10.1) json (2.10.1-java) jsonapi-authorization (3.0.2) @@ -267,7 +247,6 @@ GEM minitest (5.25.4) msgpack (1.7.5) msgpack (1.7.5-java) - mutex_m (0.3.0) nenv (0.3.0) net-imap (0.5.6) date @@ -302,9 +281,6 @@ GEM racc pg (1.5.9) phonelib (0.6.58) - pp (0.6.2) - prettyprint - prettyprint (0.2.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -317,12 +293,6 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.11) pry (>= 0.13.0) - psych (5.2.3) - date - stringio - psych (5.2.3-java) - date - jar-dependencies (>= 0.1.7) public_suffix (6.0.1) puma (6.6.0) nio4r (~> 2.0) @@ -333,34 +303,29 @@ GEM raabro (1.4.0) racc (1.8.1) racc (1.8.1-java) - rack (3.1.11) + rack (2.2.12) rack-attack (6.7.0) rack (>= 1.0, < 4) rack-cors (2.0.2) rack (>= 2.0.0) rack-mini-profiler (3.0.0) rack (>= 1.2.0) - rack-session (2.1.0) - base64 (>= 0.1.0) - rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rackup (2.2.1) - rack (>= 3) - rails (7.1.5.1) - actioncable (= 7.1.5.1) - actionmailbox (= 7.1.5.1) - actionmailer (= 7.1.5.1) - actionpack (= 7.1.5.1) - actiontext (= 7.1.5.1) - actionview (= 7.1.5.1) - activejob (= 7.1.5.1) - activemodel (= 7.1.5.1) - activerecord (= 7.1.5.1) - activestorage (= 7.1.5.1) - activesupport (= 7.1.5.1) + rails (7.0.8.7) + actioncable (= 7.0.8.7) + actionmailbox (= 7.0.8.7) + actionmailer (= 7.0.8.7) + actionpack (= 7.0.8.7) + actiontext (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activemodel (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) bundler (>= 1.15.0) - railties (= 7.1.5.1) + railties (= 7.0.8.7) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -371,29 +336,24 @@ GEM rails-i18n (7.0.10) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.1.5.1) - actionpack (= 7.1.5.1) - activesupport (= 7.1.5.1) - irb - rackup (>= 1.0.0) + railties (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) + method_source rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - zeitwerk (~> 2.6) + thor (~> 1.0) + zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) rb-readline (0.5.5) - rdoc (6.12.0) - psych (>= 4.0.0) redis (5.4.0) redis-client (>= 0.22.0) redis-client (0.23.0) connection_pool regexp_parser (2.10.0) - reline (0.6.0) - io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) rest-client (2.1.0) @@ -486,7 +446,6 @@ GEM rubyzip (2.4.1) rufus-scheduler (3.9.2) fugit (~> 1.1, >= 1.11.1) - securerandom (0.4.1) sentry-rails (5.22.4) railties (>= 5.0) sentry-ruby (~> 5.22.4) @@ -527,7 +486,6 @@ GEM listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) ssrf_filter (1.2.0) - stringio (3.1.5) terminal-notifier-guard (1.7.0) thor (1.3.2) tilt (2.4.0) @@ -620,7 +578,7 @@ DEPENDENCIES rack-attack (~> 6.7) rack-cors (~> 2.0, >= 2.0.2) rack-mini-profiler - rails (~> 7.1.5, >= 7.1.5.0) + rails (~> 7.0.8, >= 7.0.8.7) rails-i18n (~> 7.0, >= 7.0.10) rb-readline redis (~> 5.4) From b7c68f4d69ba2d1c9109c6f938e353a4d7531e21 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 19:12:53 +0100 Subject: [PATCH 22/45] readded concurrent ruby --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 7c850bad..04b73639 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,7 @@ gem 'carrierwave', '~> 3.1', '>= 3.1.1' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' +gem 'concurrent-ruby', '1.3.4' gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'doorkeeper', '~> 5.8', '>= 5.8.1' gem 'doorkeeper-i18n', '~> 5.2', '>= 5.2.7' From ea33f68e103f5083ae80efd00f08479fe526305e Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 19:30:45 +0100 Subject: [PATCH 23/45] fix bullet test failure --- app/resources/v1/user_resource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/resources/v1/user_resource.rb b/app/resources/v1/user_resource.rb index 5782f475..02cc4fa6 100644 --- a/app/resources/v1/user_resource.rb +++ b/app/resources/v1/user_resource.rb @@ -21,7 +21,7 @@ def avatar_thumb_url has_many :active_groups has_many :memberships has_many :mail_aliases - has_many :mandates, always_include_linkage_data: true + has_many :mandates has_many :group_mail_aliases has_many :permissions has_many :photos From b9e600ca11752f9e22eccc23480d736433cf1a62 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 19:59:11 +0100 Subject: [PATCH 24/45] revert change --- Gemfile.lock | 3 ++- app/resources/v1/user_resource.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cb3f3024..ca26a22e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -112,7 +112,7 @@ GEM activesupport coderay (1.1.3) colorize (0.8.1) - concurrent-ruby (1.3.5) + concurrent-ruby (1.3.4) connection_pool (2.5.0) consistency_fail (0.3.7) counter_culture (3.8.2) @@ -545,6 +545,7 @@ DEPENDENCIES carrierwave-bombshelter (~> 0.2, >= 0.2.2) case_transform (~> 0.2) colorize + concurrent-ruby (= 1.3.4) consistency_fail counter_culture (~> 3.8, >= 3.8.2) doorkeeper (~> 5.8, >= 5.8.1) diff --git a/app/resources/v1/user_resource.rb b/app/resources/v1/user_resource.rb index 02cc4fa6..5782f475 100644 --- a/app/resources/v1/user_resource.rb +++ b/app/resources/v1/user_resource.rb @@ -21,7 +21,7 @@ def avatar_thumb_url has_many :active_groups has_many :memberships has_many :mail_aliases - has_many :mandates + has_many :mandates, always_include_linkage_data: true has_many :group_mail_aliases has_many :permissions has_many :photos From cb3864d20b17006e3896e750f4134bd0caa76cc3 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 20:02:20 +0100 Subject: [PATCH 25/45] update all depencies --- Gemfile.lock | 110 +++++++++++++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ca26a22e..28a0d5f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -77,17 +77,18 @@ GEM bcrypt (3.1.20) bcrypt (3.1.20-java) benchmark (0.4.0) - better_errors (2.9.1) - coderay (>= 1.0.0) + better_errors (2.10.1) erubi (>= 1.0.0) rack (>= 0.9.0) + rouge (>= 1.0.0) bigdecimal (3.1.9) bigdecimal (3.1.9-java) - binding_of_caller (1.0.0) - debug_inspector (>= 0.0.1) + binding_of_caller (1.0.1) + debug_inspector (>= 1.2.0) bootsnap (1.18.4) msgpack (~> 1.2) - brakeman (5.2.3) + brakeman (7.0.0) + racc builder (3.3.0) bullet (7.2.0) activesupport (>= 3.0.0) @@ -111,43 +112,43 @@ GEM case_transform (0.2) activesupport coderay (1.1.3) - colorize (0.8.1) + colorize (1.1.0) concurrent-ruby (1.3.4) connection_pool (2.5.0) consistency_fail (0.3.7) counter_culture (3.8.2) activerecord (>= 4.2) activesupport (>= 4.2) - crack (0.4.5) + crack (1.0.0) + bigdecimal rexml crass (1.0.6) date (3.4.1) date (3.4.1-java) - debug_inspector (1.1.0) + debug_inspector (1.2.0) diff-lcs (1.6.0) - docile (1.4.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + docile (1.4.1) + domain_name (0.6.20240107) doorkeeper (5.8.1) railties (>= 5) doorkeeper-i18n (5.2.7) doorkeeper (>= 5.2) - dotenv (2.7.6) - dotenv-rails (2.7.6) - dotenv (= 2.7.6) - railties (>= 3.2) + dotenv (3.1.7) + dotenv-rails (3.1.7) + dotenv (= 3.1.7) + railties (>= 6.1) erubi (1.13.1) et-orbi (1.2.11) tzinfo exifr (1.4.1) - factory_bot (6.2.1) - activesupport (>= 5.0.0) - factory_bot_rails (6.2.0) - factory_bot (~> 6.2.0) + factory_bot (6.5.1) + activesupport (>= 6.1.0) + factory_bot_rails (6.4.4) + factory_bot (~> 6.5) railties (>= 5.0.0) faker (3.5.1) i18n (>= 1.8.11, < 2) - fastimage (2.2.6) + fastimage (2.4.0) ffi (1.17.1) ffi-compiler (1.3.2) ffi (>= 1.15.5) @@ -163,12 +164,14 @@ GEM ruby-progressbar (~> 1.4) globalid (1.2.1) activesupport (>= 6.1) - guard (2.18.0) + guard (2.19.1) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) + logger (~> 1.6) lumberjack (>= 1.0.12, < 2.0) nenv (~> 0.1) notiffany (~> 0.0) + ostruct (~> 0.6) pry (>= 0.13.0) shellany (~> 0.0) thor (>= 0.18.1) @@ -177,7 +180,7 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - hashdiff (1.0.1) + hashdiff (1.1.2) http (5.2.0) addressable (~> 2.8) base64 (~> 0.1) @@ -185,7 +188,7 @@ GEM http-form_data (~> 2.2) llhttp-ffi (~> 0.5.0) http-accept (1.7.0) - http-cookie (1.0.4) + http-cookie (1.0.8) domain_name (~> 0.5) http-form_data (2.3.0) i18n (1.14.7) @@ -213,7 +216,7 @@ GEM railties (>= 4.1) language_server-protocol (3.17.0.4) lint_roller (1.1.0) - listen (3.7.1) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) llhttp-ffi (0.5.0) @@ -223,7 +226,7 @@ GEM loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lumberjack (1.2.8) + lumberjack (1.2.10) mail (2.8.1) mini_mime (>= 0.1.1) net-imap @@ -233,11 +236,11 @@ GEM message_bus (4.3.9) rack (>= 1.1.3) method_source (1.1.0) - mime-types (3.4.1) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) - mina (1.2.4) - open4 (~> 1.3.4) + mime-types-data (3.2025.0304) + mina (1.2.5) rake mini_magick (5.2.0) benchmark @@ -245,8 +248,8 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.8) minitest (5.25.4) - msgpack (1.7.5) - msgpack (1.7.5-java) + msgpack (1.8.0) + msgpack (1.8.0-java) nenv (0.3.0) net-imap (0.5.6) date @@ -268,7 +271,6 @@ GEM notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) - open4 (1.3.4) ostruct (0.6.1) paper_trail (16.0.0) activerecord (>= 6.1) @@ -280,7 +282,7 @@ GEM ast (~> 2.4.1) racc pg (1.5.9) - phonelib (0.6.58) + phonelib (0.10.5) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -308,7 +310,7 @@ GEM rack (>= 1.0, < 4) rack-cors (2.0.2) rack (>= 2.0.0) - rack-mini-profiler (3.0.0) + rack-mini-profiler (3.3.1) rack (>= 1.2.0) rack-test (2.2.0) rack (>= 1.3) @@ -345,13 +347,13 @@ GEM zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.2.1) - rb-fsevent (0.11.1) - rb-inotify (0.10.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) ffi (~> 1.0) rb-readline (0.5.5) redis (5.4.0) redis-client (>= 0.22.0) - redis-client (0.23.0) + redis-client (0.24.0) connection_pool regexp_parser (2.10.0) request_store (1.7.0) @@ -384,6 +386,7 @@ GEM nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) rotp (6.3.0) + rouge (4.5.1) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -416,7 +419,7 @@ GEM rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.38.0) + rubocop-ast (1.38.1) parser (>= 3.3.1.0) rubocop-factory_bot (2.27.0) lint_roller (~> 1.1) @@ -440,7 +443,7 @@ GEM rubocop-rspec (~> 3.5) ruby-filemagic (0.7.3) ruby-progressbar (1.13.0) - ruby-vips (2.2.2) + ruby-vips (2.2.3) ffi (~> 1.12) logger rubyzip (2.4.1) @@ -470,38 +473,32 @@ GEM rufus-scheduler (~> 3.2) sidekiq (>= 6, < 8) tilt (>= 1.4.0, < 3) - simplecov (0.21.2) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov-lcov (0.8.0) simplecov_json_formatter (0.1.4) spoon (0.0.6) ffi - spring (2.1.1) + spring (4.2.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - spring-watcher-listen (2.0.1) + spring-watcher-listen (2.1.0) listen (>= 2.7, < 4.0) - spring (>= 1.2, < 3.0) + spring (>= 4) ssrf_filter (1.2.0) terminal-notifier-guard (1.7.0) thor (1.3.2) - tilt (2.4.0) - timecop (0.9.5) - timeliness (0.5.1) + tilt (2.6.0) + timecop (0.9.10) + timeliness (0.5.2) timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2022.1) + tzinfo-data (1.2025.1) tzinfo (>= 1.0.0) - unf (0.1.4) - unf_ext - unf (0.1.4-java) - unf_ext (0.0.8.1) - unf_ext (0.0.8.1-x64-mingw32) - unf_ext (0.0.8.1-x86-mingw32) unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) @@ -509,9 +506,10 @@ GEM validates_timeliness (7.1.0) activemodel (>= 7.0.0, < 8) timeliness (>= 0.3.10, < 1) - vcr (6.1.0) + vcr (6.3.1) + base64 vpim (24.2.20) - webmock (3.14.0) + webmock (3.25.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) From 752ddc2c4de3ad05056c61bcb612f20b939476ec Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 20:28:32 +0100 Subject: [PATCH 26/45] fix tests? --- spec/models/user_spec.rb | 2 +- spec/requests/v1/users_controller/index_spec.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 2c7b8758..a452b9ed 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -97,7 +97,7 @@ end context 'when with an invalid emergency_number' do - subject(:user) { build_stubbed(:user, emergency_number: '+3161234567890') } + subject(:user) { build_stubbed(:user, emergency_number: '+31612345678901') } it { expect(user).not_to be_valid } end diff --git a/spec/requests/v1/users_controller/index_spec.rb b/spec/requests/v1/users_controller/index_spec.rb index bfaee2b7..24748269 100644 --- a/spec/requests/v1/users_controller/index_spec.rb +++ b/spec/requests/v1/users_controller/index_spec.rb @@ -32,6 +32,10 @@ create(:user, groups: [group], user_permission_list: %w[user.read group.read]) end + + before { Bullet.enable = false } + + after { Bullet.enable = true } it do expect( From c78352d9b7f44541bcd36fe156abf09f1c512998 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 20:34:48 +0100 Subject: [PATCH 27/45] fix lint --- spec/requests/v1/users_controller/index_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/requests/v1/users_controller/index_spec.rb b/spec/requests/v1/users_controller/index_spec.rb index 24748269..a432fb70 100644 --- a/spec/requests/v1/users_controller/index_spec.rb +++ b/spec/requests/v1/users_controller/index_spec.rb @@ -32,7 +32,7 @@ create(:user, groups: [group], user_permission_list: %w[user.read group.read]) end - + before { Bullet.enable = false } after { Bullet.enable = true } From 98232f5e535ffdd0e6e9ba097bd9935353b90845 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 20:45:29 +0100 Subject: [PATCH 28/45] updated ruby --- Gemfile | 3 +- Gemfile.lock | 174 +++++++++++++++++++++++++---------------- config/brakeman.ignore | 15 ---- 3 files changed, 109 insertions(+), 83 deletions(-) diff --git a/Gemfile b/Gemfile index 04b73639..40783fd9 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,6 @@ gem 'carrierwave', '~> 3.1', '>= 3.1.1' gem 'carrierwave-base64', '~> 2.11' gem 'carrierwave-bombshelter', '~> 0.2', '>= 0.2.2' gem 'case_transform', '~> 0.2' -gem 'concurrent-ruby', '1.3.4' gem 'counter_culture', '~> 3.8', '>= 3.8.2' gem 'doorkeeper', '~> 5.8', '>= 5.8.1' gem 'doorkeeper-i18n', '~> 5.2', '>= 5.2.7' @@ -30,7 +29,7 @@ gem 'puma', '~> 6.6' gem 'pundit', '~> 2.5' gem 'rack-attack', '~> 6.7' gem 'rack-cors', '~> 2.0', '>= 2.0.2', require: 'rack/cors' -gem 'rails', '~> 7.0.8', '>= 7.0.8.7' +gem 'rails', '~> 7.1.0', '>= 7.1.5.1' gem 'rails-i18n', '~> 7.0', '>= 7.0.10' gem 'redis', '~> 5.4' gem 'roo', '~> 2.10', '>= 2.10.1' diff --git a/Gemfile.lock b/Gemfile.lock index 28a0d5f0..2980d8ff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,73 +1,85 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) + actioncable (7.1.5.1) + actionpack (= 7.1.5.1) + activesupport (= 7.1.5.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + zeitwerk (~> 2.6) + actionmailbox (7.1.5.1) + actionpack (= 7.1.5.1) + activejob (= 7.1.5.1) + activerecord (= 7.1.5.1) + activestorage (= 7.1.5.1) + activesupport (= 7.1.5.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8.7) - actionpack (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activesupport (= 7.0.8.7) + actionmailer (7.1.5.1) + actionpack (= 7.1.5.1) + actionview (= 7.1.5.1) + activejob (= 7.1.5.1) + activesupport (= 7.1.5.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8.7) - actionview (= 7.0.8.7) - activesupport (= 7.0.8.7) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.5.1) + actionview (= 7.1.5.1) + activesupport (= 7.1.5.1) + 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.7) - actionpack (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.5.1) + actionpack (= 7.1.5.1) + activerecord (= 7.1.5.1) + activestorage (= 7.1.5.1) + activesupport (= 7.1.5.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.7) - activesupport (= 7.0.8.7) + actionview (7.1.5.1) + activesupport (= 7.1.5.1) 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.4) activemodel rotp (~> 6.3.0) - activejob (7.0.8.7) - activesupport (= 7.0.8.7) + activejob (7.1.5.1) + activesupport (= 7.1.5.1) globalid (>= 0.3.6) - activemodel (7.0.8.7) - activesupport (= 7.0.8.7) - activerecord (7.0.8.7) - activemodel (= 7.0.8.7) - activesupport (= 7.0.8.7) - activestorage (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activesupport (= 7.0.8.7) + activemodel (7.1.5.1) + activesupport (= 7.1.5.1) + activerecord (7.1.5.1) + activemodel (= 7.1.5.1) + activesupport (= 7.1.5.1) + timeout (>= 0.4.0) + activestorage (7.1.5.1) + actionpack (= 7.1.5.1) + activejob (= 7.1.5.1) + activerecord (= 7.1.5.1) + activesupport (= 7.1.5.1) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.8.7) + activesupport (7.1.5.1) + base64 + benchmark (>= 0.3) + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) + mutex_m + securerandom (>= 0.3) tzinfo (~> 2.0) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) @@ -137,6 +149,7 @@ GEM dotenv-rails (3.1.7) dotenv (= 3.1.7) railties (>= 6.1) + drb (2.2.1) erubi (1.13.1) et-orbi (1.2.11) tzinfo @@ -203,8 +216,15 @@ GEM ruby-vips (>= 2.0.17, < 3) improvmx (0.2.1) rest-client (~> 2.0) + io-console (0.8.0) + io-console (0.8.0-java) + irb (1.15.1) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) isbn_validation (1.2.2) activerecord (>= 3) + jar-dependencies (0.5.5) json (2.10.1) json (2.10.1-java) jsonapi-authorization (3.0.2) @@ -250,6 +270,7 @@ GEM minitest (5.25.4) msgpack (1.8.0) msgpack (1.8.0-java) + mutex_m (0.3.0) nenv (0.3.0) net-imap (0.5.6) date @@ -283,6 +304,9 @@ GEM racc pg (1.5.9) phonelib (0.10.5) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -295,6 +319,12 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.11) pry (>= 0.13.0) + psych (5.2.3) + date + stringio + psych (5.2.3-java) + date + jar-dependencies (>= 0.1.7) public_suffix (6.0.1) puma (6.6.0) nio4r (~> 2.0) @@ -312,22 +342,27 @@ GEM rack (>= 2.0.0) rack-mini-profiler (3.3.1) rack (>= 1.2.0) + rack-session (1.0.2) + rack (< 3) rack-test (2.2.0) rack (>= 1.3) - rails (7.0.8.7) - actioncable (= 7.0.8.7) - actionmailbox (= 7.0.8.7) - actionmailer (= 7.0.8.7) - actionpack (= 7.0.8.7) - actiontext (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activemodel (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rackup (1.0.1) + rack (< 3) + webrick + rails (7.1.5.1) + actioncable (= 7.1.5.1) + actionmailbox (= 7.1.5.1) + actionmailer (= 7.1.5.1) + actionpack (= 7.1.5.1) + actiontext (= 7.1.5.1) + actionview (= 7.1.5.1) + activejob (= 7.1.5.1) + activemodel (= 7.1.5.1) + activerecord (= 7.1.5.1) + activestorage (= 7.1.5.1) + activesupport (= 7.1.5.1) bundler (>= 1.15.0) - railties (= 7.0.8.7) + railties (= 7.1.5.1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -338,24 +373,29 @@ GEM rails-i18n (7.0.10) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) - method_source + railties (7.1.5.1) + actionpack (= 7.1.5.1) + activesupport (= 7.1.5.1) + 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.2.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) rb-readline (0.5.5) + rdoc (6.12.0) + psych (>= 4.0.0) redis (5.4.0) redis-client (>= 0.22.0) redis-client (0.24.0) connection_pool regexp_parser (2.10.0) + reline (0.6.0) + io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) rest-client (2.1.0) @@ -449,6 +489,7 @@ GEM rubyzip (2.4.1) rufus-scheduler (3.9.2) fugit (~> 1.1, >= 1.11.1) + securerandom (0.4.1) sentry-rails (5.22.4) railties (>= 5.0) sentry-ruby (~> 5.22.4) @@ -489,6 +530,7 @@ GEM listen (>= 2.7, < 4.0) spring (>= 4) ssrf_filter (1.2.0) + stringio (3.1.5) terminal-notifier-guard (1.7.0) thor (1.3.2) tilt (2.6.0) @@ -513,6 +555,7 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webrick (1.9.1) websocket-driver (0.7.7) base64 websocket-extensions (>= 0.1.0) @@ -543,7 +586,6 @@ DEPENDENCIES carrierwave-bombshelter (~> 0.2, >= 0.2.2) case_transform (~> 0.2) colorize - concurrent-ruby (= 1.3.4) consistency_fail counter_culture (~> 3.8, >= 3.8.2) doorkeeper (~> 5.8, >= 5.8.1) @@ -577,7 +619,7 @@ DEPENDENCIES rack-attack (~> 6.7) rack-cors (~> 2.0, >= 2.0.2) rack-mini-profiler - rails (~> 7.0.8, >= 7.0.8.7) + rails (~> 7.1.0, >= 7.1.5.1) rails-i18n (~> 7.0, >= 7.0.10) rb-readline redis (~> 5.4) diff --git a/config/brakeman.ignore b/config/brakeman.ignore index 7b69468c..e6e759e6 100644 --- a/config/brakeman.ignore +++ b/config/brakeman.ignore @@ -1,20 +1,5 @@ { "ignored_warnings": [ - { - "warning_type": "Session Setting", - "warning_code": 29, - "fingerprint": "715ad9c0d76f57a6a657192574d528b620176a80fec969e2f63c88eacab0b984", - "message": "Session secret should not be included in version control", - "file": "config/initializers/secret_token.rb", - "line": 19, - "link": "http://brakemanscanner.org/docs/warning_types/session_setting/", - "code": null, - "render_path": null, - "location": null, - "user_input": null, - "confidence": "High", - "note": "" - } ], "updated": "2016-06-03 22:39:14 +0200", "brakeman_version": "3.3.1" From 0c7c84bda83d329bb8dbb7957cb12c7baacf2b6d Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 21:14:44 +0100 Subject: [PATCH 29/45] hopefully improving tests --- spec/models/user_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index a452b9ed..0251547e 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -194,13 +194,13 @@ let(:user) { create(:user) } context 'username' do - subject(:duplicate_user) { build_stubbed(:user, username: user.username) } + subject(:duplicate_user) { build(:user, username: user.username) } it { expect(duplicate_user).not_to be_valid } end context 'email' do - subject(:duplicate_user) { build_stubbed(:user, email: user.email) } + subject(:duplicate_user) { build(:user, email: user.email) } it { expect(duplicate_user).not_to be_valid } end From 9d6d7b6cb170921a40e103ecf89ef475b87e38c5 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 21:21:35 +0100 Subject: [PATCH 30/45] fix final test --- spec/models/mail_alias_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/models/mail_alias_spec.rb b/spec/models/mail_alias_spec.rb index cb175468..975a3bca 100644 --- a/spec/models/mail_alias_spec.rb +++ b/spec/models/mail_alias_spec.rb @@ -33,8 +33,7 @@ let(:other_mail_alias) { create(:mail_alias, :with_group) } subject(:mail_alias) do - build_stubbed(:mail_alias, - :with_group, email: other_mail_alias.email) + build(:mail_alias, :with_group, email: other_mail_alias.email) end it { expect(mail_alias).not_to be_valid } From 4019c1e4185e3e80bce6b64320d6df64bb052af6 Mon Sep 17 00:00:00 2001 From: Jorai Geertsema Date: Mon, 10 Mar 2025 23:59:55 +0100 Subject: [PATCH 31/45] excuted rails app update --- bin/ci.sh | 24 -------- bin/setup | 6 +- config/application.rb | 17 ++++-- config/environments/development.rb | 30 ++++++++-- config/environments/production.rb | 59 ++++++++++--------- config/environments/test.rb | 12 ++++ .../initializers/filter_parameter_logging.rb | 8 ++- db/schema.rb | 4 +- 8 files changed, 91 insertions(+), 69 deletions(-) delete mode 100755 bin/ci.sh diff --git a/bin/ci.sh b/bin/ci.sh deleted file mode 100755 index d728ca5d..00000000 --- a/bin/ci.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -set -e - -TYPE=$1 - -if [ "$TYPE" = "lint" ] || [ "$TYPE" = "" ]; then - echo "--- :rubocop: Rubocop" - bundle exec rubocop - - echo "--- :parcel: Brakeman" - bundle exec brakeman -z --no-pager - - echo "--- :ruby: Bundle audit" - gem install bundler-audit - bundle-audit update && bundle-audit check || true - RAILS_ENV=test bundle exec rails db:create db:environment:set db:schema:load - # Don't check DB consistency until solved: https://github.com/trptcolin/consistency_fail/issues/42 - # bundle exec consistency_fail -fi - -if [ "$TYPE" = "spec" ] || [ "$TYPE" = "" ]; then - RAILS_ENV=test bundle exec rails db:create db:environment:set db:schema:load - bundle exec rspec -fi diff --git a/bin/setup b/bin/setup index 0e39e8cb..b9941564 100755 --- a/bin/setup +++ b/bin/setup @@ -5,12 +5,12 @@ require 'fileutils' APP_ROOT = File.expand_path('..', __dir__) def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") + system(*args, exception: true) end FileUtils.chdir APP_ROOT do - # This script is a way to setup or update your development environment automatically. - # This script is idempotent, so that you can run it at anytime and get an expectable outcome. + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. puts '== Installing dependencies ==' diff --git a/config/application.rb b/config/application.rb index 56f01904..10285e03 100644 --- a/config/application.rb +++ b/config/application.rb @@ -22,11 +22,18 @@ module Amber class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 - - # Settings in config/environments/* take precedence over those specified here. - # Application configuration can go into files in config/initializers - # -- all .rb files in that directory are automatically loaded after loading - # the framework and any gems in your application. + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w(assets tasks)) + + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") # Only loads a smaller set of middleware suitable for API only apps. # Middleware like session, flash, cookies can be added back manually. diff --git a/config/environments/development.rb b/config/environments/development.rb index 99e21f44..afadc933 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,10 +1,12 @@ +require "active_support/core_ext/integer/time" + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. - config.cache_classes = false + config.enable_reloading = true # Do not eager load code on boot. config.eager_load = false @@ -12,9 +14,12 @@ # Show full error reports. config.consider_all_requests_local = true + # Enable server timing + config.server_timing = true + # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. - if Rails.root.join('tmp', 'caching-dev.txt').exist? + if Rails.root.join('tmp/caching-dev.txt').exist? config.cache_store = :memory_store config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" @@ -36,14 +41,29 @@ # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true + # Highlight code that enqueued background job in logs. + config.active_job.verbose_enqueue_logs = true + # Raises error for missing translations. - # config.action_view.raise_on_missing_translations = true + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = true # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. diff --git a/config/environments/production.rb b/config/environments/production.rb index 9c23bed4..b2c14bbf 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,11 +1,8 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # Require master key for secrets - config.require_master_key = true - # Code is not reloaded between requests. - config.cache_classes = true + config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers @@ -14,19 +11,19 @@ config.eager_load = true # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false + config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] - # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). - # config.require_master_key = true + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). + config.require_master_key = true - # Disable serving static files from the `/public` folder by default since + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. # Apache or NGINX already handles this. config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' + # config.asset_host = "http://assets.example.com" # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache @@ -35,21 +32,32 @@ # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :local + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. + # Log to STDOUT by default + config.logger = ActiveSupport::Logger.new(STDOUT) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } config.log_level = :debug # Prepend all log lines with the following tags. config.log_tags = [:request_id] + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + # Use a different cache store in production. # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment). - # config.active_job.queue_adapter = :resque + # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "amber_production" config.action_mailer.perform_caching = false @@ -63,24 +71,19 @@ config.i18n.fallbacks = true # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = Logger::Formatter.new - - # Use a different logger for distributed setups. - # require 'syslog/logger' - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') - - if ENV['RAILS_LOG_TO_STDOUT'].present? - logger = ActiveSupport::Logger.new($stdout) - logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) - end + config.active_support.report_deprecations = :notify # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } + config.cache_store = :redis_cache_store, { url: Rails.application.config_for(:cable)['url'] } # Refer to the front end of AMBER (Ember) diff --git a/config/environments/test.rb b/config/environments/test.rb index 5af3cbbc..9774234e 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -43,9 +43,21 @@ # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + # Raises error for missing translations. # config.action_view.raise_on_missing_translations = true + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = true + # Configure url to test actionmailer urls config.action_mailer.default_url_options = { scheme: 'http', host: 'testhost', port: 1337 } config.active_job.queue_adapter = :test diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4a994e1e..c2d89e28 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,4 +1,8 @@ # Be sure to restart your server when you modify this file. -# Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/db/schema.rb b/db/schema.rb index 2c4aaf6c..6eaca882 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2025_02_19_195453) do +ActiveRecord::Schema[7.1].define(version: 2025_03_10_225801) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -39,7 +39,7 @@ t.string "content_type" t.text "metadata" t.bigint "byte_size", null: false - t.string "checksum", null: false + t.string "checksum" t.datetime "created_at", precision: nil, null: false t.string "service_name", null: false t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true From 4246de15f2ac85cad45af74a391c15797e4da498 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 00:50:43 +0100 Subject: [PATCH 32/45] Reverted bin/ci.sh to commit 9d6d7b6 --- bin/ci.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bin/ci.sh diff --git a/bin/ci.sh b/bin/ci.sh new file mode 100755 index 00000000..d728ca5d --- /dev/null +++ b/bin/ci.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e + +TYPE=$1 + +if [ "$TYPE" = "lint" ] || [ "$TYPE" = "" ]; then + echo "--- :rubocop: Rubocop" + bundle exec rubocop + + echo "--- :parcel: Brakeman" + bundle exec brakeman -z --no-pager + + echo "--- :ruby: Bundle audit" + gem install bundler-audit + bundle-audit update && bundle-audit check || true + RAILS_ENV=test bundle exec rails db:create db:environment:set db:schema:load + # Don't check DB consistency until solved: https://github.com/trptcolin/consistency_fail/issues/42 + # bundle exec consistency_fail +fi + +if [ "$TYPE" = "spec" ] || [ "$TYPE" = "" ]; then + RAILS_ENV=test bundle exec rails db:create db:environment:set db:schema:load + bundle exec rspec +fi From 392f03c8c3a68c36accb51044dacbe350a228844 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 00:53:18 +0100 Subject: [PATCH 33/45] added new files --- .../new_framework_defaults_7_1.rb | 280 ++++++++++++++++++ ...e_storage_blobs_checksum.active_storage.rb | 8 + 2 files changed, 288 insertions(+) create mode 100644 config/initializers/new_framework_defaults_7_1.rb create mode 100644 db/migrate/20250310235232_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb new file mode 100644 index 00000000..3dc295db --- /dev/null +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -0,0 +1,280 @@ +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 7.1 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `7.1`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +### +# No longer add autoloaded paths into `$LOAD_PATH`. This means that you won't be able +# to manually require files that are managed by the autoloader, which you shouldn't do anyway. +# +# This will reduce the size of the load path, making `require` faster if you don't use bootsnap, or reduce the size +# of the bootsnap cache if you use it. +# +# To set this configuration, add the following line to `config/application.rb` (NOT this file): +# config.add_autoload_paths_to_load_path = false + +### +# Remove the default X-Download-Options headers since it is used only by Internet Explorer. +# If you need to support Internet Explorer, add back `"X-Download-Options" => "noopen"`. +#++ +# Rails.application.config.action_dispatch.default_headers = { +# "X-Frame-Options" => "SAMEORIGIN", +# "X-XSS-Protection" => "0", +# "X-Content-Type-Options" => "nosniff", +# "X-Permitted-Cross-Domain-Policies" => "none", +# "Referrer-Policy" => "strict-origin-when-cross-origin" +# } + +### +# Do not treat an `ActionController::Parameters` instance +# as equal to an equivalent `Hash` by default. +#++ +# Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false + +### +# Active Record Encryption now uses SHA-256 as its hash digest algorithm. +# +# There are 3 scenarios to consider. +# +# 1. If you have data encrypted with previous Rails versions, and you have +# +config.active_support.key_generator_hash_digest_class+ configured as SHA1 (the default +# before Rails 7.0), you need to configure SHA-1 for Active Record Encryption too: +#++ +# Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA1 +# +# 2. If you have +config.active_support.key_generator_hash_digest_class+ configured as SHA256 (the new default +# in 7.0), then you need to configure SHA-256 for Active Record Encryption: +#++ +# Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA256 +# +# 3. If you don't currently have data encrypted with Active Record encryption, you can disable this setting to +# configure the default behavior starting 7.1+: +#++ +# Rails.application.config.active_record.encryption.support_sha1_for_non_deterministic_encryption = false + +### +# No longer run after_commit callbacks on the first of multiple Active Record +# instances to save changes to the same database row within a transaction. +# Instead, run these callbacks on the instance most likely to have internal +# state which matches what was committed to the database, typically the last +# instance to save. +#++ +# Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false + +### +# Configures SQLite with a strict strings mode, which disables double-quoted string literals. +# +# SQLite has some quirks around double-quoted string literals. +# It first tries to consider double-quoted strings as identifier names, but if they don't exist +# it then considers them as string literals. Because of this, typos can silently go unnoticed. +# For example, it is possible to create an index for a non existing column. +# See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details. +#++ +# Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true + +### +# Disable deprecated singular associations names. +#++ +# Rails.application.config.active_record.allow_deprecated_singular_associations_name = false + +### +# Enable the Active Job `BigDecimal` argument serializer, which guarantees +# roundtripping. Without this serializer, some queue adapters may serialize +# `BigDecimal` arguments as simple (non-roundtrippable) strings. +# +# When deploying an application with multiple replicas, old (pre-Rails 7.1) +# replicas will not be able to deserialize `BigDecimal` arguments from this +# serializer. Therefore, this setting should only be enabled after all replicas +# have been successfully upgraded to Rails 7.1. +#++ +# Rails.application.config.active_job.use_big_decimal_serializer = true + +### +# Specify if an `ArgumentError` should be raised if `Rails.cache` `fetch` or +# `write` are given an invalid `expires_at` or `expires_in` time. +# Options are `true`, and `false`. If `false`, the exception will be reported +# as `handled` and logged instead. +#++ +# Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true + +### +# Specify whether Query Logs will format tags using the SQLCommenter format +# (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format. +# Options are `:legacy` and `:sqlcommenter`. +#++ +# Rails.application.config.active_record.query_log_tags_format = :sqlcommenter + +### +# Specify the default serializer used by `MessageEncryptor` and `MessageVerifier` +# instances. +# +# The legacy default is `:marshal`, which is a potential vector for +# deserialization attacks in cases where a message signing secret has been +# leaked. +# +# In Rails 7.1, the new default is `:json_allow_marshal` which serializes and +# deserializes with `ActiveSupport::JSON`, but can fall back to deserializing +# with `Marshal` so that legacy messages can still be read. +# +# In Rails 7.2, the default will become `:json` which serializes and +# deserializes with `ActiveSupport::JSON` only. +# +# Alternatively, you can choose `:message_pack` or `:message_pack_allow_marshal`, +# which serialize with `ActiveSupport::MessagePack`. `ActiveSupport::MessagePack` +# can roundtrip some Ruby types that are not supported by JSON, and may provide +# improved performance, but it requires the `msgpack` gem. +# +# For more information, see +# https://guides.rubyonrails.org/v7.1/configuring.html#config-active-support-message-serializer +# +# If you are performing a rolling deploy of a Rails 7.1 upgrade, wherein servers +# that have not yet been upgraded must be able to read messages from upgraded +# servers, first deploy without changing the serializer, then set the serializer +# in a subsequent deploy. +#++ +# Rails.application.config.active_support.message_serializer = :json_allow_marshal + +### +# Enable a performance optimization that serializes message data and metadata +# together. This changes the message format, so messages serialized this way +# cannot be read by older versions of Rails. However, messages that use the old +# format can still be read, regardless of whether this optimization is enabled. +# +# To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have +# not yet been upgraded must be able to read messages from upgraded servers, +# leave this optimization off on the first deploy, then enable it on a +# subsequent deploy. +#++ +# Rails.application.config.active_support.use_message_serializer_for_metadata = true + +### +# Set the maximum size for Rails log files. +# +# `config.load_defaults 7.1` does not set this value for environments other than +# development and test. +#++ +# if Rails.env.local? +# Rails.application.config.log_file_size = 100 * 1024 * 1024 +# end + +### +# Enable raising on assignment to attr_readonly attributes. The previous +# behavior would allow assignment but silently not persist changes to the +# database. +#++ +# Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true + +### +# Enable validating only parent-related columns for presence when the parent is mandatory. +# The previous behavior was to validate the presence of the parent record, which performed an extra query +# to get the parent every time the child record was updated, even when parent has not changed. +#++ +# Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false + +### +# Enable precompilation of `config.filter_parameters`. Precompilation can +# improve filtering performance, depending on the quantity and types of filters. +#++ +# Rails.application.config.precompile_filter_parameters = true + +### +# Enable before_committed! callbacks on all enrolled records in a transaction. +# The previous behavior was to only run the callbacks on the first copy of a record +# if there were multiple copies of the same record enrolled in the transaction. +#++ +# Rails.application.config.active_record.before_committed_on_all_records = true + +### +# Disable automatic column serialization into YAML. +# To keep the historic behavior, you can set it to `YAML`, however it is +# recommended to explicitly define the serialization method for each column +# rather than to rely on a global default. +#++ +# Rails.application.config.active_record.default_column_serializer = nil + +### +# Enable a performance optimization that serializes Active Record models +# in a faster and more compact way. +# +# To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have +# not yet been upgraded must be able to read caches from upgraded servers, +# leave this optimization off on the first deploy, then enable it on a +# subsequent deploy. +#++ +# Rails.application.config.active_record.marshalling_format_version = 7.1 + +### +# Run `after_commit` and `after_*_commit` callbacks in the order they are defined in a model. +# This matches the behaviour of all other callbacks. +# In previous versions of Rails, they ran in the inverse order. +#++ +# Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true + +### +# Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`. +#++ +# Rails.application.config.active_record.commit_transaction_on_non_local_return = true + +### +# Controls when to generate a value for has_secure_token declarations. +#++ +# Rails.application.config.active_record.generate_secure_token_on = :initialize + +### +# ** Please read carefully, this must be configured in config/application.rb ** +# +# Change the format of the cache entry. +# +# Changing this default means that all new cache entries added to the cache +# will have a different format that is not supported by Rails 7.0 +# applications. +# +# Only change this value after your application is fully deployed to Rails 7.1 +# and you have no plans to rollback. +# When you're ready to change format, add this to `config/application.rb` (NOT +# this file): +# config.active_support.cache_format_version = 7.1 + +### +# Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your +# platform. +# +# `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action View to use HTML5-compliant +# sanitizers if they are supported, else fall back to HTML4 sanitizers. +# +# In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor. +#++ +# Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor + +### +# Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your +# platform. +# +# `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action Text to use HTML5-compliant +# sanitizers if they are supported, else fall back to HTML4 sanitizers. +# +# In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor. +#++ +# Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor + +### +# Configure the log level used by the DebugExceptions middleware when logging +# uncaught exceptions during requests. +#++ +# Rails.application.config.action_dispatch.debug_exception_log_level = :error + +### +# Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5 +# parsers. +# +# Nokogiri::HTML5 isn't supported on JRuby, so JRuby applications must set this to :html4. +# +# In previous versions of Rails, these test helpers always used an HTML4 parser. +#++ +# Rails.application.config.dom_testing_default_html_version = :html5 diff --git a/db/migrate/20250310235232_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb b/db/migrate/20250310235232_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb new file mode 100644 index 00000000..93c8b85a --- /dev/null +++ b/db/migrate/20250310235232_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb @@ -0,0 +1,8 @@ +# This migration comes from active_storage (originally 20211119233751) +class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + change_column_null(:active_storage_blobs, :checksum, true) + end +end From 0b5442e7100bbebb3bd1b7599090202c04e688bc Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:05:48 +0100 Subject: [PATCH 34/45] fixed lint add executed migration --- bin/setup | 4 ++-- config/application.rb | 2 +- config/environments/development.rb | 4 ++-- config/environments/production.rb | 6 +++--- config/initializers/filter_parameter_logging.rb | 4 ++-- db/schema.rb | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/setup b/bin/setup index b9941564..451efe2e 100755 --- a/bin/setup +++ b/bin/setup @@ -4,8 +4,8 @@ require 'fileutils' # path to your application root. APP_ROOT = File.expand_path('..', __dir__) -def system!(*args) - system(*args, exception: true) +def system!(*) + system(*, exception: true) end FileUtils.chdir APP_ROOT do diff --git a/config/application.rb b/config/application.rb index 10285e03..0818de0e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -25,7 +25,7 @@ class Application < Rails::Application # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. # Common ones are `templates`, `generators`, or `middleware`, for example. - config.autoload_lib(ignore: %w(assets tasks)) + config.autoload_lib(ignore: %w[assets tasks]) # Configuration for the application, engines, and railties goes here. # diff --git a/config/environments/development.rb b/config/environments/development.rb index afadc933..582614c3 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/integer/time" +require 'active_support/core_ext/integer/time' Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. @@ -19,7 +19,7 @@ # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. - if Rails.root.join('tmp/caching-dev.txt').exist? + if Rails.root.join('tmp', 'caching-dev.txt').exist? config.cache_store = :memory_store config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" diff --git a/config/environments/production.rb b/config/environments/production.rb index b2c14bbf..066883e6 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -41,8 +41,8 @@ # Log to STDOUT by default config.logger = ActiveSupport::Logger.new(STDOUT) - .tap { |logger| logger.formatter = ::Logger::Formatter.new } - .then { |logger| ActiveSupport::TaggedLogging.new(logger) } + .tap { |logger| logger.formatter = Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } config.log_level = :debug # Prepend all log lines with the following tags. @@ -51,7 +51,7 @@ # "info" includes generic and useful information about system operation, but avoids logging too much # information to avoid inadvertent exposure of personally identifiable information (PII). If you # want to log everything, set the level to "debug". - config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info') # Use a different cache store in production. # config.cache_store = :mem_cache_store diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index c2d89e28..262e8620 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -3,6 +3,6 @@ # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. # Use this to limit dissemination of sensitive information. # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. -Rails.application.config.filter_parameters += [ - :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +Rails.application.config.filter_parameters += %i[ + passw secret token _key crypt salt certificate otp ssn ] diff --git a/db/schema.rb b/db/schema.rb index 6eaca882..20015070 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2025_03_10_225801) do +ActiveRecord::Schema[7.1].define(version: 2025_03_10_235232) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" From 6d5dbfd8cbffd1335168b042c0a0ca2f005481fc Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:07:38 +0100 Subject: [PATCH 35/45] improve aplication.rb --- config/application.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config/application.rb b/config/application.rb index 0818de0e..d6d965ce 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,5 +1,4 @@ require_relative 'boot' - require 'rails' require 'active_model/railtie' require 'active_job/railtie' @@ -8,11 +7,7 @@ require 'action_controller/railtie' require 'action_mailer/railtie' require 'action_mailbox/engine' -# require "action_text/engine" # require "action_view/railtie" -# require "action_cable/engine" -# require "sprockets/railtie" -# require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. From 742c55e3ccc4212671bae0e012fbaee877238764 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:14:21 +0100 Subject: [PATCH 36/45] fixed lint and tests --- config/environments/development.rb | 2 +- config/environments/production.rb | 2 +- config/environments/test.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 582614c3..ac8c6c66 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -63,7 +63,7 @@ # config.action_view.annotate_rendered_view_with_filenames = true # Raise error when a before_action's only/except options reference missing actions - config.action_controller.raise_on_missing_callback_actions = true + config.action_controller.raise_on_missing_callback_actions = false # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. diff --git a/config/environments/production.rb b/config/environments/production.rb index 066883e6..f7eae182 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -40,7 +40,7 @@ config.force_ssl = true # Log to STDOUT by default - config.logger = ActiveSupport::Logger.new(STDOUT) + config.logger = ActiveSupport::Logger.new($stdout) .tap { |logger| logger.formatter = Logger::Formatter.new } .then { |logger| ActiveSupport::TaggedLogging.new(logger) } config.log_level = :debug diff --git a/config/environments/test.rb b/config/environments/test.rb index 9774234e..4d012f33 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -25,7 +25,7 @@ config.cache_store = :null_store # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false + config.action_dispatch.show_exceptions = :none # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false @@ -56,7 +56,7 @@ # config.action_view.annotate_rendered_view_with_filenames = true # Raise error when a before_action's only/except options reference missing actions - config.action_controller.raise_on_missing_callback_actions = true + config.action_controller.raise_on_missing_callback_actions = false # Configure url to test actionmailer urls config.action_mailer.default_url_options = { scheme: 'http', host: 'testhost', port: 1337 } From 2a3dcbf4a4d65e11ccc0027a8bee97584df7cd69 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:21:22 +0100 Subject: [PATCH 37/45] fixed deprecation --- spec/rails_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index e08aeb32..e1ab70b9 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -33,7 +33,7 @@ config.include ActionMailbox::TestHelper # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = Rails.root.join('spec', 'fixtures') + config.fixture_paths = Rails.root.join('spec', 'fixtures') # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false From 6c9179bbe9a2de32afbecc65b86bd9db3b56a163 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:24:01 +0100 Subject: [PATCH 38/45] first part new defaults --- config/application.rb | 2 ++ .../initializers/new_framework_defaults_7_1.rb | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/config/application.rb b/config/application.rb index d6d965ce..f396430b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,6 +17,8 @@ module Amber class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 + + config.add_autoload_paths_to_load_path = false # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. # Common ones are `templates`, `generators`, or `middleware`, for example. diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index 3dc295db..129c5869 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -23,19 +23,19 @@ # Remove the default X-Download-Options headers since it is used only by Internet Explorer. # If you need to support Internet Explorer, add back `"X-Download-Options" => "noopen"`. #++ -# Rails.application.config.action_dispatch.default_headers = { -# "X-Frame-Options" => "SAMEORIGIN", -# "X-XSS-Protection" => "0", -# "X-Content-Type-Options" => "nosniff", -# "X-Permitted-Cross-Domain-Policies" => "none", -# "Referrer-Policy" => "strict-origin-when-cross-origin" -# } +Rails.application.config.action_dispatch.default_headers = { + "X-Frame-Options" => "SAMEORIGIN", + "X-XSS-Protection" => "0", + "X-Content-Type-Options" => "nosniff", + "X-Permitted-Cross-Domain-Policies" => "none", + "Referrer-Policy" => "strict-origin-when-cross-origin" + } ### # Do not treat an `ActionController::Parameters` instance # as equal to an equivalent `Hash` by default. #++ -# Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false + Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false ### # Active Record Encryption now uses SHA-256 as its hash digest algorithm. @@ -65,7 +65,7 @@ # state which matches what was committed to the database, typically the last # instance to save. #++ -# Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false + Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false ### # Configures SQLite with a strict strings mode, which disables double-quoted string literals. From 620e8a9133921b5415ceca76a1de99cf297c4470 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:24:51 +0100 Subject: [PATCH 39/45] part 2 --- config/initializers/new_framework_defaults_7_1.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index 129c5869..fbfb3d95 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -76,12 +76,12 @@ # For example, it is possible to create an index for a non existing column. # See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details. #++ -# Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true + Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true ### # Disable deprecated singular associations names. #++ -# Rails.application.config.active_record.allow_deprecated_singular_associations_name = false + Rails.application.config.active_record.allow_deprecated_singular_associations_name = false ### # Enable the Active Job `BigDecimal` argument serializer, which guarantees @@ -93,7 +93,7 @@ # serializer. Therefore, this setting should only be enabled after all replicas # have been successfully upgraded to Rails 7.1. #++ -# Rails.application.config.active_job.use_big_decimal_serializer = true + Rails.application.config.active_job.use_big_decimal_serializer = true ### # Specify if an `ArgumentError` should be raised if `Rails.cache` `fetch` or @@ -101,14 +101,14 @@ # Options are `true`, and `false`. If `false`, the exception will be reported # as `handled` and logged instead. #++ -# Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true + Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true ### # Specify whether Query Logs will format tags using the SQLCommenter format # (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format. # Options are `:legacy` and `:sqlcommenter`. #++ -# Rails.application.config.active_record.query_log_tags_format = :sqlcommenter + Rails.application.config.active_record.query_log_tags_format = :sqlcommenter ### # Specify the default serializer used by `MessageEncryptor` and `MessageVerifier` From f19f9c0aa9b2c9cda96b4d8dcdda309166705d59 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:25:52 +0100 Subject: [PATCH 40/45] part 3 --- .../initializers/new_framework_defaults_7_1.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index fbfb3d95..1288eb8d 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -138,7 +138,7 @@ # servers, first deploy without changing the serializer, then set the serializer # in a subsequent deploy. #++ -# Rails.application.config.active_support.message_serializer = :json_allow_marshal + Rails.application.config.active_support.message_serializer = :json_allow_marshal ### # Enable a performance optimization that serializes message data and metadata @@ -151,7 +151,7 @@ # leave this optimization off on the first deploy, then enable it on a # subsequent deploy. #++ -# Rails.application.config.active_support.use_message_serializer_for_metadata = true + Rails.application.config.active_support.use_message_serializer_for_metadata = true ### # Set the maximum size for Rails log files. @@ -159,29 +159,29 @@ # `config.load_defaults 7.1` does not set this value for environments other than # development and test. #++ -# if Rails.env.local? -# Rails.application.config.log_file_size = 100 * 1024 * 1024 -# end + if Rails.env.local? + Rails.application.config.log_file_size = 100 * 1024 * 1024 + end ### # Enable raising on assignment to attr_readonly attributes. The previous # behavior would allow assignment but silently not persist changes to the # database. #++ -# Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true + Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true ### # Enable validating only parent-related columns for presence when the parent is mandatory. # The previous behavior was to validate the presence of the parent record, which performed an extra query # to get the parent every time the child record was updated, even when parent has not changed. #++ -# Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false + Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false ### # Enable precompilation of `config.filter_parameters`. Precompilation can # improve filtering performance, depending on the quantity and types of filters. #++ -# Rails.application.config.precompile_filter_parameters = true + Rails.application.config.precompile_filter_parameters = true ### # Enable before_committed! callbacks on all enrolled records in a transaction. From d91f5b74881ab65a9b0a331dd89fe9220e22bc41 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:33:14 +0100 Subject: [PATCH 41/45] final part --- app/helpers/camo_helper.rb | 2 +- .../new_framework_defaults_7_1.rb | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/helpers/camo_helper.rb b/app/helpers/camo_helper.rb index 508a913a..23b0d9e7 100644 --- a/app/helpers/camo_helper.rb +++ b/app/helpers/camo_helper.rb @@ -1,7 +1,7 @@ module CamoHelper # See https://github.com/ankane/camo/blob/master/lib/camo.rb def camo(image_url) - hexdigest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), + hexdigest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), Rails.application.config.x.camo_key, image_url) encoded_image_url = image_url.unpack1('H*') "#{Rails.application.config.x.camo_host}/#{hexdigest}/#{encoded_image_url}" diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index 1288eb8d..39ff845e 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -56,7 +56,7 @@ # 3. If you don't currently have data encrypted with Active Record encryption, you can disable this setting to # configure the default behavior starting 7.1+: #++ -# Rails.application.config.active_record.encryption.support_sha1_for_non_deterministic_encryption = false +Rails.application.config.active_record.encryption.support_sha1_for_non_deterministic_encryption = false ### # No longer run after_commit callbacks on the first of multiple Active Record @@ -188,7 +188,7 @@ # The previous behavior was to only run the callbacks on the first copy of a record # if there were multiple copies of the same record enrolled in the transaction. #++ -# Rails.application.config.active_record.before_committed_on_all_records = true +Rails.application.config.active_record.before_committed_on_all_records = true ### # Disable automatic column serialization into YAML. @@ -196,7 +196,7 @@ # recommended to explicitly define the serialization method for each column # rather than to rely on a global default. #++ -# Rails.application.config.active_record.default_column_serializer = nil +Rails.application.config.active_record.default_column_serializer = nil ### # Enable a performance optimization that serializes Active Record models @@ -214,17 +214,17 @@ # This matches the behaviour of all other callbacks. # In previous versions of Rails, they ran in the inverse order. #++ -# Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true +Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true ### # Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`. #++ -# Rails.application.config.active_record.commit_transaction_on_non_local_return = true +Rails.application.config.active_record.commit_transaction_on_non_local_return = true ### # Controls when to generate a value for has_secure_token declarations. #++ -# Rails.application.config.active_record.generate_secure_token_on = :initialize +Rails.application.config.active_record.generate_secure_token_on = :initialize ### # ** Please read carefully, this must be configured in config/application.rb ** @@ -239,7 +239,7 @@ # and you have no plans to rollback. # When you're ready to change format, add this to `config/application.rb` (NOT # this file): -# config.active_support.cache_format_version = 7.1 +# config.active_support.cache_format_version = 7.1 ### # Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your @@ -250,7 +250,7 @@ # # In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor. #++ -# Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor + Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor ### # Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your @@ -261,13 +261,13 @@ # # In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor. #++ -# Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor + Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor ### # Configure the log level used by the DebugExceptions middleware when logging # uncaught exceptions during requests. #++ -# Rails.application.config.action_dispatch.debug_exception_log_level = :error + Rails.application.config.action_dispatch.debug_exception_log_level = :error ### # Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5 @@ -277,4 +277,4 @@ # # In previous versions of Rails, these test helpers always used an HTML4 parser. #++ -# Rails.application.config.dom_testing_default_html_version = :html5 + Rails.application.config.dom_testing_default_html_version = :html5 From 70e38e616c9b2badc883f938e50017a99a5ce207 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:40:27 +0100 Subject: [PATCH 42/45] fixed lint --- config/application.rb | 2 +- .../new_framework_defaults_7_1.rb | 48 +++++++++---------- spec/rails_helper.rb | 2 +- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/config/application.rb b/config/application.rb index f396430b..af909dbd 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,7 +17,7 @@ module Amber class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 - + config.add_autoload_paths_to_load_path = false # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index 39ff845e..40faa0da 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -24,18 +24,18 @@ # If you need to support Internet Explorer, add back `"X-Download-Options" => "noopen"`. #++ Rails.application.config.action_dispatch.default_headers = { - "X-Frame-Options" => "SAMEORIGIN", - "X-XSS-Protection" => "0", - "X-Content-Type-Options" => "nosniff", - "X-Permitted-Cross-Domain-Policies" => "none", - "Referrer-Policy" => "strict-origin-when-cross-origin" - } + 'X-Frame-Options' => 'SAMEORIGIN', + 'X-XSS-Protection' => '0', + 'X-Content-Type-Options' => 'nosniff', + 'X-Permitted-Cross-Domain-Policies' => 'none', + 'Referrer-Policy' => 'strict-origin-when-cross-origin' +} ### # Do not treat an `ActionController::Parameters` instance # as equal to an equivalent `Hash` by default. #++ - Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false +Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false ### # Active Record Encryption now uses SHA-256 as its hash digest algorithm. @@ -65,7 +65,7 @@ # state which matches what was committed to the database, typically the last # instance to save. #++ - Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false +Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false ### # Configures SQLite with a strict strings mode, which disables double-quoted string literals. @@ -76,12 +76,12 @@ # For example, it is possible to create an index for a non existing column. # See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details. #++ - Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true +Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true ### # Disable deprecated singular associations names. #++ - Rails.application.config.active_record.allow_deprecated_singular_associations_name = false +Rails.application.config.active_record.allow_deprecated_singular_associations_name = false ### # Enable the Active Job `BigDecimal` argument serializer, which guarantees @@ -93,7 +93,7 @@ # serializer. Therefore, this setting should only be enabled after all replicas # have been successfully upgraded to Rails 7.1. #++ - Rails.application.config.active_job.use_big_decimal_serializer = true +Rails.application.config.active_job.use_big_decimal_serializer = true ### # Specify if an `ArgumentError` should be raised if `Rails.cache` `fetch` or @@ -101,14 +101,14 @@ # Options are `true`, and `false`. If `false`, the exception will be reported # as `handled` and logged instead. #++ - Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true +Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true ### # Specify whether Query Logs will format tags using the SQLCommenter format # (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format. # Options are `:legacy` and `:sqlcommenter`. #++ - Rails.application.config.active_record.query_log_tags_format = :sqlcommenter +Rails.application.config.active_record.query_log_tags_format = :sqlcommenter ### # Specify the default serializer used by `MessageEncryptor` and `MessageVerifier` @@ -138,7 +138,7 @@ # servers, first deploy without changing the serializer, then set the serializer # in a subsequent deploy. #++ - Rails.application.config.active_support.message_serializer = :json_allow_marshal +Rails.application.config.active_support.message_serializer = :json_allow_marshal ### # Enable a performance optimization that serializes message data and metadata @@ -151,7 +151,7 @@ # leave this optimization off on the first deploy, then enable it on a # subsequent deploy. #++ - Rails.application.config.active_support.use_message_serializer_for_metadata = true +Rails.application.config.active_support.use_message_serializer_for_metadata = true ### # Set the maximum size for Rails log files. @@ -159,29 +159,27 @@ # `config.load_defaults 7.1` does not set this value for environments other than # development and test. #++ - if Rails.env.local? - Rails.application.config.log_file_size = 100 * 1024 * 1024 - end +Rails.application.config.log_file_size = 100 * 1024 * 1024 if Rails.env.local? ### # Enable raising on assignment to attr_readonly attributes. The previous # behavior would allow assignment but silently not persist changes to the # database. #++ - Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true +Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true ### # Enable validating only parent-related columns for presence when the parent is mandatory. # The previous behavior was to validate the presence of the parent record, which performed an extra query # to get the parent every time the child record was updated, even when parent has not changed. #++ - Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false +Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false ### # Enable precompilation of `config.filter_parameters`. Precompilation can # improve filtering performance, depending on the quantity and types of filters. #++ - Rails.application.config.precompile_filter_parameters = true +Rails.application.config.precompile_filter_parameters = true ### # Enable before_committed! callbacks on all enrolled records in a transaction. @@ -250,7 +248,7 @@ # # In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor. #++ - Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor +Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor ### # Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your @@ -261,13 +259,13 @@ # # In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor. #++ - Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor +Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor ### # Configure the log level used by the DebugExceptions middleware when logging # uncaught exceptions during requests. #++ - Rails.application.config.action_dispatch.debug_exception_log_level = :error +Rails.application.config.action_dispatch.debug_exception_log_level = :error ### # Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5 @@ -277,4 +275,4 @@ # # In previous versions of Rails, these test helpers always used an HTML4 parser. #++ - Rails.application.config.dom_testing_default_html_version = :html5 +Rails.application.config.dom_testing_default_html_version = :html5 diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index e1ab70b9..22fb5929 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -33,7 +33,7 @@ config.include ActionMailbox::TestHelper # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_paths = Rails.root.join('spec', 'fixtures') + config.fixture_paths = Rails.root.join('spec', 'fixtures') # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false From 5607513300e992ea98601d9843f6bcb8a1c2ea8f Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 01:54:43 +0100 Subject: [PATCH 43/45] remove un needed configs --- .../new_framework_defaults_7_1.rb | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/config/initializers/new_framework_defaults_7_1.rb b/config/initializers/new_framework_defaults_7_1.rb index 40faa0da..c0158740 100644 --- a/config/initializers/new_framework_defaults_7_1.rb +++ b/config/initializers/new_framework_defaults_7_1.rb @@ -239,28 +239,6 @@ # this file): # config.active_support.cache_format_version = 7.1 -### -# Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your -# platform. -# -# `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action View to use HTML5-compliant -# sanitizers if they are supported, else fall back to HTML4 sanitizers. -# -# In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor. -#++ -Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor - -### -# Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your -# platform. -# -# `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action Text to use HTML5-compliant -# sanitizers if they are supported, else fall back to HTML4 sanitizers. -# -# In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor. -#++ -Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor - ### # Configure the log level used by the DebugExceptions middleware when logging # uncaught exceptions during requests. From 003f12db748d8e70d9eb5e374fb1e2887f042b40 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 02:16:41 +0100 Subject: [PATCH 44/45] moved camo helper tests to sha256 --- spec/helpers/camo_helper_spec.rb | 2 +- spec/helpers/markdown_helper_spec.rb | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/spec/helpers/camo_helper_spec.rb b/spec/helpers/camo_helper_spec.rb index 420832a7..c66a9d39 100644 --- a/spec/helpers/camo_helper_spec.rb +++ b/spec/helpers/camo_helper_spec.rb @@ -5,7 +5,7 @@ describe '#camo' do it do expect(camo('http://example.org/image.jpg')).to eq( - 'https://example.org/c7125941763fc18c9d8977ed19028ca5f9378070/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067' + 'https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067' ) end end diff --git a/spec/helpers/markdown_helper_spec.rb b/spec/helpers/markdown_helper_spec.rb index 96a71bb5..0e2fe692 100644 --- a/spec/helpers/markdown_helper_spec.rb +++ b/spec/helpers/markdown_helper_spec.rb @@ -7,62 +7,62 @@ it do expect(camofy("plain text \n ![alt text](http://example.org/image.jpg)")).to eq( - "plain text \n ![alt text](https://example.org/c7125941763fc18c9d8977ed19028ca5f9378070/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067)" + "plain text \n ![alt text](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067)" ) end it do expect(camofy('plain text ![](http://example.org/image.jpg)')).to eq( - 'plain text ![](https://example.org/c7125941763fc18c9d8977ed19028ca5f9378070/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067)' + "plain text ![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067)" ) end # rubocop:disable Layout/LineLength it do expect(camofy('![](http://example.org/image.jpg "Image title")')).to eq( - '![](https://example.org/c7125941763fc18c9d8977ed19028ca5f9378070/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067 "Image title")' + '![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067 \"Image title\")' ) end it do expect(camofy('![](http://example.org/image.jpg =100x* "Image title")')).to eq( - '![](https://example.org/c7125941763fc18c9d8977ed19028ca5f9378070/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067 =100x* "Image title")' + '![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067 =100x* \"Image title\")' ) end it do expect(camofy('')).to eq( - '' + '' ) end it do expect(camofy("")).to eq( - "" + "" ) end it do expect(camofy('')).to eq( - '' + '' ) end it do expect(camofy('')).to eq( - '' + '' ) end it do expect(camofy('')).to eq( - '' + '' ) end it do expect(camofy('')).to eq( - '' + '\"\"' ) end From af11e5be2a9aadac6ff196c5558f44eaec33c306 Mon Sep 17 00:00:00 2001 From: Lodewiges Date: Tue, 11 Mar 2025 02:30:08 +0100 Subject: [PATCH 45/45] should fix most tests --- spec/helpers/markdown_helper_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/helpers/markdown_helper_spec.rb b/spec/helpers/markdown_helper_spec.rb index 0e2fe692..2408c7c3 100644 --- a/spec/helpers/markdown_helper_spec.rb +++ b/spec/helpers/markdown_helper_spec.rb @@ -13,26 +13,26 @@ it do expect(camofy('plain text ![](http://example.org/image.jpg)')).to eq( - "plain text ![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067)" + 'plain text ![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067)' ) end # rubocop:disable Layout/LineLength it do expect(camofy('![](http://example.org/image.jpg "Image title")')).to eq( - '![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067 \"Image title\")' + '![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067 "Image title")' ) end it do expect(camofy('![](http://example.org/image.jpg =100x* "Image title")')).to eq( - '![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067 =100x* \"Image title\")' + '![](https://example.org/d87bfef52ecbfda9b5319a1d7818fd53c4d119f2b0205cb7f8538860ac357cb0/687474703a2f2f6578616d706c652e6f72672f696d6167652e6a7067 =100x* "Image title")' ) end it do expect(camofy('')).to eq( - '' + '' ) end @@ -44,25 +44,25 @@ it do expect(camofy('')).to eq( - '' + '' ) end it do expect(camofy('')).to eq( - '' + '' ) end it do expect(camofy('')).to eq( - '' + '' ) end it do expect(camofy('')).to eq( - '\"\"' + '' ) end