public
Description: A fork of backgroundrb for MERB
Homepage:
Clone URL: git://github.com/georgepalmer/backgroundrb_merb.git
backgroundrb_merb / .autotest
100644 18 lines (14 sloc) 0.467 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Autotest
  def find_files
    result = {}
    Find.find '.' do |f|
      Find.prune if @exceptions and f =~ @exceptions and test ?d, f
 
      next if test ?d, f
      next if f =~ /(swp|~|rej|orig|flymake)$/ # temporary/patch files
      next if f =~ /\/\.?#/ # Emacs autosave/cvs merge files
 
      filename = f.sub(/^\.\//, '')
 
      result[filename] = File.stat(filename).mtime rescue next
    end
    return result
  end
end