Skip to content

Instantly share code, notes, and snippets.

@mwise
Created March 13, 2012 16:16
Show Gist options
  • Save mwise/2029684 to your computer and use it in GitHub Desktop.
Save mwise/2029684 to your computer and use it in GitHub Desktop.
require 'autotest/growl'
require 'autotest/fsevent'
Autotest.add_hook :initialize do |at|
unless ARGV.empty?
at.find_directories = ARGV.dup
end
end
if ENV['AUTOTEST'] and not ENV['AUTOTEST'].empty?
only_these_files_re = Regexp.new(ENV['AUTOTEST'])
Autotest.send(:alias_method, :real_find_files, :find_files)
Autotest.send(:define_method, :find_files) do |*args|
real_find_files.reject do |k, v|
!only_these_files_re.match(k)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment