diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-07-24 05:38:15 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-07-24 07:38:34 +0900 |
commit | 29648ff60e66c674b3cc49151df15dc100ffb4f4 (patch) | |
tree | c9b40bc82f9ff0c7f65966a5867078daa1fd8e70 | |
parent | 68191d0f6e8d763730a1ae3841570e11b2896272 (diff) | |
download | rails-29648ff60e66c674b3cc49151df15dc100ffb4f4.tar.gz rails-29648ff60e66c674b3cc49151df15dc100ffb4f4.tar.bz2 rails-29648ff60e66c674b3cc49151df15dc100ffb4f4.zip |
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
-rw-r--r-- | railties/lib/rails/commands/server/server_command.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/commands/server/server_command.rb b/railties/lib/rails/commands/server/server_command.rb index b607a63176..ce258341f6 100644 --- a/railties/lib/rails/commands/server/server_command.rb +++ b/railties/lib/rails/commands/server/server_command.rb @@ -64,9 +64,9 @@ module Rails 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 @@ module Rails def restart_command "bin/rails server #{ARGV.join(' ')}" end + + def use_puma? + server.to_s == "Rack::Handler::Puma" + end end module Command |