diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 11:58:45 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-24 14:49:22 +0200 |
commit | c0116926c743818b2593474946abb40b56d8fefa (patch) | |
tree | 9c6d57d7d45f922bef051f2e46a04f1d5b9f7527 /lib/gitlab/regex.rb | |
parent | 164a29df86f70910ac0bc6bd29f0fe6f4037b56e (diff) | |
download | gitlab-ce-c0116926c743818b2593474946abb40b56d8fefa.tar.gz |
Rename namespace_regex to namespace_path_regex.
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r-- | lib/gitlab/regex.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 0571574aa4f..e5f5482a223 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -2,13 +2,13 @@ module Gitlab module Regex extend self - NAMESPACE_REGEX_STR = '(?:[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*[a-zA-Z0-9_\-]|[a-zA-Z0-9_])'.freeze + NAMESPACE_PATH_REGEX_STR = '(?:[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*[a-zA-Z0-9_\-]|[a-zA-Z0-9_])'.freeze - def namespace_regex - @namespace_regex ||= /\A#{NAMESPACE_REGEX_STR}\z/.freeze + def namespace_path_regex + @namespace_path_regex ||= /\A#{NAMESPACE_PATH_REGEX_STR}\z/.freeze end - def namespace_regex_message + def namespace_path_regex_message "can contain only letters, digits, '_', '-' and '.'. " \ "Cannot start with '-' or end in '.'." \ end |