Skip to content
This repository was archived by the owner on Jun 19, 2023. It is now read-only.

Commit f3afc8b

Browse files
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.
1 parent c819c96 commit f3afc8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

config/initializers/000-development_reload_warnings.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
not_autoloaded =
2222
files.filter_map do |file|
2323
autoloaded = Rails.autoloaders.main.__autoloads.key? file
24-
Pathname.new(file).relative_path_from(Rails.root) if !autoloaded
24+
if !autoloaded && !file.end_with?("spec.rb")
25+
Pathname.new(file).relative_path_from(Rails.root)
26+
end
2527
end
2628

2729
if not_autoloaded.length > 0

0 commit comments

Comments
 (0)