From b7d8df503cf35b3048b273dc0cadb5ec39aac5e1 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 21 Feb 2017 17:32:18 -0600 Subject: Enable Style/MutableConstant --- lib/ci/ansi2html.rb | 6 +++--- lib/ci/api/helpers.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/ci') diff --git a/lib/ci/ansi2html.rb b/lib/ci/ansi2html.rb index 158a33f26fe..bab02268139 100644 --- a/lib/ci/ansi2html.rb +++ b/lib/ci/ansi2html.rb @@ -13,7 +13,7 @@ module Ci 5 => 'magenta', 6 => 'cyan', 7 => 'white', # not that this is gray in the dark (aka default) color table - } + }.freeze STYLE_SWITCHES = { bold: 0x01, @@ -21,7 +21,7 @@ module Ci underline: 0x04, conceal: 0x08, cross: 0x10, - } + }.freeze def self.convert(ansi, state = nil) Converter.new.convert(ansi, state) @@ -86,7 +86,7 @@ module Ci attr_accessor :offset, :n_open_tags, :fg_color, :bg_color, :style_mask - STATE_PARAMS = [:offset, :n_open_tags, :fg_color, :bg_color, :style_mask] + STATE_PARAMS = [:offset, :n_open_tags, :fg_color, :bg_color, :style_mask].freeze def convert(raw, new_state) reset_state diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb index 5ff25a3a9b2..654bddf7d18 100644 --- a/lib/ci/api/helpers.rb +++ b/lib/ci/api/helpers.rb @@ -1,7 +1,7 @@ module Ci module API module Helpers - BUILD_TOKEN_HEADER = "HTTP_BUILD_TOKEN" + BUILD_TOKEN_HEADER = "HTTP_BUILD_TOKEN".freeze BUILD_TOKEN_PARAM = :token UPDATE_RUNNER_EVERY = 10 * 60 -- cgit v1.2.3