提交 224c8e6a 编写于 作者: D Dmitriy Timokhin 提交者: rick

Expose GemPlugin load_paths so they can be added to Dependencies.load_paths....

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]
上级 d5bcff17
......@@ -98,23 +98,19 @@ def evaluate_init_rb(initializer)
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册