mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:11:17 +08:00
DEV: Further refine development reload for plugin files (#22141)
Followup f3afc8bf85001da849239bc588bb394752c672b5 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 =
|
not_autoloaded =
|
||||||
files.filter_map do |file|
|
files.filter_map do |file|
|
||||||
autoloaded = Rails.autoloaders.main.__autoloads.key? 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)
|
Pathname.new(file).relative_path_from(Rails.root)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user