diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 5755f4b8d749a566ba8f2aabbd76fbb9237ee163..e61b25721fb95ef25dc907ccd6dfe4ae204ab9fc 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -5,10 +5,10 @@ module API include Gitlab::Utils include Helpers::Pagination - SUDO_HEADER = "HTTP_SUDO".freeze - GITLAB_SHARED_SECRET_HEADER = "Gitlab-Shared-Secret".freeze + SUDO_HEADER = "HTTP_SUDO" + GITLAB_SHARED_SECRET_HEADER = "Gitlab-Shared-Secret" SUDO_PARAM = :sudo - API_USER_ENV = 'gitlab.api.user'.freeze + API_USER_ENV = 'gitlab.api.user' def declared_params(options = {}) options = { include_parent_namespaces: false }.merge(options) diff --git a/lib/api/helpers/runner.rb b/lib/api/helpers/runner.rb index 5b87eccf860b429b10749c1723cccc3e3a9509ca..41ee34a8fdf1c05bbf4e3ec54ff155a3789bf929 100644 --- a/lib/api/helpers/runner.rb +++ b/lib/api/helpers/runner.rb @@ -3,7 +3,7 @@ module API module Helpers module Runner - JOB_TOKEN_HEADER = 'HTTP_JOB_TOKEN'.freeze + JOB_TOKEN_HEADER = 'HTTP_JOB_TOKEN' JOB_TOKEN_PARAM = :token def runner_registration_token_valid? diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index aeaf61cda399b52705e201b47e665bf6d3307868..c03909592697694449e1a5895c24980305e6aa98 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -4,7 +4,7 @@ module Backup class Manager ARCHIVES_TO_BACKUP = %w[uploads builds artifacts pages lfs registry].freeze FOLDERS_TO_BACKUP = %w[repositories db].freeze - FILE_NAME_SUFFIX = '_gitlab_backup.tar'.freeze + FILE_NAME_SUFFIX = '_gitlab_backup.tar' attr_reader :progress diff --git a/lib/banzai/filter/color_filter.rb b/lib/banzai/filter/color_filter.rb index 6d9bdb9cbd3c108ce4effb6be2250c2160cbf165..0aca7441638b32d12666cd93b2e1522f927e14af 100644 --- a/lib/banzai/filter/color_filter.rb +++ b/lib/banzai/filter/color_filter.rb @@ -5,7 +5,7 @@ module Banzai # HTML filter that renders `color` followed by a color "chip". # class ColorFilter < HTML::Pipeline::Filter - COLOR_CHIP_CLASS = 'gfm-color_chip'.freeze + COLOR_CHIP_CLASS = 'gfm-color_chip' def call doc.css('code').each do |node| diff --git a/lib/banzai/filter/external_link_filter.rb b/lib/banzai/filter/external_link_filter.rb index fb721fe12b12be415950fca3c2803d36b0653118..67019454e44bdf8e2b6374180b547f1299b0775d 100644 --- a/lib/banzai/filter/external_link_filter.rb +++ b/lib/banzai/filter/external_link_filter.rb @@ -5,8 +5,8 @@ module Banzai # HTML Filter to modify the attributes of external links class ExternalLinkFilter < HTML::Pipeline::Filter SCHEMES = ['http', 'https', nil].freeze - RTLO = "\u202E".freeze - ENCODED_RTLO = '%E2%80%AE'.freeze + RTLO = "\u202E" + ENCODED_RTLO = '%E2%80%AE' def call links.each do |node| diff --git a/lib/banzai/filter/footnote_filter.rb b/lib/banzai/filter/footnote_filter.rb index de133774dfa7fbdbbdb263e3ea4f3b4034c4173d..5474242e03ce0a418f581385f86039f6640815cb 100644 --- a/lib/banzai/filter/footnote_filter.rb +++ b/lib/banzai/filter/footnote_filter.rb @@ -17,8 +17,8 @@ module Banzai # class FootnoteFilter < HTML::Pipeline::Filter INTEGER_PATTERN = /\A\d+\z/.freeze - FOOTNOTE_ID_PREFIX = 'fn'.freeze - FOOTNOTE_LINK_ID_PREFIX = 'fnref'.freeze + FOOTNOTE_ID_PREFIX = 'fn' + FOOTNOTE_LINK_ID_PREFIX = 'fnref' FOOTNOTE_LI_REFERENCE_PATTERN = /\A#{FOOTNOTE_ID_PREFIX}\d+\z/.freeze FOOTNOTE_LINK_REFERENCE_PATTERN = /\A#{FOOTNOTE_LINK_ID_PREFIX}\d+\z/.freeze FOOTNOTE_START_NUMBER = 1 diff --git a/lib/banzai/filter/math_filter.rb b/lib/banzai/filter/math_filter.rb index 8dd5a8979c86d4cb77b81d13f0c1c1dc002a8286..c915f0ee35be104ed908d058e45a717dae66afa5 100644 --- a/lib/banzai/filter/math_filter.rb +++ b/lib/banzai/filter/math_filter.rb @@ -11,14 +11,14 @@ module Banzai # class MathFilter < HTML::Pipeline::Filter # Attribute indicating inline or display math. - STYLE_ATTRIBUTE = 'data-math-style'.freeze + STYLE_ATTRIBUTE = 'data-math-style' # Class used for tagging elements that should be rendered - TAG_CLASS = 'js-render-math'.freeze + TAG_CLASS = 'js-render-math' - INLINE_CLASSES = "code math #{TAG_CLASS}".freeze + INLINE_CLASSES = "code math #{TAG_CLASS}" - DOLLAR_SIGN = '$'.freeze + DOLLAR_SIGN = '$' def call doc.css('code').each do |code| diff --git a/lib/banzai/filter/suggestion_filter.rb b/lib/banzai/filter/suggestion_filter.rb index 3d40abfc5400e98dc840a60c6ce3d6d85867740b..ae093580001a9141e33192374ae5e8d84d8a80fd 100644 --- a/lib/banzai/filter/suggestion_filter.rb +++ b/lib/banzai/filter/suggestion_filter.rb @@ -5,7 +5,7 @@ module Banzai module Filter class SuggestionFilter < HTML::Pipeline::Filter # Class used for tagging elements that should be rendered - TAG_CLASS = 'js-render-suggestion'.freeze + TAG_CLASS = 'js-render-suggestion' def call return doc unless suggestions_filter_enabled? diff --git a/lib/banzai/filter/syntax_highlight_filter.rb b/lib/banzai/filter/syntax_highlight_filter.rb index 9b66759a5fbba9bdc7974b77dd402941217dd8ab..c1a5f33c2258d6a274a506aba4a037fa255941f8 100644 --- a/lib/banzai/filter/syntax_highlight_filter.rb +++ b/lib/banzai/filter/syntax_highlight_filter.rb @@ -10,8 +10,8 @@ module Banzai class SyntaxHighlightFilter < HTML::Pipeline::Filter include OutputSafety - PARAMS_DELIMITER = ':'.freeze - LANG_PARAMS_ATTR = 'data-lang-params'.freeze + PARAMS_DELIMITER = ':' + LANG_PARAMS_ATTR = 'data-lang-params' def call doc.search('pre:not([data-math-style]) > code').each do |node| diff --git a/lib/banzai/issuable_extractor.rb b/lib/banzai/issuable_extractor.rb index 341dbb74fe0e35661038c8a364ffde60af4f53a8..31bb4f2e01c92c723b7f7f8a6720a076e0940274 100644 --- a/lib/banzai/issuable_extractor.rb +++ b/lib/banzai/issuable_extractor.rb @@ -11,8 +11,8 @@ module Banzai class IssuableExtractor attr_reader :context - ISSUE_REFERENCE_TYPE = '@data-reference-type="issue"'.freeze - MERGE_REQUEST_REFERENCE_TYPE = '@data-reference-type="merge_request"'.freeze + ISSUE_REFERENCE_TYPE = '@data-reference-type="issue"' + MERGE_REQUEST_REFERENCE_TYPE = '@data-reference-type="merge_request"' # context - An instance of Banzai::RenderContext. def initialize(context) diff --git a/lib/bitbucket/connection.rb b/lib/bitbucket/connection.rb index 0041634f9e356da203ed7e8bfa21890d51c0101b..9937236fc445c748a540318f7379d2b2c5d80e53 100644 --- a/lib/bitbucket/connection.rb +++ b/lib/bitbucket/connection.rb @@ -2,8 +2,8 @@ module Bitbucket class Connection - DEFAULT_API_VERSION = '2.0'.freeze - DEFAULT_BASE_URI = 'https://api.bitbucket.org/'.freeze + DEFAULT_API_VERSION = '2.0' + DEFAULT_BASE_URI = 'https://api.bitbucket.org/' DEFAULT_QUERY = {}.freeze attr_reader :expires_at, :expires_in, :refresh_token, :token diff --git a/lib/gitlab.rb b/lib/gitlab.rb index e8b938e46b18ee42b58a63ebde322077424e3428..582541c06795bb6c3ebf76ce8bdebe081a9f77bf 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -29,13 +29,13 @@ module Gitlab if result.status.success? result.stdout.chomp.freeze else - "Unknown".freeze + "Unknown" end end end end - COM_URL = 'https://gitlab.com'.freeze + COM_URL = 'https://gitlab.com' APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}.freeze SUBDOMAIN_REGEX = %r{\Ahttps://[a-z0-9]+\.gitlab\.com\z}.freeze VERSION = File.read(root.join("VERSION")).strip.freeze diff --git a/lib/google_api/cloud_platform/client.rb b/lib/google_api/cloud_platform/client.rb index b5f99ea012bc79ba6ccaf6c8dcf0a0d2ac27264e..9f01a3f97cee3adcc4d24fa3e5c026b4034a5335 100644 --- a/lib/google_api/cloud_platform/client.rb +++ b/lib/google_api/cloud_platform/client.rb @@ -8,9 +8,9 @@ require 'google/apis/cloudresourcemanager_v1' module GoogleApi module CloudPlatform class Client < GoogleApi::Auth - SCOPE = 'https://www.googleapis.com/auth/cloud-platform'.freeze + SCOPE = 'https://www.googleapis.com/auth/cloud-platform' LEAST_TOKEN_LIFE_TIME = 10.minutes - CLUSTER_MASTER_AUTH_USERNAME = 'admin'.freeze + CLUSTER_MASTER_AUTH_USERNAME = 'admin' class << self def session_key_for_token diff --git a/lib/quality/test_level.rb b/lib/quality/test_level.rb index 60d79b52680facf0f114e9784593ea8026a006c5..a65657dadd0167b5fdc75cc73feddb0e49dea7ee 100644 --- a/lib/quality/test_level.rb +++ b/lib/quality/test_level.rb @@ -53,7 +53,7 @@ module Quality end def pattern(level) - @patterns[level] ||= "#{prefix}spec/{#{TEST_LEVEL_FOLDERS.fetch(level).join(',')}}{,/**/}*_spec.rb".freeze + @patterns[level] ||= "#{prefix}spec/{#{TEST_LEVEL_FOLDERS.fetch(level).join(',')}}{,/**/}*_spec.rb" end def regexp(level) diff --git a/lib/system_check/app/init_script_up_to_date_check.rb b/lib/system_check/app/init_script_up_to_date_check.rb index 569c41df6e4c212b7af250b092db4d9a9a1710de..7e2e168af8bb51cdb41055349e03f090e85b27cd 100644 --- a/lib/system_check/app/init_script_up_to_date_check.rb +++ b/lib/system_check/app/init_script_up_to_date_check.rb @@ -3,7 +3,7 @@ module SystemCheck module App class InitScriptUpToDateCheck < SystemCheck::BaseCheck - SCRIPT_PATH = '/etc/init.d/gitlab'.freeze + SCRIPT_PATH = '/etc/init.d/gitlab' set_name 'Init script up-to-date?' set_skip_reason 'skipped (omnibus-gitlab has no init script)' diff --git a/lib/system_check/app/redis_version_check.rb b/lib/system_check/app/redis_version_check.rb index 890f8b44d13ba3c3800e162d0870eafb4099bf3f..da695cc9272ca008ea8a4637982afda82b25540a 100644 --- a/lib/system_check/app/redis_version_check.rb +++ b/lib/system_check/app/redis_version_check.rb @@ -3,7 +3,7 @@ module SystemCheck module App class RedisVersionCheck < SystemCheck::BaseCheck - MIN_REDIS_VERSION = '2.8.0'.freeze + MIN_REDIS_VERSION = '2.8.0' set_name "Redis version >= #{MIN_REDIS_VERSION}?" def check? diff --git a/lib/tasks/gitlab/graphql.rake b/lib/tasks/gitlab/graphql.rake index c53d55ceea2bf349acb034b776a28dee227d3c98..fd8df015903020917656dc1f20fd6776f9bd29ff 100644 --- a/lib/tasks/gitlab/graphql.rake +++ b/lib/tasks/gitlab/graphql.rake @@ -3,8 +3,8 @@ return if Rails.env.production? namespace :gitlab do - OUTPUT_DIR = Rails.root.join("doc/api/graphql/reference").freeze - TEMPLATES_DIR = 'lib/gitlab/graphql/docs/templates/'.freeze + OUTPUT_DIR = Rails.root.join("doc/api/graphql/reference") + TEMPLATES_DIR = 'lib/gitlab/graphql/docs/templates/' namespace :graphql do desc 'GitLab | Generate GraphQL docs' diff --git a/lib/tasks/gitlab/uploads/legacy.rake b/lib/tasks/gitlab/uploads/legacy.rake index 18fb8afe455ed6bcbacc8d023bff6a36f475f5ff..2eeb694d3416353a759986663785687649f36f27 100644 --- a/lib/tasks/gitlab/uploads/legacy.rake +++ b/lib/tasks/gitlab/uploads/legacy.rake @@ -11,7 +11,7 @@ namespace :gitlab do include ::EachBatch end - migration = 'LegacyUploadsMigrator'.freeze + migration = 'LegacyUploadsMigrator' batch_size = 5000 delay_interval = 5.minutes.to_i