mescal-cli 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mescal-cli/cli.rb +8 -6
- data/lib/mescal-cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa001795f7ca4a25b4608f8a6849687c43bfdc10
|
4
|
+
data.tar.gz: f780fe6e43cc5a763e9f78c38a3ddbb5e1d77b3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9b9114960192527fb812e93bea65b86d15b298b940a99dddaf9af24c937e7e850c854b9330cd7369e308783455d074efe97b2acb016fa400fa9c25f2b46a461
|
7
|
+
data.tar.gz: 7ca21fe3a2155a7065dc61e3ab418200a09fc90808947fcdcfc35200e3333f3ad0ea14554cdd70d04440ab4821221c524f82957e7f764b4653389e16c41b05b3
|
data/lib/mescal-cli/cli.rb
CHANGED
@@ -23,7 +23,7 @@ module MescalCli
|
|
23
23
|
when "run" then run
|
24
24
|
when "ssh" then ssh
|
25
25
|
when "list" then list
|
26
|
-
when "kill" then kill
|
26
|
+
when "kill" then kill(ARGV[1])
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -55,7 +55,10 @@ module MescalCli
|
|
55
55
|
run = !task.done?
|
56
56
|
end
|
57
57
|
sleep(10)
|
58
|
-
|
58
|
+
rescue Interrupt
|
59
|
+
kill(task.id) if !!task
|
60
|
+
ensure
|
61
|
+
threads.each { |t| t.kill } if !!threads
|
59
62
|
end
|
60
63
|
|
61
64
|
def ssh
|
@@ -78,12 +81,11 @@ module MescalCli
|
|
78
81
|
end
|
79
82
|
end
|
80
83
|
|
81
|
-
def kill
|
82
|
-
|
83
|
-
if(killed = Task.kill(@client, @id))
|
84
|
+
def kill(id)
|
85
|
+
if(killed = Task.kill(@client, id))
|
84
86
|
puts "Killed #{killed}"
|
85
87
|
else
|
86
|
-
puts "Failed to kill #{
|
88
|
+
puts "Failed to kill #{id}"
|
87
89
|
end
|
88
90
|
end
|
89
91
|
|
data/lib/mescal-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mescal-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Kite
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|