Updated version deps for rb-fsevent & rb-inotify

This commit is contained in:
Thibaud Guillaume-Gentil 2011-06-04 21:38:09 +02:00
parent 5808a3cf23
commit deec4135a9
3 changed files with 9 additions and 13 deletions

View File

@ -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

View File

@ -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)

View File

@ -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