diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-26 03:09:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-26 03:09:21 +0000 |
commit | 88a161660fc48c4c1a94b51d5c72fdadffc1b1ae (patch) | |
tree | 466b87a16ad25ac602a9b3c5edaaa582f3eddd94 /lib | |
parent | 9190fb4bdcb7e1189de69de53a523c5aeff71f91 (diff) | |
download | gitlab-ce-88a161660fc48c4c1a94b51d5c72fdadffc1b1ae.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/autolink_filter.rb | 2 | ||||
-rw-r--r-- | lib/banzai/filter/spaced_link_filter.rb | 2 | ||||
-rw-r--r-- | lib/bulk_imports/clients/http.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/auth/ldap/adapter.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/auth/saml/origin_validator.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/queue/metrics.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/database/background_migration/batched_migration.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/database/similarity_score.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/exclusive_lease.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/gitaly_client/storage_settings.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/golang.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/import_export/base/relation_factory.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/middleware/multipart.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/middleware/same_site_cookies.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/prometheus/queries/matched_metric_query.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/uuid.rb | 2 | ||||
-rw-r--r-- | lib/tasks/cache.rake | 2 |
18 files changed, 20 insertions, 20 deletions
diff --git a/lib/banzai/filter/autolink_filter.rb b/lib/banzai/filter/autolink_filter.rb index d569711431c..a86c1bb2892 100644 --- a/lib/banzai/filter/autolink_filter.rb +++ b/lib/banzai/filter/autolink_filter.rb @@ -43,7 +43,7 @@ module Banzai TEXT_QUERY = %Q(descendant-or-self::text()[ not(#{IGNORE_PARENTS.map { |p| "ancestor::#{p}" }.join(' or ')}) and contains(., '://') - ]).freeze + ]) PUNCTUATION_PAIRS = { "'" => "'", diff --git a/lib/banzai/filter/spaced_link_filter.rb b/lib/banzai/filter/spaced_link_filter.rb index f52ffe117d9..ca26e6d1581 100644 --- a/lib/banzai/filter/spaced_link_filter.rb +++ b/lib/banzai/filter/spaced_link_filter.rb @@ -42,7 +42,7 @@ module Banzai TEXT_QUERY = %Q(descendant-or-self::text()[ not(#{IGNORE_PARENTS.map { |p| "ancestor::#{p}" }.join(' or ')}) and contains(., ']\(') - ]).freeze + ]) def call doc.xpath(TEXT_QUERY).each do |node| diff --git a/lib/bulk_imports/clients/http.rb b/lib/bulk_imports/clients/http.rb index acc94d5ff2e..dcd6830bf67 100644 --- a/lib/bulk_imports/clients/http.rb +++ b/lib/bulk_imports/clients/http.rb @@ -4,8 +4,8 @@ module BulkImports module Clients class Http API_VERSION = 'v4' - DEFAULT_PAGE = 1.freeze - DEFAULT_PER_PAGE = 30.freeze + DEFAULT_PAGE = 1 + DEFAULT_PER_PAGE = 30 ConnectionError = Class.new(StandardError) diff --git a/lib/gitlab/auth/ldap/adapter.rb b/lib/gitlab/auth/ldap/adapter.rb index b7bb61f0677..7f85d3b1cd3 100644 --- a/lib/gitlab/auth/ldap/adapter.rb +++ b/lib/gitlab/auth/ldap/adapter.rb @@ -5,7 +5,7 @@ module Gitlab module Ldap class Adapter SEARCH_RETRY_FACTOR = [1, 1, 2, 3].freeze - MAX_SEARCH_RETRIES = Rails.env.test? ? 1 : SEARCH_RETRY_FACTOR.size.freeze + MAX_SEARCH_RETRIES = Rails.env.test? ? 1 : SEARCH_RETRY_FACTOR.size attr_reader :provider, :ldap diff --git a/lib/gitlab/auth/saml/origin_validator.rb b/lib/gitlab/auth/saml/origin_validator.rb index 4ecc688888f..ff0d25314f7 100644 --- a/lib/gitlab/auth/saml/origin_validator.rb +++ b/lib/gitlab/auth/saml/origin_validator.rb @@ -4,7 +4,7 @@ module Gitlab module Auth module Saml class OriginValidator - AUTH_REQUEST_SESSION_KEY = "last_authn_request_id".freeze + AUTH_REQUEST_SESSION_KEY = "last_authn_request_id" def initialize(session) @session = session || {} diff --git a/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb b/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb index 7b18e617c81..888a12f2330 100644 --- a/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb +++ b/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb @@ -32,7 +32,7 @@ class Gitlab::BackgroundMigration::RecalculateVulnerabilitiesOccurrencesUuid }.freeze NAMESPACE_REGEX = /(\h{8})-(\h{4})-(\h{4})-(\h{4})-(\h{4})(\h{8})/.freeze - PACK_PATTERN = "NnnnnN".freeze + PACK_PATTERN = "NnnnnN" def self.call(value) Digest::UUID.uuid_v5(namespace_id, value) diff --git a/lib/gitlab/ci/queue/metrics.rb b/lib/gitlab/ci/queue/metrics.rb index 35ac4e36030..fd02c998d84 100644 --- a/lib/gitlab/ci/queue/metrics.rb +++ b/lib/gitlab/ci/queue/metrics.rb @@ -14,7 +14,7 @@ module Gitlab METRICS_SHARD_TAG_PREFIX = 'metrics_shard::' DEFAULT_METRICS_SHARD = 'default' - JOBS_RUNNING_FOR_PROJECT_MAX_BUCKET = 5.freeze + JOBS_RUNNING_FOR_PROJECT_MAX_BUCKET = 5 OPERATION_COUNTERS = [ :build_can_pick, diff --git a/lib/gitlab/database/background_migration/batched_migration.rb b/lib/gitlab/database/background_migration/batched_migration.rb index 0c9add9b355..f3e00da9fe2 100644 --- a/lib/gitlab/database/background_migration/batched_migration.rb +++ b/lib/gitlab/database/background_migration/batched_migration.rb @@ -5,7 +5,7 @@ module Gitlab module BackgroundMigration class BatchedMigration < ActiveRecord::Base # rubocop:disable Rails/ApplicationRecord JOB_CLASS_MODULE = 'Gitlab::BackgroundMigration' - BATCH_CLASS_MODULE = "#{JOB_CLASS_MODULE}::BatchingStrategies".freeze + BATCH_CLASS_MODULE = "#{JOB_CLASS_MODULE}::BatchingStrategies" self.table_name = :batched_background_migrations diff --git a/lib/gitlab/database/similarity_score.rb b/lib/gitlab/database/similarity_score.rb index 40845c0d5e0..20bf6fa4d30 100644 --- a/lib/gitlab/database/similarity_score.rb +++ b/lib/gitlab/database/similarity_score.rb @@ -10,7 +10,7 @@ module Gitlab # Adds a "magic" comment in the generated SQL expression in order to be able to tell if we're sorting by similarity. # Example: /* gitlab/database/similarity_score */ SIMILARITY(COALESCE... - SIMILARITY_FUNCTION_CALL_WITH_ANNOTATION = "/* #{DISPLAY_NAME} */ SIMILARITY".freeze + SIMILARITY_FUNCTION_CALL_WITH_ANNOTATION = "/* #{DISPLAY_NAME} */ SIMILARITY" # This method returns an Arel expression that can be used in an ActiveRecord query to order the resultset by similarity. # diff --git a/lib/gitlab/exclusive_lease.rb b/lib/gitlab/exclusive_lease.rb index b602393b59e..ef0236f8275 100644 --- a/lib/gitlab/exclusive_lease.rb +++ b/lib/gitlab/exclusive_lease.rb @@ -15,14 +15,14 @@ module Gitlab PREFIX = 'gitlab:exclusive_lease' NoKey = Class.new(ArgumentError) - LUA_CANCEL_SCRIPT = <<~EOS.freeze + LUA_CANCEL_SCRIPT = <<~EOS local key, uuid = KEYS[1], ARGV[1] if redis.call("get", key) == uuid then redis.call("del", key) end EOS - LUA_RENEW_SCRIPT = <<~EOS.freeze + LUA_RENEW_SCRIPT = <<~EOS local key, uuid, ttl = KEYS[1], ARGV[1], ARGV[2] if redis.call("get", key) == uuid then redis.call("expire", key, ttl) diff --git a/lib/gitlab/gitaly_client/storage_settings.rb b/lib/gitlab/gitaly_client/storage_settings.rb index 7edd42f9ef7..dd9e3d5d28b 100644 --- a/lib/gitlab/gitaly_client/storage_settings.rb +++ b/lib/gitlab/gitaly_client/storage_settings.rb @@ -11,7 +11,7 @@ module Gitlab DirectPathAccessError = Class.new(StandardError) InvalidConfigurationError = Class.new(StandardError) - INVALID_STORAGE_MESSAGE = <<~MSG.freeze + INVALID_STORAGE_MESSAGE = <<~MSG Storage is invalid because it has no `path` key. For source installations, update your config/gitlab.yml Refer to gitlab.yml.example for an updated example. diff --git a/lib/gitlab/golang.rb b/lib/gitlab/golang.rb index 097967cbcf5..31b7a198b92 100644 --- a/lib/gitlab/golang.rb +++ b/lib/gitlab/golang.rb @@ -7,7 +7,7 @@ module Gitlab extend self def local_module_prefix - @gitlab_prefix ||= "#{Settings.build_gitlab_go_url}/".freeze + @gitlab_prefix ||= "#{Settings.build_gitlab_go_url}/" end def semver_tag?(tag) diff --git a/lib/gitlab/import_export/base/relation_factory.rb b/lib/gitlab/import_export/base/relation_factory.rb index d60bc79df4c..05a4a8f4c93 100644 --- a/lib/gitlab/import_export/base/relation_factory.rb +++ b/lib/gitlab/import_export/base/relation_factory.rb @@ -6,7 +6,7 @@ module Gitlab class RelationFactory include Gitlab::Utils::StrongMemoize - IMPORTED_OBJECT_MAX_RETRIES = 5.freeze + IMPORTED_OBJECT_MAX_RETRIES = 5 OVERRIDES = {}.freeze EXISTING_OBJECT_RELATIONS = %i[].freeze diff --git a/lib/gitlab/middleware/multipart.rb b/lib/gitlab/middleware/multipart.rb index 79f1abe820f..329041e3ba2 100644 --- a/lib/gitlab/middleware/multipart.rb +++ b/lib/gitlab/middleware/multipart.rb @@ -31,7 +31,7 @@ module Gitlab RACK_ENV_KEY = 'HTTP_GITLAB_WORKHORSE_MULTIPART_FIELDS' JWT_PARAM_SUFFIX = '.gitlab-workhorse-upload' JWT_PARAM_FIXED_KEY = 'upload' - REWRITTEN_FIELD_NAME_MAX_LENGTH = 10000.freeze + REWRITTEN_FIELD_NAME_MAX_LENGTH = 10000 class Handler def initialize(env, message) diff --git a/lib/gitlab/middleware/same_site_cookies.rb b/lib/gitlab/middleware/same_site_cookies.rb index 37ccc5abb10..405732e8015 100644 --- a/lib/gitlab/middleware/same_site_cookies.rb +++ b/lib/gitlab/middleware/same_site_cookies.rb @@ -17,7 +17,7 @@ module Gitlab module Middleware class SameSiteCookies - COOKIE_SEPARATOR = "\n".freeze + COOKIE_SEPARATOR = "\n" def initialize(app) @app = app diff --git a/lib/gitlab/prometheus/queries/matched_metric_query.rb b/lib/gitlab/prometheus/queries/matched_metric_query.rb index e4d44df3baf..73de5a11998 100644 --- a/lib/gitlab/prometheus/queries/matched_metric_query.rb +++ b/lib/gitlab/prometheus/queries/matched_metric_query.rb @@ -4,7 +4,7 @@ module Gitlab module Prometheus module Queries class MatchedMetricQuery < BaseQuery - MAX_QUERY_ITEMS = 40.freeze + MAX_QUERY_ITEMS = 40 def query groups_data.map do |group, data| diff --git a/lib/gitlab/uuid.rb b/lib/gitlab/uuid.rb index 80caf2c6788..3344fad1d44 100644 --- a/lib/gitlab/uuid.rb +++ b/lib/gitlab/uuid.rb @@ -11,7 +11,7 @@ module Gitlab UUID_V5_PATTERN = /\h{8}-\h{4}-5\h{3}-\h{4}-\h{4}\h{8}/.freeze NAMESPACE_REGEX = /(\h{8})-(\h{4})-(\h{4})-(\h{4})-(\h{4})(\h{8})/.freeze - PACK_PATTERN = "NnnnnN".freeze + PACK_PATTERN = "NnnnnN" class << self def v5(name, namespace_id: default_namespace_id) diff --git a/lib/tasks/cache.rake b/lib/tasks/cache.rake index 4d698e56444..13365b9ec07 100644 --- a/lib/tasks/cache.rake +++ b/lib/tasks/cache.rake @@ -3,7 +3,7 @@ namespace :cache do namespace :clear do REDIS_CLEAR_BATCH_SIZE = 1000 # There seems to be no speedup when pushing beyond 1,000 - REDIS_SCAN_START_STOP = '0'.freeze # Magic value, see http://redis.io/commands/scan + REDIS_SCAN_START_STOP = '0' # Magic value, see http://redis.io/commands/scan desc "GitLab | Cache | Clear redis cache" task redis: :environment do |