Skip to content

Commit

Permalink
Updated version deps for rb-fsevent & rb-inotify
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudgg committed Jun 4, 2011
1 parent 5808a3c commit deec413
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions lib/guard/listeners/darwin.rb
Expand Up @@ -23,19 +23,17 @@ def stop

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)
Expand Down
8 changes: 3 additions & 5 deletions lib/guard/listeners/linux.rb
Expand Up @@ -24,12 +24,10 @@ def stop

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
Expand Down

0 comments on commit deec413

Please sign in to comment.