Created
February 19, 2013 19:21
-
-
Save texel/4988973 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Monkey patch Autotest... | |
class Autotest | |
def find_files | |
result = {} | |
targets = self.find_directories + self.extra_files | |
self.find_order.clear | |
targets.each do |target| | |
begin | |
order = [] | |
Find.find target do |f| | |
Find.prune if f =~ self.exceptions | |
next if test ?d, f | |
next if f =~ /(swp|~|rej|orig)$/ # temporary/patch files | |
next if f =~ /^\.\/tmp/ # temporary dir, used by isolate | |
next if f =~ /\/\.?#/ # Emacs autosave/cvs merge files | |
filename = f.sub(/^\.\//, '') | |
result[filename] = File.stat(filename).mtime rescue next | |
order << filename | |
end | |
self.find_order.push(*order.sort) | |
rescue Errno::ENOENT => e | |
puts "target: #{target}" | |
# raise e | |
end | |
end | |
result | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment