From 7b58ccacf1552e01250b661fe915a86fc061ef95 Mon Sep 17 00:00:00 2001 From: Lawrence Pit Date: Thu, 22 May 2008 08:17:34 +1000 Subject: [PATCH] output rails version when server starts --- railties/lib/commands/servers/lighttpd.rb | 2 +- railties/lib/commands/servers/mongrel.rb | 2 +- railties/lib/commands/servers/webrick.rb | 2 +- railties/lib/rails/mongrel_server/commands.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/railties/lib/commands/servers/lighttpd.rb b/railties/lib/commands/servers/lighttpd.rb index 07d4f9d..1c3c15b 100644 --- a/railties/lib/commands/servers/lighttpd.rb +++ b/railties/lib/commands/servers/lighttpd.rb @@ -62,7 +62,7 @@ config = IO.read(config_file) default_port, default_ip = 3000, '0.0.0.0' port = config.scan(/^\s*server.port\s*=\s*(\d+)/).first rescue default_port ip = config.scan(/^\s*server.bind\s*=\s*"([^"]+)"/).first rescue default_ip -puts "=> Rails application starting on http://#{ip || default_ip}:#{port || default_port}" +puts "=> Rails #{Rails::VERSION::STRING} application starting on http://#{ip || default_ip}:#{port || default_port}" tail_thread = nil diff --git a/railties/lib/commands/servers/mongrel.rb b/railties/lib/commands/servers/mongrel.rb index f59265e..2e5ff79 100644 --- a/railties/lib/commands/servers/mongrel.rb +++ b/railties/lib/commands/servers/mongrel.rb @@ -32,7 +32,7 @@ ARGV.clone.options do |opts| opts.parse! end -puts "=> Rails application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}" +puts "=> Rails #{Rails::VERSION::STRING} application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}" parameters = [ "start", diff --git a/railties/lib/commands/servers/webrick.rb b/railties/lib/commands/servers/webrick.rb index b950376..e4faf5f 100644 --- a/railties/lib/commands/servers/webrick.rb +++ b/railties/lib/commands/servers/webrick.rb @@ -61,6 +61,6 @@ require 'webrick_server' OPTIONS['working_directory'] = File.expand_path(RAILS_ROOT) -puts "=> Rails application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}" +puts "=> Rails #{Rails::VERSION::STRING} application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}" puts "=> Ctrl-C to shutdown server; call with --help for options" if OPTIONS[:server_type] == WEBrick::SimpleServer DispatchServlet.dispatch(OPTIONS) diff --git a/railties/lib/rails/mongrel_server/commands.rb b/railties/lib/rails/mongrel_server/commands.rb index 3786a56..f136c7b 100644 --- a/railties/lib/rails/mongrel_server/commands.rb +++ b/railties/lib/rails/mongrel_server/commands.rb @@ -119,7 +119,7 @@ module Rails config = RailsConfigurator.new(settings) do defaults[:log] = $stdout if defaults[:environment] == 'development' - Mongrel.log("=> Rails application starting on http://#{defaults[:host]}:#{defaults[:port]}") + Mongrel.log("=> Rails #{Rails::VERSION::STRING} application starting on http://#{defaults[:host]}:#{defaults[:port]}") unless defaults[:daemon] Mongrel.log("=> Call with -d to detach") -- 1.5.5.1