diff --git a/Gemfile b/Gemfile index 1386270..99ab763 100644 --- a/Gemfile +++ b/Gemfile @@ -5,11 +5,11 @@ gemspec require 'rbconfig' if Config::CONFIG['target_os'] =~ /darwin/i - gem 'rb-fsevent', '>= 0.3.9', :require => false + gem 'rb-fsevent', '>= 0.4.0', :require => false gem 'growl', '~> 1.0.3', :require => false end if Config::CONFIG['target_os'] =~ /linux/i - gem 'rb-inotify', '>= 0.5.1', :require => false + gem 'rb-inotify', '>= 0.8.5', :require => false gem 'libnotify', '~> 0.1.3', :require => false end if Config::CONFIG['target_os'] =~ /mswin|mingw/i diff --git a/lib/guard/listeners/darwin.rb b/lib/guard/listeners/darwin.rb index 17bf48e..fb12377 100644 --- a/lib/guard/listeners/darwin.rb +++ b/lib/guard/listeners/darwin.rb @@ -23,19 +23,17 @@ module Guard def self.usable? require 'rb-fsevent' - if !defined?(FSEvent::VERSION) || Gem::Version.new(FSEvent::VERSION) < Gem::Version.new('0.3.9') - UI.info "Please update rb-fsevent (>= 0.3.9)" - false - else - true + if !defined?(FSEvent::VERSION) || Gem::Version.new(FSEvent::VERSION) < Gem::Version.new('0.4.0') + UI.info "Please update rb-fsevent (>= 0.4.0)" end + true rescue LoadError UI.info "Please install rb-fsevent gem for Mac OSX FSEvents support" false end private - + def watch(directory) worker.watch directory do |modified_dirs| files = modified_files(modified_dirs) diff --git a/lib/guard/listeners/linux.rb b/lib/guard/listeners/linux.rb index 041ae31..36cdc38 100644 --- a/lib/guard/listeners/linux.rb +++ b/lib/guard/listeners/linux.rb @@ -24,12 +24,10 @@ module Guard def self.usable? require 'rb-inotify' - if !defined?(INotify::VERSION) || Gem::Version.new(INotify::VERSION.join('.')) < Gem::Version.new('0.5.1') - UI.info "Please update rb-inotify (>= 0.5.1)" - false - else - true + if !defined?(INotify::VERSION) || Gem::Version.new(INotify::VERSION.join('.')) < Gem::Version.new('0.8.5') + UI.info "Please update rb-inotify (>= 0.8.5)" end + true rescue LoadError UI.info "Please install rb-inotify gem for Linux inotify support" false