kommando 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/examples/async.rb +13 -0
- data/examples/kill.rb +13 -0
- data/lib/kommando.rb +15 -0
- data/lib/kommando/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acfba23f49067f3a5685780644f56fb5369e4836
|
4
|
+
data.tar.gz: 4773b9387220563a69f13fb3f7c3e37a6c3c4639
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40d0a3852ff6711cc36dbb422356f8c616f48348ce764a9ecc9d8cb781a528e456715545e089cd39f6ccde3b7b6823f9d36398398652fbeba02abae9db9ecfb5
|
7
|
+
data.tar.gz: a9bae7941b46c95b7d167f8a6c94078927b7a5d51c1fca5c40a450c93d641e97533eca7270e4eab0adf45d395b9c4af43caf61f9b67392f4a036b356cfe00301
|
data/CHANGELOG.md
CHANGED
data/examples/async.rb
ADDED
data/examples/kill.rb
ADDED
data/lib/kommando.rb
CHANGED
@@ -27,6 +27,19 @@ class Kommando
|
|
27
27
|
@executed = false
|
28
28
|
|
29
29
|
@retry = opts[:retry] == true
|
30
|
+
|
31
|
+
@thread = nil
|
32
|
+
@pid = nil
|
33
|
+
end
|
34
|
+
|
35
|
+
def run_async
|
36
|
+
@thread = Thread.new do
|
37
|
+
run
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def kill
|
42
|
+
Process.kill('KILL', @pid)
|
30
43
|
end
|
31
44
|
|
32
45
|
def run
|
@@ -41,6 +54,8 @@ class Kommando
|
|
41
54
|
return run
|
42
55
|
end
|
43
56
|
|
57
|
+
@pid = pid
|
58
|
+
|
44
59
|
if @output_file
|
45
60
|
stdout_file = File.open @output_file, 'w'
|
46
61
|
stdout_file.sync = true
|
data/lib/kommando/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kommando
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matti Paksula
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -104,7 +104,9 @@ files:
|
|
104
104
|
- bin/setup
|
105
105
|
- bin/stress
|
106
106
|
- bin/version
|
107
|
+
- examples/async.rb
|
107
108
|
- examples/exit.rb
|
109
|
+
- examples/kill.rb
|
108
110
|
- examples/live_output.rb
|
109
111
|
- examples/ping.rb
|
110
112
|
- examples/stdout_to_file.rb
|