kdeploy 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/kdeploy/executor.rb +14 -7
- data/lib/kdeploy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83c00c00789f233f007546ca34305f421da37baf99cdbae2f025335f1be06c19
|
4
|
+
data.tar.gz: 6bf1d8e927c30f0e11d11aa14e1290ff8e7d224adb53a884fe621daf5776d7b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6827b3c353a608b1c554cb5ddd4c32909a938dd5125b9ab0175312b7a8b41b68830c578e11f6616ecb9fb884516a59eede85ecd8df321319334f49952d688761
|
7
|
+
data.tar.gz: fe23ae3d9b659ae1124dad9b8c5804c07884bdd463315f96aac4a988a29f9c86035c6f73fc74ae40846fbb3e747d597f89af9d79751dbbf5b4e7446835ed24fd
|
data/lib/kdeploy/executor.rb
CHANGED
@@ -19,15 +19,22 @@ module Kdeploy
|
|
19
19
|
stdout = String.new
|
20
20
|
stderr = String.new
|
21
21
|
|
22
|
-
ssh.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
ssh.open_channel do |channel|
|
23
|
+
channel.exec(command) do |_ch, success|
|
24
|
+
raise "Could not execute command: #{command}" unless success
|
25
|
+
|
26
|
+
channel.on_data do |_ch, data|
|
27
|
+
print data # 实时输出
|
28
|
+
stdout << data
|
29
|
+
end
|
30
|
+
|
31
|
+
channel.on_extended_data do |_ch, _type, data|
|
32
|
+
print data # 实时输出
|
33
|
+
stderr << data
|
34
|
+
end
|
28
35
|
end
|
29
36
|
end
|
30
|
-
|
37
|
+
ssh.loop
|
31
38
|
{
|
32
39
|
stdout: stdout.strip,
|
33
40
|
stderr: stderr.strip,
|
data/lib/kdeploy/version.rb
CHANGED