From 151aecc4d8f2598ccc6d5b313e6ef1deb5202ef9 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 18 Mar 2023 14:59:34 -0300 Subject: [PATCH] feat: mostrar una tabla con el resumen en la consola --- app/jobs/deploy_job.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/jobs/deploy_job.rb b/app/jobs/deploy_job.rb index ccad1c5c..5634108d 100644 --- a/app/jobs/deploy_job.rb +++ b/app/jobs/deploy_job.rb @@ -52,6 +52,16 @@ class DeployJob < ApplicationJob urls: d.respond_to?(:urls) ? d.urls : [d.url].compact } end + + return unless @output + + puts (Terminal::Table.new do |t| + t << (%w[type] + @deployed.values.first.keys) + t.add_separator + @deployed.each do |type, row| + t << ([type.to_s] + row.values) + end + end) rescue DeployTimedOutException => e notify_exception e ensure