diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-11-09 13:15:09 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-11-09 13:15:21 -0200 |
commit | fc5ccd2c0b10533a5101bf247023246f6148d723 (patch) | |
tree | 285a08f30e48c48059880c4a8681ce4acbe06acc /railties/lib/rails | |
parent | e41d78ce221b2ca84cc260e20f3813eaace586b3 (diff) | |
download | rails-fc5ccd2c0b10533a5101bf247023246f6148d723.tar.gz rails-fc5ccd2c0b10533a5101bf247023246f6148d723.tar.bz2 rails-fc5ccd2c0b10533a5101bf247023246f6148d723.zip |
Revert "Respect children paths filter settings"
This reverts commit 53778ec2d716f860646fd43957fd53c8db4da2fe.
Closes #8146
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/paths.rb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index 17eba4c69c..4ac3d88dc2 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -87,15 +87,14 @@ module Rails protected def filter_by(constraint) - yes = [] - no = [] - + all = [] all_paths.each do |path| - paths = path.existent + path.existent_base_paths - path.send(constraint) ? yes.concat(paths) : no.concat(paths) + if path.send(constraint) + paths = path.existent + paths -= path.children.map { |p| p.send(constraint) ? [] : p.existent }.flatten + all.concat(paths) + end end - - all = yes - no all.uniq! all end @@ -195,10 +194,6 @@ module Rails expanded.select { |d| File.directory?(d) } end - def existent_base_paths - map { |p| File.expand_path(p, @root.path) }.select{ |f| File.exist? f } - end - alias to_a expanded private |