mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #35568 from prathamesh-sonpatki/server_squish
Squish the deprecation messages across the codebase
This commit is contained in:
commit
c41269ebc8
6 changed files with 8 additions and 8 deletions
|
@ -242,7 +242,7 @@ module ActionView #:nodoc:
|
||||||
@_config = ActiveSupport::InheritableOptions.new
|
@_config = ActiveSupport::InheritableOptions.new
|
||||||
|
|
||||||
unless formats == NULL
|
unless formats == NULL
|
||||||
ActiveSupport::Deprecation.warn <<~eowarn
|
ActiveSupport::Deprecation.warn <<~eowarn.squish
|
||||||
Passing formats to ActionView::Base.new is deprecated
|
Passing formats to ActionView::Base.new is deprecated
|
||||||
eowarn
|
eowarn
|
||||||
end
|
end
|
||||||
|
@ -251,7 +251,7 @@ module ActionView #:nodoc:
|
||||||
when ActionView::LookupContext
|
when ActionView::LookupContext
|
||||||
@lookup_context = lookup_context
|
@lookup_context = lookup_context
|
||||||
else
|
else
|
||||||
ActiveSupport::Deprecation.warn <<~eowarn
|
ActiveSupport::Deprecation.warn <<~eowarn.squish
|
||||||
ActionView::Base instances should be constructed with a lookup context,
|
ActionView::Base instances should be constructed with a lookup context,
|
||||||
assignments, and a controller.
|
assignments, and a controller.
|
||||||
eowarn
|
eowarn
|
||||||
|
@ -278,7 +278,7 @@ module ActionView #:nodoc:
|
||||||
|
|
||||||
def compiled_method_container
|
def compiled_method_container
|
||||||
if self.class == ActionView::Base
|
if self.class == ActionView::Base
|
||||||
ActiveSupport::Deprecation.warn <<~eowarn
|
ActiveSupport::Deprecation.warn <<~eowarn.squish
|
||||||
ActionView::Base instances must implement `compiled_method_container`
|
ActionView::Base instances must implement `compiled_method_container`
|
||||||
or use the class method `with_empty_template_cache` for constructing
|
or use the class method `with_empty_template_cache` for constructing
|
||||||
an ActionView::Base instances that has an empty cache.
|
an ActionView::Base instances that has an empty cache.
|
||||||
|
|
|
@ -154,7 +154,7 @@ module ActionView
|
||||||
view_paths = build_view_paths((@view_paths.paths + self.class.fallbacks).uniq)
|
view_paths = build_view_paths((@view_paths.paths + self.class.fallbacks).uniq)
|
||||||
|
|
||||||
if block_given?
|
if block_given?
|
||||||
ActiveSupport::Deprecation.warn <<~eowarn
|
ActiveSupport::Deprecation.warn <<~eowarn.squish
|
||||||
Calling `with_fallbacks` with a block is deprecated. Call methods on
|
Calling `with_fallbacks` with a block is deprecated. Call methods on
|
||||||
the lookup context returned by `with_fallbacks` instead.
|
the lookup context returned by `with_fallbacks` instead.
|
||||||
eowarn
|
eowarn
|
||||||
|
|
|
@ -1051,7 +1051,7 @@ module ActiveRecord
|
||||||
|
|
||||||
def assume_migrated_upto_version(version, migrations_paths = nil)
|
def assume_migrated_upto_version(version, migrations_paths = nil)
|
||||||
unless migrations_paths.nil?
|
unless migrations_paths.nil?
|
||||||
ActiveSupport::Deprecation.warn(<<~MSG)
|
ActiveSupport::Deprecation.warn(<<~MSG.squish)
|
||||||
Passing migrations_paths to #assume_migrated_upto_version is deprecated and will be removed in Rails 6.1.
|
Passing migrations_paths to #assume_migrated_upto_version is deprecated and will be removed in Rails 6.1.
|
||||||
MSG
|
MSG
|
||||||
end
|
end
|
||||||
|
|
|
@ -64,7 +64,7 @@ class ActiveStorage::Variation
|
||||||
begin
|
begin
|
||||||
require "image_processing"
|
require "image_processing"
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
ActiveSupport::Deprecation.warn <<~WARNING
|
ActiveSupport::Deprecation.warn <<~WARNING.squish
|
||||||
Generating image variants will require the image_processing gem in Rails 6.1.
|
Generating image variants will require the image_processing gem in Rails 6.1.
|
||||||
Please add `gem 'image_processing', '~> 1.2'` to your Gemfile.
|
Please add `gem 'image_processing', '~> 1.2'` to your Gemfile.
|
||||||
WARNING
|
WARNING
|
||||||
|
|
|
@ -22,7 +22,7 @@ module ActiveStorage
|
||||||
def operations
|
def operations
|
||||||
transformations.each_with_object([]) do |(name, argument), list|
|
transformations.each_with_object([]) do |(name, argument), list|
|
||||||
if name.to_s == "combine_options"
|
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,
|
Active Storage's ImageProcessing transformer doesn't support :combine_options,
|
||||||
as it always generates a single ImageMagick command. Passing :combine_options will
|
as it always generates a single ImageMagick command. Passing :combine_options will
|
||||||
not be supported in Rails 6.1.
|
not be supported in Rails 6.1.
|
||||||
|
|
|
@ -264,7 +264,7 @@ module Rails
|
||||||
|
|
||||||
def deprecate_positional_rack_server_and_rewrite_to_option(original_options)
|
def deprecate_positional_rack_server_and_rewrite_to_option(original_options)
|
||||||
if using
|
if using
|
||||||
ActiveSupport::Deprecation.warn(<<~MSG)
|
ActiveSupport::Deprecation.warn(<<~MSG.squish)
|
||||||
Passing the Rack server name as a regular argument is deprecated
|
Passing the Rack server name as a regular argument is deprecated
|
||||||
and will be removed in the next Rails version. Please, use the -u
|
and will be removed in the next Rails version. Please, use the -u
|
||||||
option instead.
|
option instead.
|
||||||
|
|
Loading…
Reference in a new issue