From bac06acbebdb220f58af104058af8a717caaf9ff Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Mon, 10 Jun 2019 10:59:45 -0400 Subject: [PATCH 1/2] Copy current edge rails defaults for test/dev There is no technical difference but clean up the settings. --- config/environments/development.rb | 2 +- config/environments/test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 744243b7f83..be20700a60c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -19,7 +19,7 @@ # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false - # Print deprecation notices to the Rails logger + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Only use best-standards-support built into browsers diff --git a/config/environments/test.rb b/config/environments/test.rb index 441d043fb30..809524bafa5 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -10,8 +10,8 @@ config.cache_classes = true config.eager_load = false - # Print deprecation notices to the stderr - #ActiveSupport::Deprecation.behavior = :stderr + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr # Configure static asset server for tests with Cache-Control for performance config.public_file_server.enabled = true From 201ebfed33575ea257f0ab4191db1d5bf1841032 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Mon, 10 Jun 2019 11:42:53 -0400 Subject: [PATCH 2/2] Log deprecations in production mode Change from rails :notify default since it's unlikely we'll have users setup notifications for depecation warnings. --- config/environments/production.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 65646791ac5..764948a58c4 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -60,8 +60,12 @@ # the I18n.default_locale when a translation can not be found) config.i18n.fallbacks = [I18n.default_locale] - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify + # Send deprecation notices to registered listeners. + # config.active_support.deprecation = :notify + + # Change from rails :notify default since it's unlikely we'll have users setup + # notifications for deprecation warnings. + config.active_support.deprecation = :log # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL)