allow plugins to be symlinked

This commit is contained in:
Régis Hanol
2013-10-21 11:18:24 +02:00
parent 9c820443fa
commit fcd85b8a72
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,8 @@ class Plugin::Instance
def self.find_all(parent_path)
[].tap { |plugins|
Dir["#{parent_path}/**/plugin.rb"].each do |path|
# also follows symlinks - http://stackoverflow.com/q/357754
Dir["#{parent_path}/**/*/**/plugin.rb"].each do |path|
source = File.read(path)
metadata = Plugin::Metadata.parse(source)
plugins << self.new(metadata, path)