kdeploy 1.1.2 → 1.1.3
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/cli.rb +15 -6
- data/lib/kdeploy/runner.rb +1 -1
- 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: fb093825d57b14ed8e603e760f2561b6b0e78d3ffb907efd11fbb0a6eddb069e
|
4
|
+
data.tar.gz: 679556c416416a010fca552c5dbbf656961dbbd8dc3a90180261a4f4addf9409
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e03245531beafbb2010b4e00a466aea4e5f756b60628ce2206355387046ae70a2ec0aca1ec1a0e7243a2b240d9cf569168b243a9e67cea637fef0f5e0f26428e
|
7
|
+
data.tar.gz: 129aa8dc62528d63bb99d0e60af780fc241691daafeb3fcb51940d4f2355902fca068d3bbcd60c0f2bd487228f859f58145f279c695c813b5f32d0f48ec4fb90
|
data/lib/kdeploy/cli.rb
CHANGED
@@ -188,7 +188,12 @@ module Kdeploy
|
|
188
188
|
puts pastel.bright_white("\n#{host.ljust(24)} : #{status}")
|
189
189
|
|
190
190
|
if %i[success changed].include?(result[:status])
|
191
|
+
shown = {}
|
191
192
|
result[:output].each do |step|
|
193
|
+
key = [step[:command], step[:output]].hash
|
194
|
+
next if shown[key]
|
195
|
+
|
196
|
+
shown[key] = true
|
192
197
|
if step[:command].to_s.start_with?('upload:')
|
193
198
|
puts pastel.green(" [upload] #{step[:command].sub('upload: ', '')}")
|
194
199
|
elsif step[:command].to_s.start_with?('upload_template:')
|
@@ -197,11 +202,11 @@ module Kdeploy
|
|
197
202
|
puts pastel.cyan(" [run] #{step[:command].to_s.lines.first.strip}")
|
198
203
|
if step[:output].is_a?(Hash) && step[:output][:stdout]
|
199
204
|
step[:output][:stdout].each_line do |line|
|
200
|
-
puts "
|
205
|
+
puts " #{line.rstrip}" unless line.strip.empty?
|
201
206
|
end
|
202
207
|
elsif step[:output].is_a?(String)
|
203
208
|
step[:output].each_line do |line|
|
204
|
-
puts "
|
209
|
+
puts " #{line.rstrip}" unless line.strip.empty?
|
205
210
|
end
|
206
211
|
end
|
207
212
|
end
|
@@ -222,13 +227,17 @@ module Kdeploy
|
|
222
227
|
# summary
|
223
228
|
puts pastel.cyan("\nPLAY RECAP #{'*' * 64}")
|
224
229
|
max_host_len = results.keys.map(&:length).max || 16
|
225
|
-
|
230
|
+
ok_w = 7
|
231
|
+
changed_w = 11
|
232
|
+
failed_w = 10
|
233
|
+
results.keys.sort.each do |host|
|
234
|
+
result = results[host]
|
226
235
|
ok = %i[success changed].include?(result[:status]) ? result[:output].size : 0
|
227
236
|
failed = result[:status] == :failed ? 1 : 0
|
228
237
|
changed = result[:status] == :changed ? result[:output].size : 0
|
229
|
-
ok_str = pastel.green("ok=#{ok.to_s.ljust(3)}")
|
230
|
-
changed_str = pastel.yellow("changed=#{changed.to_s.ljust(
|
231
|
-
failed_str = pastel.red("failed=#{failed.to_s.ljust(
|
238
|
+
ok_str = pastel.green("ok=#{ok.to_s.ljust(ok_w - 3)}")
|
239
|
+
changed_str = pastel.yellow("changed=#{changed.to_s.ljust(changed_w - 8)}")
|
240
|
+
failed_str = pastel.red("failed=#{failed.to_s.ljust(failed_w - 7)}")
|
232
241
|
line = "#{host.ljust(max_host_len)} : #{ok_str} #{changed_str} #{failed_str}"
|
233
242
|
if failed.positive?
|
234
243
|
puts pastel.red(line)
|
data/lib/kdeploy/runner.rb
CHANGED
@@ -55,7 +55,7 @@ module Kdeploy
|
|
55
55
|
output[:stdout].each_line { |line| puts " #{line.rstrip}" unless line.strip.empty? }
|
56
56
|
end
|
57
57
|
if output[:stderr] && !output[:stderr].empty?
|
58
|
-
output[:stderr].each_line { |line| puts pastel.
|
58
|
+
output[:stderr].each_line { |line| puts pastel.green(" #{line.rstrip}") unless line.strip.empty? }
|
59
59
|
end
|
60
60
|
result[:output] << { command: command[:command], output: output }
|
61
61
|
when :upload
|
data/lib/kdeploy/version.rb
CHANGED