workpile 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/workpile/cli.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  require "rubygems"
2
2
  require "fssm"
3
3
 
4
+ $stdout.sync = true
5
+ Thread.abort_on_exception = true
6
+
4
7
  require 'workpile'
5
8
  class FSSMGuard
6
9
  def initialize
@@ -28,7 +31,7 @@ class FSSMGuard
28
31
  def event(base, relative)
29
32
  @watch.keys.each do |regexp|
30
33
  if m = ( relative.match(regexp) )
31
- invoke @watch[regexp].call(m)
34
+ invoke(@watch[regexp] ? @watch[regexp].call(m) : relative)
32
35
  end
33
36
  end
34
37
  end
@@ -1,3 +1,3 @@
1
1
  module Workpile
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -33,17 +33,14 @@ end
33
33
 
34
34
  puts "ready"
35
35
 
36
- loop do
37
- str = cl.wait_request
36
+ str = cl.wait_request
38
37
 
39
- args = str.split(" ")
40
- src = args[-1]
38
+ args = str.split(" ")
39
+ src = args[-1]
41
40
 
42
- if File.exists?(src)
43
- break
44
- else
45
- puts "Spec File Not Find(#{src})"
46
- end
41
+ if not File.exists?(src)
42
+ puts "Spec File Not Find(#{src})"
43
+ exit
47
44
  end
48
45
 
49
46
  case src
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workpile
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - drvo