gitlabhq/lib/gitlab/regex.rb

24 lines
314 B
Ruby
Raw Normal View History

2012-11-28 06:14:05 +03:00
module Gitlab
module Regex
extend self
def username_regex
default_regex
end
2012-12-26 02:50:41 +04:00
def project_name_regex
2012-12-28 09:29:57 +02:00
/\A[a-zA-Z][a-zA-Z0-9_\-\. ]*\z/
2012-12-26 02:50:41 +04:00
end
2012-11-28 06:14:05 +03:00
def path_regex
default_regex
end
protected
def default_regex
/\A[a-zA-Z][a-zA-Z0-9_\-\.]*\z/
end
end
end