class Dockerspec::Builder::Logger::CI
A {Dockerspec::Builder} logger recommended for CI
environments with output timeouts.
Public Class Methods
new(output = STDOUT)
click to toggle source
Creates a CI
logger instance.
@param output [IO] the output stream.
@api public
Calls superclass method
# File lib/dockerspec/builder/logger/ci.rb, line 37 def initialize(output = STDOUT) super @buffer = '' @skip = false end
Protected Instance Methods
print_stream(stream)
click to toggle source
Print a Docker build stream in the proper format.
@param stream [String] The stream in raw.
@return void
@api private
# File lib/dockerspec/builder/logger/ci.rb, line 54 def print_stream(stream) if stream =~ /^Step / @buffer = stream @skip = true else @buffer += stream @skip = false if stream =~ /^ ---> (Running in|\[Warning\]) / end return if @skip @output.puts @buffer @buffer = '' end