Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit d05696e02c0f0ab05bb3ea9fecf138222d30e4e0 1 parent 8d38f54
Martin authored September 21, 2009
2  TODO.txt
... ...
@@ -1,4 +1,6 @@
1 1
 
  2
+* use VERSION file
  3
+
2 4
 * refactor Script#parse!
3 5
   * only accept paths in initialize?
4 6
 
8  lib/watchr.rb
@@ -62,6 +62,9 @@ def debug(str)
62 62
 
63 63
     # Detect current OS and return appropriate handler.
64 64
     #
  65
+    # NOTE temporarily returns Portable handler for all platforms, until
  66
+    # issue #1 is fixed
  67
+    #
65 68
     # ===== Examples
66 69
     #
67 70
     #   Config::CONFIG['host_os'] #=> 'linux-gnu'
@@ -85,8 +88,9 @@ def handler
85 88
         case ENV['HANDLER'] || Config::CONFIG['host_os']
86 89
           when /mswin|windows|cygwin/i
87 90
             Watchr::EventHandler::Portable
88  
-          when /bsd|sunos|solaris|darwin|osx|mach|linux/i, 'unix'
89  
-            Watchr::EventHandler::Unix
  91
+          when /sunos|solaris|darwin|mach|osx|bsd|linux/i, 'unix'
  92
+            #Watchr::EventHandler::Unix
  93
+            Watchr::EventHandler::Portable
90 94
           else
91 95
             Watchr::EventHandler::Portable
92 96
         end
2  lib/watchr/version.rb
@@ -2,7 +2,7 @@ module Watchr
2 2
   module VERSION #:nodoc:
3 3
     MAJOR = 0
4 4
     MINOR = 5
5  
-    TINY  = 3
  5
+    TINY  = 4
6 6
   end
7 7
 
8 8
   def self.version #:nodoc:
30  test/test_watchr.rb
@@ -23,21 +23,43 @@ def setup
23 23
   end
24 24
 
25 25
   test "picking handler" do
  26
+
  27
+    # temporary workaround to issue #1
  28
+    # http://github.com/mynyml/watchr/issues#issue/1
  29
+
  30
+    #Watchr.handler = nil
  31
+    #ENV['HANDLER'] = 'linux'
  32
+    #Watchr.handler.should be(Watchr::EventHandler::Unix)
  33
+
  34
+    #Watchr.handler = nil
  35
+    #ENV['HANDLER'] = 'bsd'
  36
+    #Watchr.handler.should be(Watchr::EventHandler::Unix)
  37
+
  38
+    #Watchr.handler = nil
  39
+    #ENV['HANDLER'] = 'darwin'
  40
+    #Watchr.handler.should be(Watchr::EventHandler::Unix)
  41
+
  42
+    #Watchr.handler = nil
  43
+    #ENV['HANDLER'] = 'unix'
  44
+    #Watchr.handler.should be(Watchr::EventHandler::Unix)
  45
+
26 46
     Watchr.handler = nil
27 47
     ENV['HANDLER'] = 'linux'
28  
-    Watchr.handler.should be(Watchr::EventHandler::Unix)
  48
+    Watchr.handler.should be(Watchr::EventHandler::Portable)
29 49
 
30 50
     Watchr.handler = nil
31 51
     ENV['HANDLER'] = 'bsd'
32  
-    Watchr.handler.should be(Watchr::EventHandler::Unix)
  52
+    Watchr.handler.should be(Watchr::EventHandler::Portable)
33 53
 
34 54
     Watchr.handler = nil
35 55
     ENV['HANDLER'] = 'darwin'
36  
-    Watchr.handler.should be(Watchr::EventHandler::Unix)
  56
+    Watchr.handler.should be(Watchr::EventHandler::Portable)
37 57
 
38 58
     Watchr.handler = nil
39 59
     ENV['HANDLER'] = 'unix'
40  
-    Watchr.handler.should be(Watchr::EventHandler::Unix)
  60
+    Watchr.handler.should be(Watchr::EventHandler::Portable)
  61
+    # end temporary workaround
  62
+
41 63
 
42 64
     Watchr.handler = nil
43 65
     ENV['HANDLER'] = 'mswin'
8  watchr.gemspec
... ...
@@ -1,7 +1,7 @@
1 1
 
2 2
 Gem::Specification.new do |s|
3 3
   s.name              = 'watchr'
4  
-  s.version           = '0.5.3'
  4
+  s.version           = '0.5.4'
5 5
   s.date              = '2009-09-17'
6 6
   s.summary           = "Modern continious testing (flexible alternative to autotest)"
7 7
   s.description       = "Modern continious testing (flexible alternative to autotest)."
@@ -50,9 +50,9 @@ Gem::Specification.new do |s|
50 50
 
51 51
  #require 'rbconfig'
52 52
  #unless Config::CONFIG['host_os'] =~ /mswin|windows|cygwin/i
53  
-  unless RUBY_PLATFORM =~ /mswin|windows|cygwin/i
54  
-    s.add_dependency 'rev', '>= 0.3.0'
55  
-  end
  53
+  #unless RUBY_PLATFORM =~ /mswin|windows|cygwin/i
  54
+  #  s.add_dependency 'rev', '>= 0.3.0'
  55
+  #end
56 56
 
57 57
   s.add_development_dependency 'mocha'
58 58
   s.add_development_dependency 'jeremymcanally-matchy'

0 notes on commit d05696e

Please sign in to comment.
Something went wrong with that request. Please try again.