DEV: Allow rake plugin:spec to traverse symlinks

DEV: Allow rake plugin:spec to traverse symlinks

diff --git a/lib/tasks/plugin.rake b/lib/tasks/plugin.rake
index c775250..13f18c1 100644
--- a/lib/tasks/plugin.rake
+++ b/lib/tasks/plugin.rake
@@ -87,7 +87,8 @@ desc 'run plugin specs'
 task 'plugin:spec', :plugin do |t, args|
   args.with_defaults(plugin: "*")
   ruby = `which ruby`.strip
-  files = Dir.glob("./plugins/#{args[:plugin]}/spec/**/*_spec.rb")
+  # Traverse symlinks (https://stackoverflow.com/questions/357754/can-i-traverse-symlinked-directories-in-ruby-with-a-glob)
+  files = Dir.glob("./plugins/#{args[:plugin]}/spec/**{,/*/**}/*_spec.rb")
   if files.length > 0
     sh "LOAD_PLUGINS=1 #{ruby} -S rspec #{files.join(' ')}"
   else

GitHub sha: dfd63b18

This commit has been mentioned on Discourse Meta. There might be relevant details there:

This commit has been mentioned on Discourse Meta. There might be relevant details there:

Revert "DEV: Allow rake plugin:spec to traverse symlinks"