Merge pull request #190 from mutewinter/dot_project_names
Allow dots in project names
This commit is contained in:
commit
04a908f6a5
|
@ -25,8 +25,8 @@ class Project < ActiveRecord::Base
|
||||||
validates :path,
|
validates :path,
|
||||||
:uniqueness => true,
|
:uniqueness => true,
|
||||||
:presence => true,
|
:presence => true,
|
||||||
:format => { :with => /^[a-zA-Z0-9_\-]*$/,
|
:format => { :with => /^[a-zA-Z0-9_\-\.]*$/,
|
||||||
:message => "only letters, digits & '_' '-' allowed" },
|
:message => "only letters, digits & '_' '-' '.' allowed" },
|
||||||
:length => { :within => 0..255 }
|
:length => { :within => 0..255 }
|
||||||
|
|
||||||
validates :description,
|
validates :description,
|
||||||
|
@ -35,8 +35,8 @@ class Project < ActiveRecord::Base
|
||||||
validates :code,
|
validates :code,
|
||||||
:presence => true,
|
:presence => true,
|
||||||
:uniqueness => true,
|
:uniqueness => true,
|
||||||
:format => { :with => /^[a-zA-Z0-9_\-]*$/,
|
:format => { :with => /^[a-zA-Z0-9_\-\.]*$/,
|
||||||
:message => "only letters, digits & '_' '-' allowed" },
|
:message => "only letters, digits & '_' '-' '.' allowed" },
|
||||||
:length => { :within => 3..255 }
|
:length => { :within => 3..255 }
|
||||||
|
|
||||||
validates :owner,
|
validates :owner,
|
||||||
|
|
|
@ -6,7 +6,7 @@ Gitlab::Application.routes.draw do
|
||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :users
|
resources :users
|
||||||
resources :projects
|
resources :projects, :constraints => { :id => /[^\/]+/ }
|
||||||
resources :team_members
|
resources :team_members
|
||||||
get 'emails', :to => 'mailer#preview'
|
get 'emails', :to => 'mailer#preview'
|
||||||
get 'mailer/preview_note'
|
get 'mailer/preview_note'
|
||||||
|
@ -28,12 +28,12 @@ Gitlab::Application.routes.draw do
|
||||||
|
|
||||||
#get "profile/:id", :to => "profile#show"
|
#get "profile/:id", :to => "profile#show"
|
||||||
|
|
||||||
resources :projects, :only => [:new, :create, :index]
|
resources :projects, :constraints => { :id => /[^\/]+/ }, :only => [:new, :create, :index]
|
||||||
resources :keys
|
resources :keys
|
||||||
|
|
||||||
devise_for :users
|
devise_for :users
|
||||||
|
|
||||||
resources :projects, :except => [:new, :create, :index], :path => "/" do
|
resources :projects, :constraints => { :id => /[^\/]+/ }, :except => [:new, :create, :index], :path => "/" do
|
||||||
member do
|
member do
|
||||||
get "team"
|
get "team"
|
||||||
get "wall"
|
get "wall"
|
||||||
|
|
Loading…
Reference in a new issue