mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Further refine development reload for plugin files (#22141)
Followup f3afc8bf85 to better
exclude all spec files including PageObject files.
This commit is contained in:
@@ -21,7 +21,8 @@ if Rails.env.development? && !Rails.configuration.cache_classes && Discourse.run
|
||||
not_autoloaded =
|
||||
files.filter_map do |file|
|
||||
autoloaded = Rails.autoloaders.main.__autoloads.key? file
|
||||
if !autoloaded && !file.end_with?("spec.rb")
|
||||
|
||||
if !autoloaded && !file.match(%r{/spec/})
|
||||
Pathname.new(file).relative_path_from(Rails.root)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user