Skip to content
Snippets Groups Projects
routes.rb 2.16 KiB
Newer Older
  • Learn to ignore specific revisions
  • gitlabhq's avatar
    gitlabhq committed
    Gitlab::Application.routes.draw do
    
      get 'tags'=> 'tags#index'
      get 'tags/:tag' => 'projects#index'
    
    
    Nihad Abbasov's avatar
    Nihad Abbasov committed
      namespace :admin do
    
    gitlabhq's avatar
    gitlabhq committed
        resources :users
    
        resources :projects, :constraints => { :id => /[^\/]+/ }
    
    gitlabhq's avatar
    gitlabhq committed
        resources :team_members
        get 'emails', :to => 'mailer#preview'
        get 'mailer/preview_note'
        get 'mailer/preview_user_new'
        get 'mailer/preview_issue_new'
        root :to => "users#index"
      end
    
    
      get "errors/githost"
    
    gitlabhq's avatar
    gitlabhq committed
      get "profile/password", :to => "profile#password"
      put "profile/password", :to => "profile#password_update"
    
      put "profile/reset_private_token", :to => "profile#reset_private_token"
    
    gitlabhq's avatar
    gitlabhq committed
      get "profile", :to => "profile#show"
    
      get "profile/design", :to => "profile#design"
      put "profile/update", :to => "profile#update"
    
    Dmitriy Zaporozhets's avatar
    Dmitriy Zaporozhets committed
    
    
    gitlabhq's avatar
    gitlabhq committed
      get "dashboard", :to => "dashboard#index"
    
    Dmitriy Zaporozhets's avatar
    Dmitriy Zaporozhets committed
      get "dashboard/issues", :to => "dashboard#issues"
      get "dashboard/merge_requests", :to => "dashboard#merge_requests"
    
    gitlabhq's avatar
    gitlabhq committed
      #get "profile/:id", :to => "profile#show"
    
    
      resources :projects, :constraints => { :id => /[^\/]+/ }, :only => [:new, :create, :index]
    
    gitlabhq's avatar
    gitlabhq committed
      resources :keys
    
    gitlabhq's avatar
    gitlabhq committed
      devise_for :users
    
    
      resources :projects, :constraints => { :id => /[^\/]+/ }, :except => [:new, :create, :index], :path => "/" do
    
    Nihad Abbasov's avatar
    Nihad Abbasov committed
        member do
    
    gitlabhq's avatar
    gitlabhq committed
          get "team"
          get "wall"
    
    Valery Sizov's avatar
    Valery Sizov committed
          get "graph"
    
    gitlabhq's avatar
    gitlabhq committed
        end
    
    gitlabhq's avatar
    gitlabhq committed
    
    
    gitlabhq's avatar
    gitlabhq committed
        resources :refs, :only => [], :path => "/" do 
    
    gitlabhq's avatar
    gitlabhq committed
          collection do 
            get "switch"
          end
    
    
    gitlabhq's avatar
    gitlabhq committed
          member do 
    
    gitlabhq's avatar
    gitlabhq committed
            get "tree", :constraints => { :id => /[a-zA-Z.\/0-9_\-]+/ }
            get "blob", 
              :constraints => {
                :id => /[a-zA-Z.0-9\/_\-]+/,
                :path => /.*/
              }
    
    
    gitlabhq's avatar
    gitlabhq committed
    
    
    gitlabhq's avatar
    gitlabhq committed
            # tree viewer
            get "tree/:path" => "refs#tree",
              :as => :tree_file,
              :constraints => {
    
    gitlabhq's avatar
    gitlabhq committed
                :id => /[a-zA-Z.0-9\/_\-]+/,
    
    gitlabhq's avatar
    gitlabhq committed
                :path => /.*/
              }
          end
    
    gitlabhq's avatar
    gitlabhq committed
        end
    
    gitlabhq's avatar
    gitlabhq committed
    
    
        resources :merge_requests do 
          member do 
            get :diffs
            get :commits
          end
        end
    
    gitlabhq's avatar
    gitlabhq committed
        resources :snippets
    
    gitlabhq's avatar
    gitlabhq committed
        resources :commits
        resources :team_members
    
    VSizov's avatar
    VSizov committed
        resources :issues do
          collection do
    
            post  :sort
            get   :search
    
    VSizov's avatar
    VSizov committed
        end
    
    gitlabhq's avatar
    gitlabhq committed
        resources :notes, :only => [:create, :destroy]
      end
    
    gitlabhq's avatar
    gitlabhq committed
      root :to => "dashboard#index"
    
    gitlabhq's avatar
    gitlabhq committed
    end