Permalink
Browse files

Temp fix for rev gem dependency issue

Disabled evented, rev-based handler for all platforms and removed rev
dependency. All platforms temporarily use Portable handler.

http://github.com/mynyml/watchr/issues#issue/1
  • Loading branch information...
1 parent 8d38f54 commit d05696e02c0f0ab05bb3ea9fecf138222d30e4e0 @mynyml mynyml committed Sep 21, 2009
Showing with 39 additions and 11 deletions.
  1. +2 −0 TODO.txt
  2. +6 −2 lib/watchr.rb
  3. +1 −1 lib/watchr/version.rb
  4. +26 −4 test/test_watchr.rb
  5. +4 −4 watchr.gemspec
View
2 TODO.txt
@@ -1,4 +1,6 @@
+* use VERSION file
+
* refactor Script#parse!
* only accept paths in initialize?
View
8 lib/watchr.rb
@@ -62,6 +62,9 @@ def debug(str)
# Detect current OS and return appropriate handler.
#
+ # NOTE temporarily returns Portable handler for all platforms, until
+ # issue #1 is fixed
+ #
# ===== Examples
#
# Config::CONFIG['host_os'] #=> 'linux-gnu'
@@ -85,8 +88,9 @@ def handler
case ENV['HANDLER'] || Config::CONFIG['host_os']
when /mswin|windows|cygwin/i
Watchr::EventHandler::Portable
- when /bsd|sunos|solaris|darwin|osx|mach|linux/i, 'unix'
- Watchr::EventHandler::Unix
+ when /sunos|solaris|darwin|mach|osx|bsd|linux/i, 'unix'
+ #Watchr::EventHandler::Unix
+ Watchr::EventHandler::Portable
else
Watchr::EventHandler::Portable
end
View
2 lib/watchr/version.rb
@@ -2,7 +2,7 @@ module Watchr
module VERSION #:nodoc:
MAJOR = 0
MINOR = 5
- TINY = 3
+ TINY = 4
end
def self.version #:nodoc:
View
30 test/test_watchr.rb
@@ -23,21 +23,43 @@ def setup
end
test "picking handler" do
+
+ # temporary workaround to issue #1
+ # http://github.com/mynyml/watchr/issues#issue/1
+
+ #Watchr.handler = nil
+ #ENV['HANDLER'] = 'linux'
+ #Watchr.handler.should be(Watchr::EventHandler::Unix)
+
+ #Watchr.handler = nil
+ #ENV['HANDLER'] = 'bsd'
+ #Watchr.handler.should be(Watchr::EventHandler::Unix)
+
+ #Watchr.handler = nil
+ #ENV['HANDLER'] = 'darwin'
+ #Watchr.handler.should be(Watchr::EventHandler::Unix)
+
+ #Watchr.handler = nil
+ #ENV['HANDLER'] = 'unix'
+ #Watchr.handler.should be(Watchr::EventHandler::Unix)
+
Watchr.handler = nil
ENV['HANDLER'] = 'linux'
- Watchr.handler.should be(Watchr::EventHandler::Unix)
+ Watchr.handler.should be(Watchr::EventHandler::Portable)
Watchr.handler = nil
ENV['HANDLER'] = 'bsd'
- Watchr.handler.should be(Watchr::EventHandler::Unix)
+ Watchr.handler.should be(Watchr::EventHandler::Portable)
Watchr.handler = nil
ENV['HANDLER'] = 'darwin'
- Watchr.handler.should be(Watchr::EventHandler::Unix)
+ Watchr.handler.should be(Watchr::EventHandler::Portable)
Watchr.handler = nil
ENV['HANDLER'] = 'unix'
- Watchr.handler.should be(Watchr::EventHandler::Unix)
+ Watchr.handler.should be(Watchr::EventHandler::Portable)
+ # end temporary workaround
+
Watchr.handler = nil
ENV['HANDLER'] = 'mswin'
View
8 watchr.gemspec
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'watchr'
- s.version = '0.5.3'
+ s.version = '0.5.4'
s.date = '2009-09-17'
s.summary = "Modern continious testing (flexible alternative to autotest)"
s.description = "Modern continious testing (flexible alternative to autotest)."
@@ -50,9 +50,9 @@ Gem::Specification.new do |s|
#require 'rbconfig'
#unless Config::CONFIG['host_os'] =~ /mswin|windows|cygwin/i
- unless RUBY_PLATFORM =~ /mswin|windows|cygwin/i
- s.add_dependency 'rev', '>= 0.3.0'
- end
+ #unless RUBY_PLATFORM =~ /mswin|windows|cygwin/i
+ # s.add_dependency 'rev', '>= 0.3.0'
+ #end
s.add_development_dependency 'mocha'
s.add_development_dependency 'jeremymcanally-matchy'

0 comments on commit d05696e

Please sign in to comment.