mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Do not auto reload on plugin spec file changes (#22127)
There is no need to reload the rails server if plugin spec files change, since they are not autoloaded but they are also not loaded into the app.
This commit is contained in:
@@ -21,7 +21,9 @@ if Rails.env.development? && !Rails.configuration.cache_classes && Discourse.run
|
||||
not_autoloaded =
|
||||
files.filter_map do |file|
|
||||
autoloaded = Rails.autoloaders.main.__autoloads.key? file
|
||||
Pathname.new(file).relative_path_from(Rails.root) if !autoloaded
|
||||
if !autoloaded && !file.end_with?("spec.rb")
|
||||
Pathname.new(file).relative_path_from(Rails.root)
|
||||
end
|
||||
end
|
||||
|
||||
if not_autoloaded.length > 0
|
||||
|
||||
Reference in New Issue
Block a user