Browse Source

started before:1

main
pvincent 7 months ago
parent
commit
c42ca8aa12
  1. 12
      lib/formatters/ansi_filter.rb

12
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

Loading…
Cancel
Save