From c42ca8aa12faa207e2e637803e2705a65a393d34 Mon Sep 17 00:00:00 2001 From: pvincent Date: Mon, 10 Jun 2024 13:38:36 +0400 Subject: [PATCH] started before:1 --- lib/formatters/ansi_filter.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/formatters/ansi_filter.rb b/lib/formatters/ansi_filter.rb index fdafa82..0859989 100644 --- a/lib/formatters/ansi_filter.rb +++ b/lib/formatters/ansi_filter.rb @@ -19,11 +19,15 @@ module AnsiFilter log.message.chomp!('') if log.message.starts_with?('Started') rails = '╓─╖' - rails = "╓#{$memory}╖" if $memory - log.dimensions = AnsiDimensions.new(rails:) + before = 1 + if $memory + rails = "╓#{$memory}╖" + before = 0 + end + log.dimensions = AnsiDimensions.new(rails:, before:) $memory = nil elsif log.message.starts_with?('Completed 2') - log.dimensions = AnsiDimensions.new(rails: TERMINUS_STRING, after: 2) + log.dimensions = AnsiDimensions.new(rails: TERMINUS_STRING, after: 1) elsif log.message.starts_with?('Completed 3') $memory = '║' log.dimensions = AnsiDimensions.new(rails: "╙#{$memory}╜") @@ -35,7 +39,7 @@ module AnsiFilter elsif log.exception log.dimensions = AnsiDimensions.new( rails: "╓#{draw_fatal(log.level.to_s.chr.upcase)}╖", - after: 2, + after: 1, terminus: true ) end