1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Move interrupt information to print_boot_information method

This commit is contained in:
Alex Johnson 2013-11-07 03:45:17 +05:30
parent 919fafa54b
commit 1410d46b30

View file

@ -62,7 +62,7 @@ module Rails
def start def start
print_boot_information print_boot_information
trap_interrupt_and_print_interrupt_information trap(:INT) { exit }
create_tmp_directories create_tmp_directories
log_to_stdout if options[:log_stdout] log_to_stdout if options[:log_stdout]
@ -116,10 +116,7 @@ module Rails
if options[:Host].to_s.match(/0\.0\.0\.0/) if options[:Host].to_s.match(/0\.0\.0\.0/)
puts "=> Notice: server is listening on all interfaces (#{ options[:Host] }). Consider using 127.0.0.1 (--binding option)" puts "=> Notice: server is listening on all interfaces (#{ options[:Host] }). Consider using 127.0.0.1 (--binding option)"
end end
end
def trap_interrupt_and_print_interrupt_information
trap(:INT) { exit }
puts "=> Ctrl-C to shutdown server" unless options[:daemonize] puts "=> Ctrl-C to shutdown server" unless options[:daemonize]
end end