mirror of
https://github.com/discourse/discourse.git
synced 2025-04-02 06:58:55 +08:00
Revert "DEV: Allow rake plugin:spec to traverse symlinks"
This reverts commit dfd63b185f3b5279f49f979638dd17c30431669e. https://meta.discourse.org/t/108110/11
This commit is contained in:
parent
925606f8b1
commit
68173cd234
@ -87,8 +87,7 @@ desc 'run plugin specs'
|
|||||||
task 'plugin:spec', :plugin do |t, args|
|
task 'plugin:spec', :plugin do |t, args|
|
||||||
args.with_defaults(plugin: "*")
|
args.with_defaults(plugin: "*")
|
||||||
ruby = `which ruby`.strip
|
ruby = `which ruby`.strip
|
||||||
# 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")
|
||||||
files = Dir.glob("./plugins/#{args[:plugin]}/spec/**{,/*/**}/*_spec.rb")
|
|
||||||
if files.length > 0
|
if files.length > 0
|
||||||
sh "LOAD_PLUGINS=1 #{ruby} -S rspec #{files.join(' ')}"
|
sh "LOAD_PLUGINS=1 #{ruby} -S rspec #{files.join(' ')}"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user