Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-19 17:16:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-19 17:16:28 +0300
commite4384360a16dd9a19d4d2d25d0ef1f2b862ed2a6 (patch)
tree2fcdfa7dcdb9db8f5208b2562f4b4e803d671243 /lib/gitlab/uuid.rb
parentffda4e7bcac36987f936b4ba515995a6698698f0 (diff)
Add latest changes from gitlab-org/gitlab@16-2-stable-eev16.2.0-rc42
Diffstat (limited to 'lib/gitlab/uuid.rb')
-rw-r--r--lib/gitlab/uuid.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/gitlab/uuid.rb b/lib/gitlab/uuid.rb
index 016c25eb94b..a3abe90a412 100644
--- a/lib/gitlab/uuid.rb
+++ b/lib/gitlab/uuid.rb
@@ -10,8 +10,6 @@ module Gitlab
}.freeze
UUID_V5_PATTERN = /\h{8}-\h{4}-5\h{3}-\h{4}-\h{12}/.freeze
- NAMESPACE_REGEX = /(\h{8})-(\h{4})-(\h{4})-(\h{4})-(\h{4})(\h{8})/.freeze
- PACK_PATTERN = "NnnnnN"
class << self
def v5(name, namespace_id: default_namespace_id)
@@ -25,12 +23,7 @@ module Gitlab
private
def default_namespace_id
- @default_namespace_id ||= begin
- namespace_uuid = NAMESPACE_IDS.fetch(Rails.env.to_sym)
- # Digest::UUID is broken when using a UUID as a namespace_id
- # https://github.com/rails/rails/issues/37681#issue-520718028
- namespace_uuid.scan(NAMESPACE_REGEX).flatten.map { |s| s.to_i(16) }.pack(PACK_PATTERN)
- end
+ NAMESPACE_IDS.fetch(Rails.env.to_sym)
end
end
end