threaded_runner 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/threaded_runner.rb +1 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 058b1d32f08b2813fdd0eb0b0953940e9857b3c4
|
4
|
+
data.tar.gz: d2e64fc5f152a657d3ddb5516a2e38c93530a721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 572928577569b8931ace793e375a988ddad4da896fb1c799f691ca1694b4dfffaa347ffcc2dfe1e14d3870effff74fbed6b18efa08cd9e2c507256f231c2cfab
|
7
|
+
data.tar.gz: 2b13635078353482f69a6f8cca37da76368fafd06570e749fede2ce5d0a3c571759785cd52b2a98d306969c1438a455089f691af65ac33cf160bbb47264701bc
|
data/lib/threaded_runner.rb
CHANGED
@@ -1,15 +1,12 @@
|
|
1
1
|
class ThreadedRunner
|
2
|
-
def initialize(cmd
|
2
|
+
def initialize(cmd)
|
3
3
|
@cmd = cmd
|
4
|
-
@wdir = wdir
|
5
4
|
end
|
6
5
|
|
7
6
|
attr_reader :thread
|
8
7
|
|
9
8
|
def start(wait_for=nil)
|
10
|
-
pwd = Dir.pwd
|
11
9
|
@thread = Thread.new do
|
12
|
-
Dir.chdir(@wdir)
|
13
10
|
IO.popen(@cmd) do |f|
|
14
11
|
@pid = f.pid
|
15
12
|
f.each_line do |line|
|
@@ -22,7 +19,6 @@ class ThreadedRunner
|
|
22
19
|
end
|
23
20
|
end
|
24
21
|
end
|
25
|
-
Dir.chdir(pwd)
|
26
22
|
nil
|
27
23
|
wait_for(wait_for) if wait_for
|
28
24
|
end
|