diff options
author | Anil Wadghule <anildigital@gmail.com> | 2010-04-12 22:20:55 +0530 |
---|---|---|
committer | Anil Wadghule <anildigital@gmail.com> | 2010-04-12 22:53:49 +0530 |
commit | 84e46437fa50782dd38b96b8df00ca8b017c892e (patch) | |
tree | 9e9743de0e1cd9220a0f9a850865787f41cba875 /railties/lib/rails | |
parent | 41bcf06d3289e2292fcc3819c8f104252af36adc (diff) | |
download | rails-84e46437fa50782dd38b96b8df00ca8b017c892e.tar.gz rails-84e46437fa50782dd38b96b8df00ca8b017c892e.tar.bz2 rails-84e46437fa50782dd38b96b8df00ca8b017c892e.zip |
Replace 'RAILS_ROOT' to 'Rails.root' and 'RAILS_ENV' to 'Rails.env' in significant places.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/webrick_server.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 7ce3494fa6..11bf6a6e72 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -53,7 +53,7 @@ module Rails paths.vendor.plugins "vendor/plugins" if File.exists?("#{root}/test/mocks/#{Rails.env}") - ActiveSupport::Deprecation.warn "\"RAILS_ROOT/test/mocks/#{Rails.env}\" won't be added " << + ActiveSupport::Deprecation.warn "\"Rails.root/test/mocks/#{Rails.env}\" won't be added " << "automatically to load paths anymore in future releases" paths.mocks_path "test/mocks", :load_path => true, :glob => Rails.env end diff --git a/railties/lib/rails/webrick_server.rb b/railties/lib/rails/webrick_server.rb index 2f60151b22..f3b74c28d3 100644 --- a/railties/lib/rails/webrick_server.rb +++ b/railties/lib/rails/webrick_server.rb @@ -63,8 +63,8 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet def initialize(server, options) #:nodoc: @server_options = options @file_handler = WEBrick::HTTPServlet::FileHandler.new(server, options[:server_root]) - # Change to the RAILS_ROOT, since Webrick::Daemon.start does a Dir::cwd("/") - # OPTIONS['working_directory'] is an absolute path of the RAILS_ROOT, set in railties/lib/commands/servers/webrick.rb + # Change to the Rails.root, since Webrick::Daemon.start does a Dir::cwd("/") + # OPTIONS['working_directory'] is an absolute path of the Rails.root, set in railties/lib/commands/servers/webrick.rb Dir.chdir(OPTIONS['working_directory']) if defined?(OPTIONS) && File.directory?(OPTIONS['working_directory']) super end |