diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-11-07 18:35:14 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-11-07 18:40:57 +0200 |
commit | 706113167682d0b47970834ba218657624c0196e (patch) | |
tree | 652399c6d69d3b8b9c25f0c737a9e8a1a0d81efa /lib | |
parent | 76ff9fffcce353e33f407b78cf4256ef4dc50f6a (diff) | |
download | gitlab-ce-706113167682d0b47970834ba218657624c0196e.tar.gz |
Refactor namespace regexdz-refactor-namespace-regex
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/regex.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 0d30e1bb92e..cb1659f9cee 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -8,6 +8,10 @@ module Gitlab @namespace_regex ||= /\A#{NAMESPACE_REGEX_STR}\z/.freeze end + def namespace_route_regex + @namespace_route_regex ||= /#{NAMESPACE_REGEX_STR}/.freeze + end + def namespace_regex_message "can contain only letters, digits, '_', '-' and '.'. " \ "Cannot start with '-' or end in '.', '.git' or '.atom'." \ |