diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-03-28 15:52:21 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-03-28 15:52:21 -0400 |
commit | 8d50b45159b4fec446b4d1e1a756c326fcd582f0 (patch) | |
tree | 41d807d211ce618766836bbf069507085b216552 /activesupport/lib | |
parent | 29d6e9cdc4d8528b6676843509347fc8fead935b (diff) | |
parent | 5cadcc7479394b6b48ad2b5362104511ece52ad6 (diff) | |
download | rails-8d50b45159b4fec446b4d1e1a756c326fcd582f0.tar.gz rails-8d50b45159b4fec446b4d1e1a756c326fcd582f0.tar.bz2 rails-8d50b45159b4fec446b4d1e1a756c326fcd582f0.zip |
Merge pull request #1 from radiospiel/tickets/26955-listen-paths
No longer listens to dirs outside of the app directory.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/evented_file_update_checker.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/evented_file_update_checker.rb b/activesupport/lib/active_support/evented_file_update_checker.rb index 8e0dc71dca..8d9d19c2d9 100644 --- a/activesupport/lib/active_support/evented_file_update_checker.rb +++ b/activesupport/lib/active_support/evented_file_update_checker.rb @@ -125,6 +125,11 @@ module ActiveSupport dtw.compact! dtw.uniq! + normalized_gem_paths = Gem.path.map { |path| File.join path, "" } + dtw = dtw.reject do |path| + normalized_gem_paths.any? { |gem_path| path.to_s.starts_with?(gem_path) } + end + @ph.filter_out_descendants(dtw) end |