diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-05-22 15:16:12 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-05-22 15:16:12 +0100 |
commit | e32deb595f66e8be7aeb9aeb2ef796994f524584 (patch) | |
tree | b5ec35226d8c3c8279df332edbdd450055ffc80b /railties | |
parent | 4617139bcc21ccb875d25baf06c3124692061cf2 (diff) | |
parent | cff2291df5d1df106ae8cf116655f0703f53f8c3 (diff) | |
download | rails-e32deb595f66e8be7aeb9aeb2ef796994f524584.tar.gz rails-e32deb595f66e8be7aeb9aeb2ef796994f524584.tar.bz2 rails-e32deb595f66e8be7aeb9aeb2ef796994f524584.zip |
Merge commit 'mainstream/master'
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/commands/console.rb | 4 | ||||
-rw-r--r-- | railties/lib/commands/servers/lighttpd.rb | 2 | ||||
-rw-r--r-- | railties/lib/commands/servers/mongrel.rb | 2 | ||||
-rw-r--r-- | railties/lib/commands/servers/webrick.rb | 2 | ||||
-rw-r--r-- | railties/lib/initializer.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/mongrel_server/commands.rb | 2 |
6 files changed, 10 insertions, 6 deletions
diff --git a/railties/lib/commands/console.rb b/railties/lib/commands/console.rb index edffe4f1e6..2b9d92f647 100644 --- a/railties/lib/commands/console.rb +++ b/railties/lib/commands/console.rb @@ -24,9 +24,9 @@ ENV['RAILS_ENV'] = case ARGV.first end if options[:sandbox] - puts "Loading #{ENV['RAILS_ENV']} environment in sandbox (Rails #{Rails::VERSION::STRING})" + puts "Loading #{ENV['RAILS_ENV']} environment in sandbox (Rails #{Rails.version})" puts "Any modifications you make will be rolled back on exit" else - puts "Loading #{ENV['RAILS_ENV']} environment (Rails #{Rails::VERSION::STRING})" + puts "Loading #{ENV['RAILS_ENV']} environment (Rails #{Rails.version})" end exec "#{options[:irb]} #{libs} --simple-prompt" diff --git a/railties/lib/commands/servers/lighttpd.rb b/railties/lib/commands/servers/lighttpd.rb index 07d4f9d0bf..c9d13e86f3 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} 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 f59265e698..7bb110f63a 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} 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 b950376150..18c8897cc8 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} 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/initializer.rb b/railties/lib/initializer.rb index 150e76af77..98cc206765 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -43,6 +43,10 @@ module Rails RAILS_CACHE end + def version + VERSION::STRING + end + def public_path @@public_path ||= self.root ? File.join(self.root, "public") : "public" end diff --git a/railties/lib/rails/mongrel_server/commands.rb b/railties/lib/rails/mongrel_server/commands.rb index 3786a56fde..0a92f418ad 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} application starting on http://#{defaults[:host]}:#{defaults[:port]}") unless defaults[:daemon] Mongrel.log("=> Call with -d to detach") |