summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-05-02 09:13:10 +0200
committerBob Van Landuyt <bob@gitlab.com>2017-05-02 09:13:41 +0200
commitc853dd6158af0f77721ce59c03f5f05e98eeadba (patch)
tree20a68ff2c1092d5655c1f472e67a8890804b3761 /lib
parent2e2a63c8669a084ed3a3aa5e770158ea2cb43a9d (diff)
downloadgitlab-ce-c853dd6158af0f77721ce59c03f5f05e98eeadba.tar.gz
Reuse Gitlab::Regex.full_namespace_regex in the DynamicPathValidator
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/regex.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index 08b061d5e31..b7fef5dd068 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -22,6 +22,10 @@ module Gitlab
@namespace_regex ||= /\A#{NAMESPACE_REGEX_STR}\z/.freeze
end
+ def full_namespace_regex
+ @full_namespace_regex ||= %r{\A#{FULL_NAMESPACE_REGEX_STR}\z}
+ end
+
def namespace_route_regex
@namespace_route_regex ||= /#{NAMESPACE_REGEX_STR}/.freeze
end