提交 29648ff6 编写于 作者: Y yuuji.yaginuma

Do not show URL in boot info when using Puma

Puma has its own configuration file(e.g. `config/puma.rb`).
Can define a port and a URL to bind in the configuration file. Therefore,
on Rails side, can not grasp which URI to bind finally.

Because of that, it may show a URL different from the actually bound
URL, so I think that it is better not to show it.

Fixes #29880
上级 68191d0f
......@@ -64,9 +64,9 @@ def setup_dev_caching
end
def print_boot_information
url = "#{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}"
url = "on #{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}" unless use_puma?
puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
puts "=> Rails #{Rails.version} application starting in #{Rails.env} on #{url}"
puts "=> Rails #{Rails.version} application starting in #{Rails.env} #{url}"
puts "=> Run `rails server -h` for more startup options"
end
......@@ -91,6 +91,10 @@ def log_to_stdout
def restart_command
"bin/rails server #{ARGV.join(' ')}"
end
def use_puma?
server.to_s == "Rack::Handler::Puma"
end
end
module Command
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册