mediakit 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mediakit/drivers.rb +7 -2
- data/lib/mediakit/utils/process_runner.rb +1 -1
- data/lib/mediakit/version.rb +1 -1
- 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: ee3e85010075e5c0cc67eb59f16716b958a69d72
|
4
|
+
data.tar.gz: 51f35a2e74284eff387a63e51970626d8b56272b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40389b44e91057cba2e806a69aa4b361c7b8d7758b9d4217cb985c6047d4b2db0eaf6acaa0e3ae84971a15f4d926a7623beb1a034f2d0556b452aa8a5d119682
|
7
|
+
data.tar.gz: 21c2f0a2a669050440b07a83cfef0aef310b3d520e2b5e5315bf9f91bebd402d18062cc3a74e651233c6c103bf82cf62fc887cb8b108dd7ddf33da7a174460d5
|
data/lib/mediakit/drivers.rb
CHANGED
@@ -9,6 +9,7 @@ module Mediakit
|
|
9
9
|
|
10
10
|
class Base
|
11
11
|
attr_reader(:bin)
|
12
|
+
|
12
13
|
def initialize(bin)
|
13
14
|
@bin = bin
|
14
15
|
end
|
@@ -63,7 +64,7 @@ module Mediakit
|
|
63
64
|
end
|
64
65
|
|
65
66
|
class FakeDriver < PopenDriver
|
66
|
-
attr_accessor(:last_command, :output, :error_output, :exit_status)
|
67
|
+
attr_accessor(:last_command, :output, :error_output, :exit_status, :timeout, :nice)
|
67
68
|
|
68
69
|
# fake driver for testing
|
69
70
|
#
|
@@ -75,11 +76,15 @@ module Mediakit
|
|
75
76
|
# @return [String] stdout output
|
76
77
|
def run(*args)
|
77
78
|
@last_command = command(*args)
|
79
|
+
|
80
|
+
options, rest_args = parse_options(args.dup)
|
81
|
+
@timeout = options[:timeout] if options[:timeout]
|
82
|
+
@nice = options[:nice] if options[:nice]
|
78
83
|
[(output || ''), (error_output || ''), (exit_status || true)]
|
79
84
|
end
|
80
85
|
|
81
86
|
def reset
|
82
|
-
@last_command, @output, @error_output, @exit_status = nil
|
87
|
+
@last_command, @output, @error_output, @exit_status, @timeout, @nice = nil
|
83
88
|
end
|
84
89
|
end
|
85
90
|
|
data/lib/mediakit/version.rb
CHANGED