From 538a459a3b8b4192636c58b32f48a9e87089cb10 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Mon, 11 Mar 2019 18:39:14 +0530 Subject: Squish the deprecation messages across the codebase Sample example -> Before: prathamesh@Prathameshs-MacBook-Pro-2 blog *$ rails server thin DEPRECATION WARNING: Passing the Rack server name as a regular argument is deprecated and will be removed in the next Rails version. Please, use the -u option instead. After: prathamesh@Prathameshs-MacBook-Pro-2 squish_app *$ rails server thin DEPRECATION WARNING: Passing the Rack server name as a regular argument is deprecated and will be removed in the next Rails version. Please, use the -u option instead. --- activestorage/app/models/active_storage/variation.rb | 2 +- .../lib/active_storage/transformers/image_processing_transformer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'activestorage') diff --git a/activestorage/app/models/active_storage/variation.rb b/activestorage/app/models/active_storage/variation.rb index 67568772da..41b5a45f53 100644 --- a/activestorage/app/models/active_storage/variation.rb +++ b/activestorage/app/models/active_storage/variation.rb @@ -64,7 +64,7 @@ class ActiveStorage::Variation begin require "image_processing" rescue LoadError - ActiveSupport::Deprecation.warn <<~WARNING + ActiveSupport::Deprecation.warn <<~WARNING.squish Generating image variants will require the image_processing gem in Rails 6.1. Please add `gem 'image_processing', '~> 1.2'` to your Gemfile. WARNING diff --git a/activestorage/lib/active_storage/transformers/image_processing_transformer.rb b/activestorage/lib/active_storage/transformers/image_processing_transformer.rb index 7f8685b72d..506150576c 100644 --- a/activestorage/lib/active_storage/transformers/image_processing_transformer.rb +++ b/activestorage/lib/active_storage/transformers/image_processing_transformer.rb @@ -22,7 +22,7 @@ module ActiveStorage def operations transformations.each_with_object([]) do |(name, argument), list| if name.to_s == "combine_options" - ActiveSupport::Deprecation.warn <<~WARNING + ActiveSupport::Deprecation.warn <<~WARNING.squish Active Storage's ImageProcessing transformer doesn't support :combine_options, as it always generates a single ImageMagick command. Passing :combine_options will not be supported in Rails 6.1. -- cgit v1.2.3