dev_commands 0.0.47 → 0.0.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/timeout.rb +2 -2
- 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: 6e0f0d2e0a3b36ebd48e1726e7431b525583aea3
|
4
|
+
data.tar.gz: 23691a160a2649f3c66f6ce1be8918fbeacb4afc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 631c584ede8dd8e3a5f22728145255652834469329a510fa4d35100912acf538a73df4079f2037f7af44a90b801a1b37cf7fc1cbcb03c3a606d66786101cc103
|
7
|
+
data.tar.gz: 3cff0d686da04b46cc9278085300ce5f40e43bf52a771fd1cb7b74d882dc4daa92ee38c0acf83c47754efefaa8f17ed8a73d058b7d88889e2405f80a0ed7736f
|
data/lib/timeout.rb
CHANGED
@@ -11,12 +11,12 @@
|
|
11
11
|
#
|
12
12
|
# If you've got a cleaner way of doing this, I'd be interested to see it.
|
13
13
|
# If you think you can do it with Ruby's Timeout module, think again.
|
14
|
-
def run_with_timeout(command, timeout, tick)
|
14
|
+
def run_with_timeout(directory,command, timeout, tick)
|
15
15
|
output = ''
|
16
16
|
exit_code=1
|
17
17
|
begin
|
18
18
|
# Start task in another thread, which spawns a process
|
19
|
-
stdin, stderrout, thread = Open3.popen2e(command)
|
19
|
+
stdin, stderrout, thread = Open3.popen2e(command, :chdir=>directory)
|
20
20
|
# Get the pid of the spawned process
|
21
21
|
pid = thread[:pid]
|
22
22
|
start = Time.now
|