Commit ee14a22e authored by Yorick Peterse's avatar Yorick Peterse

Prepend EE::Gitlab::Regex into Gitlab::Regex

This ensures that we modify Gitlab::Regex using EE specific modules the
same way as we do with other modules/classes.
parent 1e3abec7
......@@ -3,6 +3,9 @@
module EE
module Gitlab
module Regex
extend ActiveSupport::Concern
class_methods do
def environment_scope_regex_chars
"#{environment_name_regex_chars}\\*"
end
......@@ -41,4 +44,5 @@ module EE
end
end
end
end
end
......@@ -3,7 +3,6 @@
module Gitlab
module Regex
extend self
extend EE::Gitlab::Regex # rubocop: disable Cop/InjectEnterpriseEditionModule
def namespace_name_regex
@namespace_name_regex ||= /\A[\p{Alnum}\p{Pd}_\. ]*\z/.freeze
......@@ -108,3 +107,5 @@ module Gitlab
end
end
end
Gitlab::Regex.prepend(EE::Gitlab::Regex)
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