lib/sdoc_all/parts/plugins.rb in sdoc_all-1.0.4 vs lib/sdoc_all/parts/plugins.rb in sdoc_all-1.0.5

- old
+ new

@@ -19,14 +19,10 @@ raise_unknown_options_if_not_blank!(raw_config) end def add_tasks(options = {}) - plugins = Base.chdir(config[:path]) do - Pathname.glob('*').map do |path| - config[:path] + path if path.directory? - end.compact - end + plugins = config[:path].children.select(&:directory?) plugins.delete_if{ |plugin| !config[:only].include?(plugin.basename.to_s.downcase) } if config[:only] plugins.delete_if{ |plugin| config[:exclude].include?(plugin.basename.to_s.downcase) } if config[:update] && options[:update]