aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-16 21:44:44 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2019-01-17 16:08:35 -0500
commitfa791fb8e2a718b5d0430c7ca5a454678dfc192d (patch)
treeaf2c95e705103bcff663edd282e485a77ea8bd08 /railties/lib
parent553b86fc751c751db504bcbe2d033eb2bb5b6a0b (diff)
downloadrails-fa791fb8e2a718b5d0430c7ca5a454678dfc192d.tar.gz
rails-fa791fb8e2a718b5d0430c7ca5a454678dfc192d.tar.bz2
rails-fa791fb8e2a718b5d0430c7ca5a454678dfc192d.zip
Remove deprecated `server` argument from the rails server command
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/commands/server/server_command.rb23
1 files changed, 2 insertions, 21 deletions
diff --git a/railties/lib/rails/commands/server/server_command.rb b/railties/lib/rails/commands/server/server_command.rb
index 47c3f05bb3..20694e7e39 100644
--- a/railties/lib/rails/commands/server/server_command.rb
+++ b/railties/lib/rails/commands/server/server_command.rb
@@ -98,8 +98,6 @@ module Rails
DEFAULT_PORT = 3000
DEFAULT_PID_PATH = "tmp/pids/server.pid"
- argument :using, optional: true
-
class_option :port, aliases: "-p", type: :numeric,
desc: "Runs Rails on the specified port - defaults to 3000.", banner: :port
class_option :binding, aliases: "-b", type: :string,
@@ -126,7 +124,6 @@ module Rails
super
@original_options = local_options - %w( --restart )
- deprecate_positional_rack_server_and_rewrite_to_option(@original_options)
end
def perform
@@ -144,7 +141,7 @@ module Rails
after_stop_callback = -> { say "Exiting" unless options[:daemon] }
server.start(after_stop_callback)
else
- say rack_server_suggestion(using)
+ say rack_server_suggestion(options[:using])
end
end
end
@@ -153,7 +150,7 @@ module Rails
def server_options
{
user_supplied_options: user_supplied_options,
- server: using,
+ server: options[:using],
log_stdout: log_to_stdout?,
Port: port,
Host: host,
@@ -262,22 +259,6 @@ module Rails
FileUtils.rm_f(options[:pid]) if options[:restart]
end
- def deprecate_positional_rack_server_and_rewrite_to_option(original_options)
- if using
- ActiveSupport::Deprecation.warn(<<~MSG)
- 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.
- MSG
-
- original_options.concat [ "-u", using ]
- else
- # Use positional internally to get around Thor's immutable options.
- # TODO: Replace `using` occurrences with `options[:using]` after deprecation removal.
- @using = options[:using]
- end
- end
-
def rack_server_suggestion(server)
if server.in?(RACK_SERVERS)
<<~MSG