Skip to content

Commit c41269e

Browse files
authored
Merge pull request rails#35568 from prathamesh-sonpatki/server_squish
Squish the deprecation messages across the codebase
2 parents 2259b48 + 538a459 commit c41269e

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

actionview/lib/action_view/base.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def initialize(lookup_context = nil, assigns = {}, controller = nil, formats = N
242242
@_config = ActiveSupport::InheritableOptions.new
243243

244244
unless formats == NULL
245-
ActiveSupport::Deprecation.warn <<~eowarn
245+
ActiveSupport::Deprecation.warn <<~eowarn.squish
246246
Passing formats to ActionView::Base.new is deprecated
247247
eowarn
248248
end
@@ -251,7 +251,7 @@ def initialize(lookup_context = nil, assigns = {}, controller = nil, formats = N
251251
when ActionView::LookupContext
252252
@lookup_context = lookup_context
253253
else
254-
ActiveSupport::Deprecation.warn <<~eowarn
254+
ActiveSupport::Deprecation.warn <<~eowarn.squish
255255
ActionView::Base instances should be constructed with a lookup context,
256256
assignments, and a controller.
257257
eowarn
@@ -278,7 +278,7 @@ def run(method, template, locals, buffer, &block)
278278

279279
def compiled_method_container
280280
if self.class == ActionView::Base
281-
ActiveSupport::Deprecation.warn <<~eowarn
281+
ActiveSupport::Deprecation.warn <<~eowarn.squish
282282
ActionView::Base instances must implement `compiled_method_container`
283283
or use the class method `with_empty_template_cache` for constructing
284284
an ActionView::Base instances that has an empty cache.

actionview/lib/action_view/lookup_context.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def with_fallbacks
154154
view_paths = build_view_paths((@view_paths.paths + self.class.fallbacks).uniq)
155155

156156
if block_given?
157-
ActiveSupport::Deprecation.warn <<~eowarn
157+
ActiveSupport::Deprecation.warn <<~eowarn.squish
158158
Calling `with_fallbacks` with a block is deprecated. Call methods on
159159
the lookup context returned by `with_fallbacks` instead.
160160
eowarn

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ def internal_string_options_for_primary_key # :nodoc:
10511051

10521052
def assume_migrated_upto_version(version, migrations_paths = nil)
10531053
unless migrations_paths.nil?
1054-
ActiveSupport::Deprecation.warn(<<~MSG)
1054+
ActiveSupport::Deprecation.warn(<<~MSG.squish)
10551055
Passing migrations_paths to #assume_migrated_upto_version is deprecated and will be removed in Rails 6.1.
10561056
MSG
10571057
end

activestorage/app/models/active_storage/variation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def transformer
6464
begin
6565
require "image_processing"
6666
rescue LoadError
67-
ActiveSupport::Deprecation.warn <<~WARNING
67+
ActiveSupport::Deprecation.warn <<~WARNING.squish
6868
Generating image variants will require the image_processing gem in Rails 6.1.
6969
Please add `gem 'image_processing', '~> 1.2'` to your Gemfile.
7070
WARNING

activestorage/lib/active_storage/transformers/image_processing_transformer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def processor
2222
def operations
2323
transformations.each_with_object([]) do |(name, argument), list|
2424
if name.to_s == "combine_options"
25-
ActiveSupport::Deprecation.warn <<~WARNING
25+
ActiveSupport::Deprecation.warn <<~WARNING.squish
2626
Active Storage's ImageProcessing transformer doesn't support :combine_options,
2727
as it always generates a single ImageMagick command. Passing :combine_options will
2828
not be supported in Rails 6.1.

railties/lib/rails/commands/server/server_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def prepare_restart
264264

265265
def deprecate_positional_rack_server_and_rewrite_to_option(original_options)
266266
if using
267-
ActiveSupport::Deprecation.warn(<<~MSG)
267+
ActiveSupport::Deprecation.warn(<<~MSG.squish)
268268
Passing the Rack server name as a regular argument is deprecated
269269
and will be removed in the next Rails version. Please, use the -u
270270
option instead.

0 commit comments

Comments
 (0)