diff options
author | Dmitriy Timokhin <avanie@gmail.com> | 2008-05-07 17:43:12 +0400 |
---|---|---|
committer | rick <technoweenie@gmail.com> | 2008-05-31 16:46:13 -0700 |
commit | 224c8e6afb464a4b04621189963ec03d1d3487d0 (patch) | |
tree | 9d52b87c12fa08e5a0a9b1fea4b929ec6d2cfcd2 /railties/lib/rails/plugin.rb | |
parent | d5bcff172b6253684cf5cc3345a3d390096ba957 (diff) | |
download | rails-224c8e6afb464a4b04621189963ec03d1d3487d0.tar.gz rails-224c8e6afb464a4b04621189963ec03d1d3487d0.tar.bz2 rails-224c8e6afb464a4b04621189963ec03d1d3487d0.zip |
Expose GemPlugin load_paths so they can be added to Dependencies.load_paths. Also use full_gem_path as root of GemPlugin to make things compatible. [#213 state:resolved]
Diffstat (limited to 'railties/lib/rails/plugin.rb')
-rw-r--r-- | railties/lib/rails/plugin.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index 04f7e37a20..fdaec34c59 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -98,23 +98,19 @@ module Rails end end - # This Plugin subclass represents a Gem plugin. It behaves exactly like a - # "traditional" Rails plugin, but doesn't expose any additional load paths, - # since RubyGems has already taken care of things. + # This Plugin subclass represents a Gem plugin. Although RubyGems has already + # taken care of $LOAD_PATH's, it have to expose its load_path's to add them + # to Dependencies.load_paths. class GemPlugin < Plugin # Initialize this plugin from a Gem::Specification. def initialize(spec) - super(File.join(spec.full_gem_path, "rails")) + super(File.join(spec.full_gem_path)) @name = spec.name end - def valid? - true - end - - def load_paths - [] + def init_path + File.join(directory, 'rails', 'init.rb') end end end
\ No newline at end of file |