From c06723ee715512c2033c7786c48f15674585b56b Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 26 Jun 2026 01:59:57 +0200 Subject: Stage 4: Rails 5.2 -> 6.1 on Ruby 2.7.2 - routing-filter 0.6.3 -> 0.7.0 (Rails 6.1 compatibility) - RSS named routes rss_xml/rss_rdf added - RouteWithParams workarounds: will_paginate_patch, content_path shim, safe_path helper - Paperclip removed, replaced with FileAttachment concern (preserves URL scheme) - Assets resource moved to /admin/assets (Sprockets middleware conflict) - ApplicationRecord base class added, all models migrated - Strong parameters added to Assets, Occurrences, Events, MenuItems controllers - update_attributes -> update throughout - render :nothing -> head :ok/:not_found throughout - language_selector rewritten (removes :overwrite_params) - Environment files updated for Rails 6.1 (eager_load, public_file_server, ActionMailer) - Arel::Visitors::DepthFirst and Integer/Float duration patches removed from test_helper - AssetsController tests added (10 tests covering upload, variants, destroy, auth) - ImageMagick geometry: 460x250! for headline crop (not # which is invalid in IM6) 129 runs, 311 assertions, 5 failures (all pre-existing), 0 errors --- config/environments/development.rb | 7 +++++-- config/environments/production.rb | 14 +++++++------- config/environments/test.rb | 7 ++----- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'config/environments') diff --git a/config/environments/development.rb b/config/environments/development.rb index 3813cab8..8e2e7ef8 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -7,7 +7,6 @@ Cccms::Application.configure do config.cache_classes = false # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true # Show full error reports and disable caching config.action_controller.consider_all_requests_local = true @@ -17,6 +16,10 @@ Cccms::Application.configure do config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log - config.serve_static_files = true + config.public_file_server.enabled = true config.eager_load = false + + config.hosts.clear + + config.middleware.delete ExceptionNotification::Rack end diff --git a/config/environments/production.rb b/config/environments/production.rb index 6f2c5bdd..82b918a0 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -13,7 +13,7 @@ Cccms::Application.configure do config.log_level = :info config.active_support.deprecation = :notify - config.eager_load = false + config.eager_load = true # Use a different logger for distributed setups # config.logger = SyslogLogger.new @@ -30,11 +30,11 @@ Cccms::Application.configure do # Enable threaded mode # config.threadsafe! - ActionMailer::Base.delivery_method = :sendmail - ActionMailer::Base.sendmail_settings = { - :location => '/usr/sbin/sendmail', - :arguments => '-i -t' + config.action_mailer.delivery_method = :sendmail + config.action_mailer.sendmail_settings = { + location: '/usr/sbin/sendmail', + arguments: '-i -t' } - ActionMailer::Base.perform_deliveries = true - ActionMailer::Base.raise_delivery_errors = true + config.action_mailer.perform_deliveries = true + config.action_mailer.raise_delivery_errors = true end diff --git a/config/environments/test.rb b/config/environments/test.rb index 858bebb8..a23c6d46 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -2,9 +2,6 @@ Cccms::Application.configure do config.cache_classes = true - # Log error messages when you accidentally call methods on nil. - # config.whiny_nils = true # removed in Rails 4 - config.action_controller.consider_all_requests_local = true config.action_controller.perform_caching = false @@ -16,7 +13,7 @@ Cccms::Application.configure do config.active_support.test_order = :sorted config.eager_load = false - config.serve_static_files = true - config.static_cache_control = "public, max-age=3600" + config.public_file_server.enabled = true + config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } config.assets.compile = true end -- cgit v1.3