mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Fix for depot and other applications with .13 style environment.rb files. prints deprecation warnings to the log file
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
* SVN *
|
||||
|
||||
* provide an empty Dependencies::LoadingModule.load which prints deprecation warnings. Lets 1.0 applications function with .13-style environment.rb.
|
||||
|
||||
*1.3.0* (March 27th, 2005)
|
||||
|
||||
* When possible, avoid incorrectly obtaining constants from parent modules. Fixes #4221. [Nicholas Seckar]
|
||||
|
||||
@@ -68,6 +68,17 @@ module Dependencies #:nodoc:
|
||||
# Record history *after* loading so first load gets warnings.
|
||||
history << file_name
|
||||
end
|
||||
|
||||
class LoadingModule
|
||||
# Old style environment.rb referenced this method directly. Please note, it doesn't
|
||||
# actualy *do* anything any more.
|
||||
def self.root(*args)
|
||||
if defined?(RAILS_DEFAULT_LOGGER)
|
||||
RAILS_DEFAULT_LOGGER.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases."
|
||||
RAILS_DEFAULT_LOGGER.warn "For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Object.send(:define_method, :require_or_load) { |file_name| Dependencies.require_or_load(file_name) } unless Object.respond_to?(:require_or_load)
|
||||
|
||||
Reference in New Issue
Block a user