public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Show rails version when the server starts. [#235 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
lawrencepit (author)
Thu May 22 04:06:27 -0700 2008
lifo (committer)
Thu May 22 04:06:27 -0700 2008
commit  c2036adf7658f56c924e2a206731ee63b628f34f
tree    420dd1e2e9fdc3878623a0737db901343f3a6697
parent  4e084c3d9860c31fca21395c13031f04bb510b15
...
62
63
64
65
 
66
67
68
...
62
63
64
 
65
66
67
68
0
@@ -62,7 +62,7 @@ config = IO.read(config_file)
0
 default_port, default_ip = 3000, '0.0.0.0'
0
 port = config.scan(/^\s*server.port\s*=\s*(\d+)/).first rescue default_port
0
 ip   = config.scan(/^\s*server.bind\s*=\s*"([^"]+)"/).first rescue default_ip
0
-puts "=> Rails application starting on http://#{ip || default_ip}:#{port || default_port}"
0
+puts "=> Rails #{Rails.version} application starting on http://#{ip || default_ip}:#{port || default_port}"
0
 
0
 tail_thread = nil
0
 
...
32
33
34
35
 
36
37
38
...
32
33
34
 
35
36
37
38
0
@@ -32,7 +32,7 @@ ARGV.clone.options do |opts|
0
   opts.parse!
0
 end
0
 
0
-puts "=> Rails application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
0
+puts "=> Rails #{Rails.version} application starting on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
0
 
0
 parameters = [
0
   "start",
...
61
62
63
64
 
65
66
...
61
62
63
 
64
65
66
0
@@ -61,6 +61,6 @@ require 'webrick_server'
0
 
0
 OPTIONS['working_directory'] = File.expand_path(RAILS_ROOT)
0
 
0
-puts "=> Rails application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
0
+puts "=> Rails #{Rails.version} application started on http://#{OPTIONS[:ip]}:#{OPTIONS[:port]}"
0
 puts "=> Ctrl-C to shutdown server; call with --help for options" if OPTIONS[:server_type] == WEBrick::SimpleServer
0
 DispatchServlet.dispatch(OPTIONS)
...
119
120
121
122
 
123
124
125
...
119
120
121
 
122
123
124
125
0
@@ -119,7 +119,7 @@ module Rails
0
         config = RailsConfigurator.new(settings) do
0
           defaults[:log] = $stdout if defaults[:environment] == 'development'
0
 
0
-          Mongrel.log("=> Rails application starting on http://#{defaults[:host]}:#{defaults[:port]}")
0
+          Mongrel.log("=> Rails #{Rails.version} application starting on http://#{defaults[:host]}:#{defaults[:port]}")
0
 
0
           unless defaults[:daemon]
0
             Mongrel.log("=> Call with -d to detach")

Comments

Squeegy Thu May 22 09:19:36 -0700 2008

I have to say, this tiny chnage is way handy and helpful. Thanks!