Sha256: 7ddaf7e8bae4b3da2dd0660cb46f237726d8bd20244d432857f9d2a4384ccf90
Contents?: true
Size: 926 Bytes
Versions: 67
Compression:
Stored size: 926 Bytes
Contents
require 'rubygems' require 'autotest' require 'sys/uname' include Sys ## # Autotest::FSEvent # # == FEATUERS: # * Use FSEvent (on Mac OS X 10.5 or higher) instead of filesystem polling # # == SYNOPSIS: # ~/.autotest # require 'autotest/fsevent' module Autotest::FSEvent GEM_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) unless defined?(GEM_PATH) ## # Use FSEvent if possible # Add waiting hook to prevent fallback to polling after ignored files have changed if Uname.sysname == 'Darwin' && Uname.release.to_i >= 9 Autotest.add_hook :initialize do class ::Autotest remove_method :wait_for_changes def wait_for_changes hook :waiting begin `cd '#{Dir.pwd}'; #{File.join(GEM_PATH, 'bin', 'fsevent_sleep')} . 2>&1` Kernel.sleep self.sleep end until find_files_to_test end end end end end
Version data entries
67 entries across 67 versions & 5 rubygems