From b821f95403bb3853264dd689de5c974ec00c9c8f Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Mon, 1 Jan 2018 01:18:17 +0530 Subject: Improve the deprecation message for using subclass of Rails::Application to start the Rails server --- railties/CHANGELOG.md | 2 +- railties/lib/rails/commands/server/server_command.rb | 2 +- railties/test/application/server_test.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'railties') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 70c0f5c67b..0658c4b55c 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -57,7 +57,7 @@ *bogdanvlviv* -* Deprecate support of use `Rails::Application` subclass to start Rails server. +* Deprecate support for using a `Rails::Application` subclass to start Rails server. *Yuji Yaginuma* diff --git a/railties/lib/rails/commands/server/server_command.rb b/railties/lib/rails/commands/server/server_command.rb index 703ec59087..e546fe3e4b 100644 --- a/railties/lib/rails/commands/server/server_command.rb +++ b/railties/lib/rails/commands/server/server_command.rb @@ -27,7 +27,7 @@ module Rails app = super if app.is_a?(Class) ActiveSupport::Deprecation.warn(<<-MSG.squish) - Use `Rails::Application` subclass to start the server is deprecated and will be removed in Rails 6.0. + Using `Rails::Application` subclass to start the server is deprecated and will be removed in Rails 6.0. Please change `run #{app}` to `run Rails.application` in config.ru. MSG end diff --git a/railties/test/application/server_test.rb b/railties/test/application/server_test.rb index a6093b5733..f3a7e00a4d 100644 --- a/railties/test/application/server_test.rb +++ b/railties/test/application/server_test.rb @@ -29,7 +29,7 @@ module ApplicationTests server.app log = File.read(Rails.application.config.paths["log"].first) - assert_match(/DEPRECATION WARNING: Use `Rails::Application` subclass to start the server is deprecated/, log) + assert_match(/DEPRECATION WARNING: Using `Rails::Application` subclass to start the server is deprecated/, log) end test "restart rails server with custom pid file path" do -- cgit v1.2.3