Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
ac6e202f
Commit
ac6e202f
authored
Jan 26, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Make sure TraceReader uses Encoding.default_external"
This reverts commit
e9d8fc94
.
parent
e9d8fc94
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
15 deletions
+2
-15
lib/gitlab/ci/trace_reader.rb
lib/gitlab/ci/trace_reader.rb
+0
-1
spec/lib/gitlab/ci/trace_reader_spec.rb
spec/lib/gitlab/ci/trace_reader_spec.rb
+2
-14
No files found.
lib/gitlab/ci/trace_reader.rb
View file @
ac6e202f
...
@@ -42,7 +42,6 @@ module Gitlab
...
@@ -42,7 +42,6 @@ module Gitlab
end
end
chunks
.
join
.
lines
.
last
(
max_lines
).
join
chunks
.
join
.
lines
.
last
(
max_lines
).
join
.
force_encoding
(
Encoding
.
default_external
)
end
end
end
end
end
end
...
...
spec/lib/gitlab/ci/trace_reader_spec.rb
View file @
ac6e202f
...
@@ -11,25 +11,13 @@ describe Gitlab::Ci::TraceReader do
...
@@ -11,25 +11,13 @@ describe Gitlab::Ci::TraceReader do
last_lines
=
random_lines
last_lines
=
random_lines
expected
=
lines
.
last
(
last_lines
).
join
expected
=
lines
.
last
(
last_lines
).
join
result
=
subject
.
read
(
last_lines:
last_lines
)
expect
(
result
).
to
eq
(
expected
)
expect
(
subject
.
read
(
last_lines:
last_lines
)).
to
eq
(
expected
)
expect
(
result
.
encoding
).
to
eq
(
Encoding
.
default_external
)
end
end
end
end
it
'returns everything if trying to get too many lines'
do
it
'returns everything if trying to get too many lines'
do
result
=
build_subject
.
read
(
last_lines:
lines
.
size
*
2
)
expect
(
build_subject
.
read
(
last_lines:
lines
.
size
*
2
)).
to
eq
(
lines
.
join
)
expect
(
result
).
to
eq
(
lines
.
join
)
expect
(
result
.
encoding
).
to
eq
(
Encoding
.
default_external
)
end
it
'returns all contents if last_lines is not specified'
do
result
=
build_subject
.
read
expect
(
result
).
to
eq
(
lines
.
join
)
expect
(
result
.
encoding
).
to
eq
(
Encoding
.
default_external
)
end
end
it
'raises an error if not passing an integer for last_lines'
do
it
'raises an error if not passing an integer for last_lines'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment