mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 08:46:19 +08:00
avoid double lookup for plugin helpers
This commit is contained in:
parent
8febaa8be7
commit
2b5dfb6e8e
|
@ -31,9 +31,8 @@ Spork.prefork do
|
||||||
|
|
||||||
# Require plugin helpers at plugin/[plugin]/spec/plugin_helper.rb (includes symlinked plugins).
|
# Require plugin helpers at plugin/[plugin]/spec/plugin_helper.rb (includes symlinked plugins).
|
||||||
if ENV['LOAD_PLUGINS'] == "1"
|
if ENV['LOAD_PLUGINS'] == "1"
|
||||||
Dir[Rails.root.join("plugins/**")].each do |plugin|
|
Dir[Rails.root.join("plugins/*/spec/plugin_helper.rb")].each do |f|
|
||||||
helper = "#{plugin}/spec/plugin_helper.rb"
|
require f
|
||||||
require helper if File.exists?(helper)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user