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' require 'rbconfig'
if Config::CONFIG['target_os'] =~ /darwin/i 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 gem 'growl', '~> 1.0.3', :require => false
end end
if Config::CONFIG['target_os'] =~ /linux/i 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 gem 'libnotify', '~> 0.1.3', :require => false
end end
if Config::CONFIG['target_os'] =~ /mswin|mingw/i if Config::CONFIG['target_os'] =~ /mswin|mingw/i

View File

@ -23,19 +23,17 @@ module Guard
def self.usable? def self.usable?
require 'rb-fsevent' require 'rb-fsevent'
if !defined?(FSEvent::VERSION) || Gem::Version.new(FSEvent::VERSION) < Gem::Version.new('0.3.9') if !defined?(FSEvent::VERSION) || Gem::Version.new(FSEvent::VERSION) < Gem::Version.new('0.4.0')
UI.info "Please update rb-fsevent (>= 0.3.9)" UI.info "Please update rb-fsevent (>= 0.4.0)"
false
else
true
end end
true
rescue LoadError rescue LoadError
UI.info "Please install rb-fsevent gem for Mac OSX FSEvents support" UI.info "Please install rb-fsevent gem for Mac OSX FSEvents support"
false false
end end
private private
def watch(directory) def watch(directory)
worker.watch directory do |modified_dirs| worker.watch directory do |modified_dirs|
files = modified_files(modified_dirs) files = modified_files(modified_dirs)

View File

@ -24,12 +24,10 @@ module Guard
def self.usable? def self.usable?
require 'rb-inotify' require 'rb-inotify'
if !defined?(INotify::VERSION) || Gem::Version.new(INotify::VERSION.join('.')) < Gem::Version.new('0.5.1') if !defined?(INotify::VERSION) || Gem::Version.new(INotify::VERSION.join('.')) < Gem::Version.new('0.8.5')
UI.info "Please update rb-inotify (>= 0.5.1)" UI.info "Please update rb-inotify (>= 0.8.5)"
false
else
true
end end
true
rescue LoadError rescue LoadError
UI.info "Please install rb-inotify gem for Linux inotify support" UI.info "Please install rb-inotify gem for Linux inotify support"
false false