Commit f6327f4e authored by Kev's avatar Kev

Replace double with single quotes for absense of string interpolation

parent fab7bd77
......@@ -108,9 +108,9 @@ module Gitlab
section_name = sanitize_section_name(section)
if action == "start"
if action == 'start'
handle_section_start(scanner, section_name, timestamp, options)
elsif action == "end"
elsif action == 'end'
handle_section_end(scanner, section_name, timestamp)
else
raise 'unsupported action'
......@@ -164,7 +164,7 @@ module Gitlab
# We need to remove the square brackets and split
# by comma to get a list of the options
options = raw_options[1...-1].split ","
options = raw_options[1...-1].split ','
# Now split each option by equals to separate
# each in the format [key, value]
......
......@@ -229,7 +229,7 @@ RSpec.describe Gitlab::Ci::Ansi2json do
expect(convert_json(trace)).to eq([
{
offset: 0,
content: [{ text: "section_end:1:2<div>hello</div>" }],
content: [{ text: 'section_end:1:2<div>hello</div>' }],
section: 'prepare-script',
section_header: true
},
......@@ -338,7 +338,7 @@ RSpec.describe Gitlab::Ci::Ansi2json do
expect(convert_json(trace)).to eq([
{
offset: 0,
content: [{ text: "hello" }],
content: [{ text: 'hello' }],
section: 'prepare-script',
section_header: true,
section_options: {
......@@ -365,7 +365,7 @@ RSpec.describe Gitlab::Ci::Ansi2json do
context 'with split word' do
let(:pre_text) { "\e[1mHello " }
let(:text) { "World" }
let(:text) { 'World' }
let(:lines) do
[
......@@ -381,7 +381,7 @@ RSpec.describe Gitlab::Ci::Ansi2json do
context 'with split word on second line' do
let(:pre_text) { "Good\nmorning " }
let(:text) { "World" }
let(:text) { 'World' }
let(:lines) do
[
......@@ -540,7 +540,7 @@ RSpec.describe Gitlab::Ci::Ansi2json do
end
describe 'trucates' do
let(:text) { "Hello World" }
let(:text) { 'Hello World' }
let(:stream) { StringIO.new(text) }
let(:subject) { described_class.convert(stream) }
......@@ -548,11 +548,11 @@ RSpec.describe Gitlab::Ci::Ansi2json do
stream.seek(3, IO::SEEK_SET)
end
it "returns truncated output" do
it 'returns truncated output' do
expect(subject.truncated).to be_truthy
end
it "does not append output" do
it 'does not append output' do
expect(subject.append).to be_falsey
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment