Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4136

Show
Ignore:
Timestamp:
04/03/06 03:06:23 (2 years ago)
Author:
nzkoz
Message:

Fix for depot and other applications with .13 style environment.rb files. prints deprecation warnings to the log file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/CHANGELOG

    r4088 r4136  
     1* SVN * 
     2 
     3* provide an empty Dependencies::LoadingModule.load which prints deprecation warnings.  Lets 1.0 applications function with .13-style environment.rb. 
     4 
    15*1.3.0* (March 27th, 2005) 
    26 
  • trunk/activesupport/lib/active_support/dependencies.rb

    r4060 r4136  
    6868    # Record history *after* loading so first load gets warnings. 
    6969    history << file_name 
     70  end 
     71   
     72  class LoadingModule 
     73    # Old style environment.rb referenced this method directly.  Please note, it doesn't 
     74    # actualy *do* anything any more. 
     75    def self.root(*args) 
     76      if defined?(RAILS_DEFAULT_LOGGER) 
     77        RAILS_DEFAULT_LOGGER.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases." 
     78        RAILS_DEFAULT_LOGGER.warn "For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19" 
     79      end 
     80    end 
    7081  end 
    7182end