diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 15 | ||||
-rw-r--r-- | railties/lib/initializer.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/gem_dependency.rb | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 7950e6a14f..97bb718e37 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,20 @@ *SVN* +* Small tweak to allow plugins to specify gem dependencies. [rick] + + # OLD open_id_authentication plugin init.rb + require 'yadis' + require 'openid' + ActionController::Base.send :include, OpenIdAuthentication + + # NEW + config.gem "ruby-openid", :lib => "openid", :version => "1.1.4" + config.gem "ruby-yadis", :lib => "yadis", :version => "0.3.4" + + config.after_initialize do + ActionController::Base.send :include, OpenIdAuthentication + end + * Added config.gem for specifying which gems are required by the application, as well as rake tasks for installing and freezing gems. [rick] Rails::Initializer.run do |config| diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 4be7b06f93..ec3e1d79d6 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -102,6 +102,11 @@ module Rails load_gems load_plugins + + # pick up any gems that plugins depend on + add_gem_load_paths + load_gems + load_application_initializers # the framework is now fully initialized diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index ed16464887..2ffacd17b6 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -35,7 +35,7 @@ module Rails end def load - return if @load_paths_added == false + return if @loaded || @load_paths_added == false require(@lib || @name) @loaded = true rescue LoadError |