Commit c8b04fe4 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'frozen-string-ee-lib-gitlab' into 'master'

Enable some frozen string in ee/lib

See merge request gitlab-org/gitlab-ee!8989
parents b25add07 756cd2cd
---
title: Enable some frozen string in ee/lib
merge_request:
author:
type: performance
# frozen_string_literal: true
module Gitlab module Gitlab
module Auth module Auth
module GroupSaml module GroupSaml
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Auth module Auth
module GroupSaml module GroupSaml
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Auth module Auth
module GroupSaml module GroupSaml
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Auth module Auth
module GroupSaml module GroupSaml
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Auth module Auth
module GroupSaml module GroupSaml
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Auth module Auth
module GroupSaml module GroupSaml
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Auth module Auth
module GroupSaml module GroupSaml
......
# frozen_string_literal: true
module Gitlab module Gitlab
class AuthorityAnalyzer class AuthorityAnalyzer
COMMITS_TO_CONSIDER = 25 COMMITS_TO_CONSIDER = 25
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Chat module Chat
module Responder module Responder
......
# frozen_string_literal: true
module Gitlab module Gitlab
class CustomFileTemplates class CustomFileTemplates
include ::Gitlab::Utils::StrongMemoize include ::Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
# rubocop:disable GitlabSecurity/PublicSend # rubocop:disable GitlabSecurity/PublicSend
module Gitlab module Gitlab
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module LoadBalancing module LoadBalancing
......
# frozen_string_literal: true
# rubocop:disable GitlabSecurity/PublicSend # rubocop:disable GitlabSecurity/PublicSend
module Gitlab module Gitlab
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module LoadBalancing module LoadBalancing
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module LoadBalancing module LoadBalancing
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module LoadBalancing module LoadBalancing
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module LoadBalancing module LoadBalancing
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module LoadBalancing module LoadBalancing
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Database module Database
module LoadBalancing module LoadBalancing
......
# frozen_string_literal: true
# This file is required by `bin/elastic_repo_indexer` as well as from within # This file is required by `bin/elastic_repo_indexer` as well as from within
# Rails, so needs to explicitly require its dependencies # Rails, so needs to explicitly require its dependencies
require 'elasticsearch' require 'elasticsearch'
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Elastic module Elastic
class Helper class Helper
......
# frozen_string_literal: true
# Create a separate process, which does not load the Rails environment, to index # Create a separate process, which does not load the Rails environment, to index
# each repository. This prevents memory leaks in the indexer from affecting the # each repository. This prevents memory leaks in the indexer from affecting the
# rest of the application. # rest of the application.
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Elastic module Elastic
# Always prefer to use the full class namespace when specifying a # Always prefer to use the full class namespace when specifying a
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Elastic module Elastic
class SearchResults class SearchResults
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Elastic module Elastic
class SnippetSearchResults < ::Gitlab::SnippetSearchResults class SnippetSearchResults < ::Gitlab::SnippetSearchResults
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class BaseRequest class BaseRequest
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class CronManager class CronManager
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module DatabaseTasks module DatabaseTasks
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class EventGapTracking class EventGapTracking
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module Fdw module Fdw
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module GeoTasks module GeoTasks
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class HealthCheck class HealthCheck
...@@ -20,9 +22,13 @@ module Gitlab ...@@ -20,9 +22,13 @@ module Gitlab
return 'The Geo database is not configured to use Foreign Data Wrapper.' unless Gitlab::Geo::Fdw.enabled? return 'The Geo database is not configured to use Foreign Data Wrapper.' unless Gitlab::Geo::Fdw.enabled?
unless Gitlab::Geo::Fdw.fdw_up_to_date? unless Gitlab::Geo::Fdw.fdw_up_to_date?
return "The Geo database has an outdated FDW remote schema.".tap do |output| output = "The Geo database has an outdated FDW remote schema."
output << " It contains #{Gitlab::Geo::Fdw.count_tables} of #{Gitlab::Geo::Fdw.gitlab_tables.count} expected tables." unless Gitlab::Geo::Fdw.count_tables_match?
unless Gitlab::Geo::Fdw.count_tables_match?
output = "#{output} It contains #{Gitlab::Geo::Fdw.count_tables} of #{Gitlab::Geo::Fdw.gitlab_tables.count} expected tables."
end end
return output
end end
'' ''
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class JwtRequestDecoder class JwtRequestDecoder
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
# This class is responsible for: # This class is responsible for:
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogCursor module LogCursor
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module LogHelpers module LogHelpers
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class Logger < ::Gitlab::JsonLogger class Logger < ::Gitlab::JsonLogger
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
module ProjectLogHelpers module ProjectLogHelpers
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class RepoSyncRequest < BaseRequest class RepoSyncRequest < BaseRequest
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class Transfer class Transfer
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Geo module Geo
class TransferRequest < BaseRequest class TransferRequest < BaseRequest
......
# frozen_string_literal: true
module Gitlab module Gitlab
class GeoLogger < Gitlab::Logger class GeoLogger < Gitlab::Logger
def self.file_name_noext def self.file_name_noext
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Jira module Jira
module Dvcs module Dvcs
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Jira module Jira
class Middleware class Middleware
......
# frozen_string_literal: true
# This calls helps to authenticate to Kerberos by providing username and password # This calls helps to authenticate to Kerberos by providing username and password
module Gitlab module Gitlab
module Kerberos module Kerberos
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Kubernetes module Kubernetes
class Deployment class Deployment
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Kubernetes module Kubernetes
# Calculates the rollout status for a set of kubernetes deployments. # Calculates the rollout status for a set of kubernetes deployments.
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Mirror module Mirror
# Runs scheduler every minute # Runs scheduler every minute
......
# frozen_string_literal: true
module Gitlab module Gitlab
class PaginationDelegate class PaginationDelegate
DEFAULT_PER_PAGE = Kaminari.config.default_per_page DEFAULT_PER_PAGE = Kaminari.config.default_per_page
......
# frozen_string_literal: true
# The database stores locked paths as following: # The database stores locked paths as following:
# 'app/models/user.rb' or 'app/models' # 'app/models/user.rb' or 'app/models'
# To determine that 'app/models/user.rb' is locked we need to generate # To determine that 'app/models/user.rb' is locked we need to generate
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Prometheus module Prometheus
module Queries module Queries
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Prometheus module Prometheus
module Queries module Queries
......
# frozen_string_literal: true
module Gitlab module Gitlab
class Proxy class Proxy
class << self class << self
......
# frozen_string_literal: true
module Gitlab module Gitlab
class RepositorySizeError class RepositorySizeError
include ActiveSupport::NumberHelper include ActiveSupport::NumberHelper
......
# frozen_string_literal: true
module Gitlab module Gitlab
module SidekiqCluster module SidekiqCluster
# The signals that should terminate both the master and workers. # The signals that should terminate both the master and workers.
......
# frozen_string_literal: true
require 'optparse' require 'optparse'
require 'logger' require 'logger'
require 'time' require 'time'
......
# frozen_string_literal: true
module Gitlab module Gitlab
module SlashCommands module SlashCommands
class ApplicationHelp < BaseCommand class ApplicationHelp < BaseCommand
......
# frozen_string_literal: true
module Gitlab module Gitlab
module SlashCommands module SlashCommands
module Presenters module Presenters
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Template module Template
class CustomDockerfileTemplate < CustomTemplate class CustomDockerfileTemplate < CustomTemplate
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Template module Template
class CustomGitignoreTemplate < CustomTemplate class CustomGitignoreTemplate < CustomTemplate
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Template module Template
class CustomGitlabCiYmlTemplate < CustomTemplate class CustomGitlabCiYmlTemplate < CustomTemplate
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Template module Template
class CustomLicenseTemplate < CustomTemplate class CustomLicenseTemplate < CustomTemplate
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Template module Template
class CustomTemplate < BaseTemplate class CustomTemplate < BaseTemplate
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Vulnerabilities module Vulnerabilities
class BaseVulnerability class BaseVulnerability
......
# frozen_string_literal: true
module Gitlab module Gitlab
module Vulnerabilities module Vulnerabilities
class ContainerScanningVulnerability < BaseVulnerability class ContainerScanningVulnerability < BaseVulnerability
......
# frozen_string_literal: true
module OmniAuth module OmniAuth
module Strategies module Strategies
class GroupSaml < SAML class GroupSaml < SAML
......
# frozen_string_literal: true
require 'omniauth' require 'omniauth'
module OmniAuth module OmniAuth
......
# frozen_string_literal: true
module Pseudonymizer module Pseudonymizer
class Dumper class Dumper
attr_accessor :config, :output_dir attr_accessor :config, :output_dir
......
# frozen_string_literal: true
require 'openssl' require 'openssl'
require 'digest' require 'digest'
......
# frozen_string_literal: true
module Pseudonymizer module Pseudonymizer
class Options class Options
attr_reader :config attr_reader :config
......
# frozen_string_literal: true
module Pseudonymizer module Pseudonymizer
class Pager class Pager
PAGE_SIZE = ENV.fetch('PSEUDONYMIZER_BATCH', 100_000) PAGE_SIZE = ENV.fetch('PSEUDONYMIZER_BATCH', 100_000)
......
# frozen_string_literal: true
module Pseudonymizer module Pseudonymizer
ObjectStorageUnavailableError = Class.new(StandardError) ObjectStorageUnavailableError = Class.new(StandardError)
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class AuthorizedKeysCheck < ::SystemCheck::BaseCheck class AuthorizedKeysCheck < ::SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class AuthorizedKeysFlagCheck < ::SystemCheck::BaseCheck class AuthorizedKeysFlagCheck < ::SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class ClocksSynchronizationCheck < SystemCheck::BaseCheck class ClocksSynchronizationCheck < SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class DatabaseReplicationCheck < SystemCheck::BaseCheck class DatabaseReplicationCheck < SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class EnabledCheck < SystemCheck::BaseCheck class EnabledCheck < SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class FdwEnabledCheck < SystemCheck::BaseCheck class FdwEnabledCheck < SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class FdwSchemaUpToDateCheck < SystemCheck::BaseCheck class FdwSchemaUpToDateCheck < SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class GeoDatabaseConfiguredCheck < SystemCheck::BaseCheck class GeoDatabaseConfiguredCheck < SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class HTTPCloneEnabledCheck < ::SystemCheck::BaseCheck class HTTPCloneEnabledCheck < ::SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class HttpConnectionCheck < SystemCheck::BaseCheck class HttpConnectionCheck < SystemCheck::BaseCheck
......
# frozen_string_literal: true
module SystemCheck module SystemCheck
module Geo module Geo
class LicenseCheck < SystemCheck::BaseCheck class LicenseCheck < SystemCheck::BaseCheck
......
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