fate 0.2.16 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fate.rb +1 -1
- data/lib/fate/process_manager.rb +9 -2
- data/lib/fate/service.rb +1 -0
- metadata +2 -2
data/lib/fate.rb
CHANGED
data/lib/fate/process_manager.rb
CHANGED
@@ -7,7 +7,8 @@ class Fate
|
|
7
7
|
class ProcessManager
|
8
8
|
|
9
9
|
attr_reader :logger, :output_handlers
|
10
|
-
def initialize(service)
|
10
|
+
def initialize(service, options={})
|
11
|
+
@directory = options[:directory]
|
11
12
|
@mutex = Mutex.new
|
12
13
|
@service = service
|
13
14
|
@output_handlers = @service.output_handlers
|
@@ -74,7 +75,13 @@ class Fate
|
|
74
75
|
pid = nil
|
75
76
|
@mutex.synchronize do
|
76
77
|
unless @down_in_flames
|
77
|
-
|
78
|
+
if @directory
|
79
|
+
Dir.chdir @directory do
|
80
|
+
pipe = IO.popen(command, "r", :err => :out)
|
81
|
+
end
|
82
|
+
else
|
83
|
+
pipe = IO.popen(command, "r", :err => :out)
|
84
|
+
end
|
78
85
|
pid = pipe.pid
|
79
86
|
logger.info "Starting '#{name}' (pid #{pid})"
|
80
87
|
|
data/lib/fate/service.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.17
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01
|
12
|
+
date: 2013-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|