lib/travis/cli/logs.rb in travis-1.5.6.travis.317.4 vs lib/travis/cli/logs.rb in travis-1.5.6.travis.319.4

- old
+ new

@@ -12,14 +12,22 @@ 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 ||= job(number) || error("no such job ##{number}") + info "displaying logs for #{color(job.inspect_info, [:bold, :info])}" job.log.body { |part| print interactive? ? encoded(part) : clean(part) } end private + + def job(number) + number = last_build.number + number if number.start_with? '.' + job = super(number) || build(number) || branch(number) + job = job.jobs.first if job.respond_to? :jobs + job + end def check_websocket require 'websocket-native' rescue LoadError => e raise e if e.respond_to?(:path) and e.path != 'websocket-native' \ No newline at end of file