kdeploy 1.2.12 → 1.2.13
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/command_executor.rb +0 -1
- data/lib/kdeploy/output_formatter.rb +20 -11
- 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: ee6777b5bafc0dabf9a3b77328921ab0336a950f39074c557d5b20ffd2eeb5d9
|
|
4
|
+
data.tar.gz: ac8b53ce8ac327b3e046d833a06200571bdad1e6a2e1a858f7943f1a933c9edc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2f6220b559ec101c3edf247e91c4e040dc8342c101cfd547e67206761a4bb77510220505a3f83b352f987442686bbb6861adf91f2d251466e2be6d5bc391edd
|
|
7
|
+
data.tar.gz: f6b4f307065412c7a42f61acdf6ca69ebead8c895f59647d5fdcf6e7fd05c8d5da07b975052b549798dfd39f55218f3bd61725e9f8fd2a4a6ca94da7495518ae
|
|
@@ -168,24 +168,33 @@ module Kdeploy
|
|
|
168
168
|
result = []
|
|
169
169
|
return result unless output
|
|
170
170
|
|
|
171
|
-
# Handle Hash with stdout/stderr keys
|
|
172
171
|
if output.is_a?(Hash)
|
|
173
|
-
|
|
174
|
-
if output.key?(:stdout)
|
|
175
|
-
stdout = output[:stdout]
|
|
176
|
-
format_stdout_lines(stdout, result) if stdout && !stdout.to_s.strip.empty?
|
|
177
|
-
end
|
|
178
|
-
# Check for stderr key
|
|
179
|
-
if output.key?(:stderr)
|
|
180
|
-
stderr = output[:stderr]
|
|
181
|
-
format_stderr_lines(stderr, result) if stderr && !stderr.to_s.strip.empty?
|
|
182
|
-
end
|
|
172
|
+
format_hash_output(output, result)
|
|
183
173
|
elsif output.is_a?(String) && !output.strip.empty?
|
|
184
174
|
format_stdout_lines(output, result)
|
|
185
175
|
end
|
|
186
176
|
result
|
|
187
177
|
end
|
|
188
178
|
|
|
179
|
+
def format_hash_output(output, result)
|
|
180
|
+
format_stdout_from_hash(output, result)
|
|
181
|
+
format_stderr_from_hash(output, result)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def format_stdout_from_hash(output, result)
|
|
185
|
+
return unless output.key?(:stdout)
|
|
186
|
+
|
|
187
|
+
stdout = output[:stdout]
|
|
188
|
+
format_stdout_lines(stdout, result) if stdout && !stdout.to_s.strip.empty?
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
def format_stderr_from_hash(output, result)
|
|
192
|
+
return unless output.key?(:stderr)
|
|
193
|
+
|
|
194
|
+
stderr = output[:stderr]
|
|
195
|
+
format_stderr_lines(stderr, result) if stderr && !stderr.to_s.strip.empty?
|
|
196
|
+
end
|
|
197
|
+
|
|
189
198
|
def format_stdout_lines(stdout, result)
|
|
190
199
|
return result if stdout.nil? || stdout.to_s.empty?
|
|
191
200
|
|
data/lib/kdeploy/version.rb
CHANGED