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

Changeset 9141

Show
Ignore:
Timestamp:
03/30/08 02:35:08 (3 months ago)
Author:
rick
Message:

Small tweak to allow plugins to specify gem dependencies. [rick]

Files:

Legend:

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

    r9140 r9141  
    11*SVN* 
     2 
     3* Small tweak to allow plugins to specify gem dependencies.  [rick] 
     4 
     5  # OLD open_id_authentication plugin init.rb 
     6  require 'yadis' 
     7  require 'openid' 
     8  ActionController::Base.send :include, OpenIdAuthentication 
     9 
     10  # NEW 
     11  config.gem "ruby-openid", :lib => "openid", :version => "1.1.4" 
     12  config.gem "ruby-yadis",  :lib => "yadis",  :version => "0.3.4" 
     13 
     14  config.after_initialize do 
     15    ActionController::Base.send :include, OpenIdAuthentication 
     16  end 
    217 
    318* Added config.gem for specifying which gems are required by the application, as well as rake tasks for installing and freezing gems. [rick] 
  • trunk/railties/lib/initializer.rb

    r9140 r9141  
    103103      load_gems 
    104104      load_plugins 
     105 
     106      # pick up any gems that plugins depend on 
     107      add_gem_load_paths 
     108      load_gems 
     109 
    105110      load_application_initializers 
    106111 
  • trunk/railties/lib/rails/gem_dependency.rb

    r9140 r9141  
    3636 
    3737    def load 
    38       return if @load_paths_added == false 
     38      return if @loaded || @load_paths_added == false 
    3939      require(@lib || @name) 
    4040      @loaded = true