From 3f236c7a0e544db94ef822f120d649ac5ee958f7 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 25 Jun 2026 04:34:24 +0200 Subject: Upgrade to Rails 4.2.11.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump rails 3.2.22.5 → 4.2.11.3 - Replace globalize3 with globalize ~> 5.0 (gem renamed at 5.0) - Upgrade routing-filter ~> 0.3 → ~> 0.6 - Upgrade sass-rails, coffee-rails to 4.x - Upgrade awesome_nested_set 2.x → 3.x (Rails 4 required) - Add jquery-rails for UJS support - Pin nokogiri ~> 1.10.10, loofah ~> 2.20.0, rails-html-sanitizer ~> 1.4.4 - Add config/secrets.yml (gitignored), eager_load, serve_static_files - Fix routes: add via: to all match calls, remove legacy catch-all routes - Add admin named route, fix rvm dotfiles - Fix ActiveRecord::FixtureSet rename in test_helper - Set active_support.test_order and active_record.raise_in_transactional_callbacks --- config/application.rb | 2 +- config/environments/development.rb | 3 ++- config/environments/production.rb | 1 + config/environments/test.rb | 25 ++++++++----------------- config/routes.rb | 20 +++++++++----------- 5 files changed, 21 insertions(+), 30 deletions(-) (limited to 'config') diff --git a/config/application.rb b/config/application.rb index cb92166..1a7f32b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -56,6 +56,6 @@ module Cccms config.i18n.default_locale = :de config.filter_parameters += [:password, :password_confirmation] - config.serve_static_assets = true + config.serve_static_files = true end end diff --git a/config/environments/development.rb b/config/environments/development.rb index 94f216f..3813cab 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -17,5 +17,6 @@ Cccms::Application.configure do config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log - config.serve_static_assets = true + config.serve_static_files = true + config.eager_load = false end diff --git a/config/environments/production.rb b/config/environments/production.rb index 2f933de..6f2c5bd 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -13,6 +13,7 @@ Cccms::Application.configure do config.log_level = :info config.active_support.deprecation = :notify + config.eager_load = false # Use a different logger for distributed setups # config.logger = SyslogLogger.new diff --git a/config/environments/test.rb b/config/environments/test.rb index 728e147..3b2413e 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,32 +1,23 @@ -# Settings specified here will take precedence over those in config/environment.rb - Cccms::Application.configure do - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true + # config.whiny_nils = true # removed in Rails 4 - # Show full error reports and disable caching config.action_controller.consider_all_requests_local = true config.action_controller.perform_caching = false - # Disable request forgery protection in test environment config.action_controller.allow_forgery_protection = false - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql + config.active_support.deprecation = :log + config.active_support.test_order = :sorted + + config.active_record.raise_in_transactional_callbacks = true - config.active_support.deprecation = :raise + config.eager_load = false + config.serve_static_files = true + config.static_cache_control = "public, max-age=3600" end diff --git a/config/routes.rb b/config/routes.rb index 5e3eb3f..4a440c1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -31,10 +31,11 @@ Cccms::Application.routes.draw do end end - match '/logout' => 'sessions#destroy', :as => :logout - match '/login' => 'sessions#new', :as => :login - match 'admin/search' => 'admin#search', :as => :admin_search - match 'search' => 'search#index', :as => :search + match '/logout' => 'sessions#destroy', :as => :logout, :via => :delete + match '/login' => 'sessions#new', :as => :login, :via => :get + match 'admin' => 'admin#index', :as => :admin, :via => :get + match 'admin/search' => 'admin#search', :as => :admin_search, :via => :get + match 'search' => 'search#index', :as => :search, :via => :get resources :users @@ -46,12 +47,9 @@ Cccms::Application.routes.draw do resource :session - match 'rss/:action' => 'rss#index', :as => :rss - match 'rss/:action.:format' => 'rss#index' + match 'rss/:action' => 'rss#index', :as => :rss, :via => [:get, :post] + match 'rss/:action.:format' => 'rss#index', :via => [:get, :post] - match '/:controller(/:action(/:id))' - match '/:controller(/:action(/:id.:format))' - - match 'galleries/*page_path' => 'content#render_gallery' - match '/*page_path' => 'content#render_page', :as => :content + match 'galleries/*page_path' => 'content#render_gallery', :via => :get + match '/*page_path' => 'content#render_page', :as => :content, :via => :get end -- cgit v1.3