diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-07-24 13:54:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 13:54:42 -0400 |
commit | ad3aaadce0f8fb977aa2bd1c551160e83d7dac03 (patch) | |
tree | 0f14786ab0c917c46fa0e344b27bcd3be742b9b6 | |
parent | 5c418af93770ee33a9e20d0050bd40f26131a410 (diff) | |
parent | 29648ff60e66c674b3cc49151df15dc100ffb4f4 (diff) | |
download | rails-ad3aaadce0f8fb977aa2bd1c551160e83d7dac03.tar.gz rails-ad3aaadce0f8fb977aa2bd1c551160e83d7dac03.tar.bz2 rails-ad3aaadce0f8fb977aa2bd1c551160e83d7dac03.zip |
Merge pull request #29902 from y-yagi/fix_29880
Do not show URL in boot info when using Puma
-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 |