Commit graph

26 commits

Author SHA1 Message Date
Shinya Maeda
f9c9daac78 Resolve static analysys. Use until instead of negative while 2017-05-25 01:35:40 +09:00
Shinya Maeda
cf4ab10d71 Adopt ayufan script 2017-05-24 20:20:20 +09:00
Shinya Maeda
a16387486a put force_encoding in def reverse_line 2017-05-24 20:10:15 +09:00
Shinya Maeda
22f1d2a1c4 Append gurad clause. remove unless debris.empty 2017-05-24 20:10:14 +09:00
Shinya Maeda
72b0af2c4c Avoid tap. Use unless&empty. 2017-05-24 20:10:14 +09:00
Shinya Maeda
fdcd2f192d Improve calc_read_size 2017-05-24 20:10:14 +09:00
Shinya Maeda
8c1b07e0cc Optimize reverse_line 2017-05-24 20:10:14 +09:00
Shinya Maeda
6be609dd64 much better 2017-05-24 20:10:14 +09:00
Shinya Maeda
dddfa28eec Refer reverse_line from read_last_lines 2017-05-24 20:10:14 +09:00
Shinya Maeda
318b464072 Use force_encoding(regex.encoding) 2017-05-24 20:10:14 +09:00
Shinya Maeda
a6f6056c62 Use force_encoding when regex contains UTF-8 char 2017-05-24 20:10:14 +09:00
Shinya Maeda
b9950c22b3 Use each_line. Avoid comparison of partial. Add UTF-8 spec. 2017-05-24 20:10:14 +09:00
Shinya Maeda
3d11b7d8e2 Fix reverse_line from chunk based 2017-05-24 20:10:14 +09:00
Shinya Maeda
ddf67424ec Fix while true 2017-05-24 20:10:14 +09:00
Shinya Maeda
6018afa89f Add reverse_line 2017-05-24 20:10:14 +09:00
Filipa Lacerda
b67bb566b3 Improves support for long build traces: 2017-04-18 12:27:10 +00:00
Lin Jen-Shin
fb60c6187d Use &. because rubocop. Seriously I don't think this makes sense 2017-04-18 17:33:17 +08:00
Lin Jen-Shin
b07da07c82 Just enforce the output encoding for Ansi2html
Fixes https://sentry.gitlap.com/gitlab/gitlabcom/issues/27545/
2017-04-18 17:12:06 +08:00
Lin Jen-Shin
9350b9064c Set the encoding in c'tor and explain why it's fine 2017-04-17 17:52:15 +08:00
Lin Jen-Shin
e7d3fe44f6 Only set the encoding before passing to Ansi2html 2017-04-17 17:10:41 +08:00
Lin Jen-Shin
c26b126502 Make sure @stream.each_line would tag Encoding.default_external 2017-04-17 15:53:09 +08:00
Lin Jen-Shin
ee3b0c3a9a Make sure we're giving Encoding.default_external 2017-04-17 14:30:42 +08:00
Lin Jen-Shin
b07b8a5f3e Don't seek at all if the log is small anyway
then it's fine to skip the first line because
it won't be very noticeable
2017-04-13 22:07:37 +08:00
Lin Jen-Shin
faa5dffbcc After Trace#limit, we seek to the next line in case
of breaking ANSI sequence or Unicode
2017-04-13 21:44:26 +08:00
Z.J. van de Weg
23fbbe0c92 Return nil as coverage instead of a File object
Given a valid pipeline job, and a regex which wouldn't match to a jobs
trace, the stream of the trace would return the File object. This was
not the case when it matched a value, as that would have been return
from the block.

Now the `extract_coverage` method returns `nil` if no match was found.
2017-04-12 12:03:39 +02:00
Kamil Trzciński
828d81ee1f Optimise trace handling code to use streaming instead of full read 2017-04-06 16:20:27 +00:00