Sha256: a98f96d9a79be4ff93dab4b0c427c6500622d9c0d63aff975d44f66d3632e198
Contents?: true
Size: 788 Bytes
Versions: 15
Compression:
Stored size: 788 Bytes
Contents
require 'travis/cli' require 'travis/tools/safe_string' require 'travis/tools/system' module Travis module CLI class Logs < RepoCommand description "streams test logs" def setup super check_websocket end include Tools::SafeString def run(number = last_build.number) error "##{number} is not a job, try #{number}.1" unless job = job(number) job.log.body { |part| print interactive? ? encoded(part) : clean(part) } end private def check_websocket require 'websocket-native' rescue LoadError => e raise e if e.respond_to?(:path) and e.path != 'websocket-native' info "speed up log streaming by installing the websocket-native gem" end end end end
Version data entries
15 entries across 15 versions & 1 rubygems