diff options
author | James Lopez <james@jameslopez.es> | 2016-01-29 15:35:21 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-01-29 15:35:21 +0100 |
commit | eb51a4ac1b7702873ecb9de7ddafdb989370437c (patch) | |
tree | 949174c813041ddf5382431eb50c97c777d0b0e6 /lib | |
parent | 7ca6779654ed2da5ba31ab9256406feb1b7fb8ee (diff) | |
download | gitlab-ce-eb51a4ac1b7702873ecb9de7ddafdb989370437c.tar.gz |
refactor previous test and add validation to project model
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/regex.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 53ab2686b43..3331bd123b2 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -34,12 +34,12 @@ module Gitlab def project_path_regex - @project_path_regex ||= /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git)\z/.freeze + @project_path_regex ||= /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git|\.atom)\z/.freeze end def project_path_regex_message "can contain only letters, digits, '_', '-' and '.'. " \ - "Cannot start with '-' or end in '.git'" \ + "Cannot start with '-', end in '.git' or end in '.atom'" \ end |