2012-01-30 20:39:34 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2011-03-09 13:13:36 +00:00
|
|
|
Rosa::Application.routes.draw do
|
2011-10-24 02:55:03 +01:00
|
|
|
# XML RPC
|
|
|
|
match 'api/xmlrpc' => 'rpc#xe_index'
|
2012-01-11 18:15:35 +00:00
|
|
|
|
2012-02-08 14:01:00 +00:00
|
|
|
devise_scope :user do
|
2011-10-11 21:56:51 +01:00
|
|
|
get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru'
|
|
|
|
end
|
2012-02-08 14:01:00 +00:00
|
|
|
devise_for :users, :controllers => {:omniauth_callbacks => 'users/omniauth_callbacks'}
|
2012-01-11 18:15:35 +00:00
|
|
|
|
2011-11-30 15:27:19 +00:00
|
|
|
resources :users do
|
|
|
|
resources :groups, :only => [:new, :create, :index]
|
2011-12-11 23:42:13 +00:00
|
|
|
get :autocomplete_user_uname, :on => :collection
|
2012-01-11 13:58:13 +00:00
|
|
|
namespace :settings do
|
|
|
|
resource :notifier, :only => [:show, :update]
|
|
|
|
end
|
2011-11-30 15:27:19 +00:00
|
|
|
end
|
2011-10-21 16:39:32 +01:00
|
|
|
|
2011-10-14 21:45:58 +01:00
|
|
|
resources :event_logs, :only => :index
|
2011-03-09 16:16:48 +00:00
|
|
|
|
2011-10-24 11:27:00 +01:00
|
|
|
#resources :downloads, :only => :index
|
|
|
|
match 'statistics/' => 'downloads#index', :as => :downloads
|
2011-10-31 15:57:44 +00:00
|
|
|
match 'statistics/refresh' => 'downloads#refresh', :as => :downloads_refresh
|
2011-11-03 11:16:17 +00:00
|
|
|
match 'statistics/test_sudo' => 'downloads#test_sudo', :as => :test_sudo_downloads
|
2011-03-09 16:16:48 +00:00
|
|
|
|
2011-10-19 21:58:31 +01:00
|
|
|
resources :categories do
|
|
|
|
get :platforms, :on => :collection
|
|
|
|
end
|
|
|
|
|
2011-10-18 14:47:17 +01:00
|
|
|
match '/private/:platform_name/*file_path' => 'privates#show'
|
2011-10-17 15:24:45 +01:00
|
|
|
|
2011-12-22 00:53:55 +00:00
|
|
|
match 'build_lists/publish_build', :to => "build_lists#publish_build"
|
2011-12-21 21:42:06 +00:00
|
|
|
match 'build_lists/status_build', :to => "build_lists#status_build"
|
|
|
|
match 'build_lists/post_build', :to => "build_lists#post_build"
|
|
|
|
match 'build_lists/pre_build', :to => "build_lists#pre_build"
|
|
|
|
match 'build_lists/circle_build', :to => "build_lists#circle_build"
|
|
|
|
match 'build_lists/new_bbdt', :to => "build_lists#new_bbdt"
|
2011-12-21 01:30:34 +00:00
|
|
|
|
2011-12-21 21:42:06 +00:00
|
|
|
resources :build_lists, :only => [:index, :show] do
|
2011-12-21 01:30:34 +00:00
|
|
|
member do
|
2011-12-21 21:42:06 +00:00
|
|
|
put :cancel
|
|
|
|
put :publish
|
2011-12-21 01:30:34 +00:00
|
|
|
end
|
|
|
|
end
|
2011-12-09 23:40:13 +00:00
|
|
|
|
2012-02-01 18:13:42 +00:00
|
|
|
post 'build_lists' => 'build_lists#index', :as => 'build_lists'
|
2012-02-01 16:00:19 +00:00
|
|
|
|
2011-11-11 17:13:09 +00:00
|
|
|
resources :auto_build_lists, :only => [:index, :create, :destroy]
|
2011-10-22 16:28:41 +01:00
|
|
|
|
2011-10-27 14:04:03 +01:00
|
|
|
resources :personal_repositories, :only => [:show] do
|
|
|
|
member do
|
|
|
|
get :settings
|
|
|
|
get :change_visibility
|
|
|
|
get :add_project
|
|
|
|
get :remove_project
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-03-10 11:35:46 +00:00
|
|
|
resources :platforms do
|
2011-11-02 10:42:08 +00:00
|
|
|
resources :private_users, :except => [:show, :destroy, :update]
|
2011-10-18 14:47:17 +01:00
|
|
|
|
2011-03-17 14:47:16 +00:00
|
|
|
member do
|
2011-12-07 00:08:46 +00:00
|
|
|
post 'freeze'
|
|
|
|
post 'unfreeze'
|
2011-05-30 10:04:32 +01:00
|
|
|
get 'clone'
|
2011-11-01 22:00:44 +00:00
|
|
|
post 'clone'
|
2011-12-07 00:08:46 +00:00
|
|
|
post 'build_all'
|
2011-03-17 14:47:16 +00:00
|
|
|
end
|
|
|
|
|
2011-10-27 12:02:25 +01:00
|
|
|
collection do
|
|
|
|
get 'easy_urpmi'
|
2011-12-01 09:29:04 +00:00
|
|
|
get :autocomplete_user_uname
|
2011-10-27 12:02:25 +01:00
|
|
|
end
|
|
|
|
|
2011-04-14 18:04:32 +01:00
|
|
|
resources :products do
|
2011-11-11 17:13:09 +00:00
|
|
|
# member do
|
|
|
|
# get :clone
|
|
|
|
# get :build
|
|
|
|
# end
|
|
|
|
resources :product_build_lists, :only => [:create]
|
2011-04-14 18:04:32 +01:00
|
|
|
end
|
2011-04-11 09:35:08 +01:00
|
|
|
|
2011-11-02 21:37:00 +00:00
|
|
|
resources :repositories
|
2011-10-19 21:58:31 +01:00
|
|
|
|
|
|
|
resources :categories, :only => [:index, :show]
|
2011-10-17 15:24:45 +01:00
|
|
|
end
|
2011-04-11 17:37:09 +01:00
|
|
|
|
2011-10-17 15:24:45 +01:00
|
|
|
resources :projects do
|
2011-12-26 17:07:16 +00:00
|
|
|
resources :wiki do
|
|
|
|
collection do
|
2012-01-24 20:47:55 +00:00
|
|
|
match '_history' => 'wiki#wiki_history', :as => :history, :via => :get
|
2012-01-19 23:04:11 +00:00
|
|
|
match '_access' => 'wiki#git', :as => :git, :via => :get
|
2012-01-28 12:10:43 +00:00
|
|
|
match '_revert/:sha1/:sha2' => 'wiki#revert_wiki', :as => :revert, :via => [:get, :post]
|
2012-01-23 12:45:38 +00:00
|
|
|
match '_compare' => 'wiki#compare_wiki', :as => :compare, :via => :post
|
|
|
|
match '_compare/*versions' => 'wiki#compare_wiki', :as => :compare_versions, :via => :get
|
2011-12-26 17:07:16 +00:00
|
|
|
post :preview
|
|
|
|
get :search
|
|
|
|
get :pages
|
|
|
|
end
|
|
|
|
member do
|
2012-01-17 22:28:59 +00:00
|
|
|
get :history
|
2012-01-16 21:48:38 +00:00
|
|
|
get :edit
|
2012-01-19 13:49:32 +00:00
|
|
|
match 'revert/:sha1/:sha2' => 'wiki#revert', :as => :revert_page, :via => [:get, :post]
|
2012-01-16 21:48:38 +00:00
|
|
|
match ':ref' => 'wiki#show', :as => :versioned, :via => :get
|
2011-12-26 17:07:16 +00:00
|
|
|
|
|
|
|
post :compare
|
|
|
|
match 'compare/*versions' => 'wiki#compare', :as => :compare_versions, :via => :get
|
|
|
|
end
|
|
|
|
end
|
2011-12-28 02:57:42 +00:00
|
|
|
resources :issues do
|
2011-12-19 15:30:14 +00:00
|
|
|
resources :comments, :only => [:edit, :create, :update, :destroy]
|
2011-12-28 13:54:45 +00:00
|
|
|
resources :subscribes, :only => [:create, :destroy]
|
2011-03-10 14:20:09 +00:00
|
|
|
end
|
2011-10-24 11:19:04 +01:00
|
|
|
resource :repo, :controller => "git/repositories", :only => [:show]
|
2011-12-21 21:42:06 +00:00
|
|
|
resources :build_lists, :only => [:index, :new, :create]
|
2011-10-30 21:52:25 +00:00
|
|
|
|
2011-12-11 23:42:13 +00:00
|
|
|
resources :collaborators, :only => [:index, :edit, :update, :add] do
|
2011-10-30 21:52:25 +00:00
|
|
|
collection do
|
|
|
|
get :edit
|
|
|
|
post :update
|
2011-12-11 23:42:13 +00:00
|
|
|
post :add
|
2011-10-30 21:52:25 +00:00
|
|
|
end
|
2011-10-30 22:59:03 +00:00
|
|
|
member do
|
|
|
|
post :update
|
|
|
|
end
|
2011-10-30 21:52:25 +00:00
|
|
|
end
|
|
|
|
# resources :groups, :controller => 'project_groups' do
|
|
|
|
# end
|
|
|
|
|
2011-10-22 16:28:41 +01:00
|
|
|
member do
|
2011-11-23 15:52:33 +00:00
|
|
|
post :fork
|
2011-10-22 16:28:41 +01:00
|
|
|
end
|
2011-10-28 14:27:12 +01:00
|
|
|
collection do
|
|
|
|
get :auto_build
|
|
|
|
end
|
2011-03-10 11:35:46 +00:00
|
|
|
end
|
|
|
|
|
2011-10-19 14:16:29 +01:00
|
|
|
resources :repositories do
|
|
|
|
member do
|
|
|
|
get :add_project
|
|
|
|
get :remove_project
|
2011-12-30 22:42:58 +00:00
|
|
|
get :projects_list
|
2011-03-10 14:20:09 +00:00
|
|
|
end
|
2011-03-10 11:35:46 +00:00
|
|
|
end
|
2011-10-16 21:48:31 +01:00
|
|
|
|
2011-12-05 12:32:18 +00:00
|
|
|
resources :groups do
|
2011-12-11 23:42:13 +00:00
|
|
|
get :autocomplete_group_uname, :on => :collection
|
2011-12-09 23:40:13 +00:00
|
|
|
resources :members, :only => [:index, :edit, :update, :add] do
|
2011-12-05 12:32:18 +00:00
|
|
|
collection do
|
2011-12-09 23:40:13 +00:00
|
|
|
get :edit
|
|
|
|
post :add
|
2011-12-05 12:32:18 +00:00
|
|
|
post :update
|
|
|
|
end
|
|
|
|
member do
|
|
|
|
post :update
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-10-17 15:24:45 +01:00
|
|
|
resources :users, :groups do
|
2011-10-16 21:48:31 +01:00
|
|
|
resources :platforms, :only => [:new, :create]
|
|
|
|
|
2011-11-30 12:58:14 +00:00
|
|
|
resources :projects, :only => [:new, :create, :index]
|
2011-10-16 21:48:31 +01:00
|
|
|
|
2011-12-08 14:47:18 +00:00
|
|
|
# resources :repositories, :only => [:new, :create]
|
2011-10-16 21:48:31 +01:00
|
|
|
end
|
|
|
|
|
2011-11-01 20:56:01 +00:00
|
|
|
match '/catalogs', :to => 'categories#platforms', :as => :catalogs
|
2011-10-30 21:52:25 +00:00
|
|
|
|
2011-11-11 17:13:09 +00:00
|
|
|
match 'product_status', :to => 'product_build_lists#status_build'
|
2011-04-11 09:35:08 +01:00
|
|
|
|
2011-03-10 12:39:24 +00:00
|
|
|
# Tree
|
2011-10-24 11:19:04 +01:00
|
|
|
match '/projects/:project_id/git/tree/:treeish(/*path)', :controller => "git/trees", :action => :show, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :tree
|
2012-01-11 18:15:35 +00:00
|
|
|
|
2011-03-10 12:39:24 +00:00
|
|
|
# Commits
|
2011-10-24 11:19:04 +01:00
|
|
|
match '/projects/:project_id/git/commits/:treeish(/*path)', :controller => "git/commits", :action => :index, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :commits
|
|
|
|
match '/projects/:project_id/git/commit/:id(.:format)', :controller => "git/commits", :action => :show, :defaults => { :format => :html }, :as => :commit
|
2012-01-11 18:15:35 +00:00
|
|
|
# Commit Comments
|
|
|
|
match '/projects/:project_id/git/commit/:commit_id/comments/:id(.:format)', :controller => "comments", :action => :edit, :as => :edit_project_commit_comment, :via => :get
|
|
|
|
match '/projects/:project_id/git/commit/:commit_id/comments/:id(.:format)', :controller => "comments", :action => :update, :as => :project_commit_comment, :via => :put
|
|
|
|
match '/projects/:project_id/git/commit/:commit_id/comments/:id(.:format)', :controller => "comments", :action => :destroy, :via => :delete
|
|
|
|
match '/projects/:project_id/git/commit/:commit_id/comments(.:format)', :controller => "comments", :action => :create, :as => :project_commit_comments, :via => :post
|
2012-01-23 19:42:54 +00:00
|
|
|
# Commits subscribe
|
|
|
|
match '/projects/:project_id/git/commit/:commit_id/subscribe', :controller => "commit_subscribes", :action => :create, :defaults => { :format => :html }, :as => :subscribe_commit, :via => :post
|
|
|
|
match '/projects/:project_id/git/commit/:commit_id/unsubscribe', :controller => "commit_subscribes", :action => :destroy, :defaults => { :format => :html }, :as => :unsubscribe_commit, :via => :delete
|
2011-03-10 12:39:24 +00:00
|
|
|
# Blobs
|
2011-10-24 11:19:04 +01:00
|
|
|
match '/projects/:project_id/git/blob/:treeish/*path', :controller => "git/blobs", :action => :show, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :blob
|
|
|
|
match '/projects/:project_id/git/commit/blob/:commit_hash/*path', :controller => "git/blobs", :action => :show, :project_name => /[0-9a-zA-Z_.\-]*/, :as => :blob_commit
|
2012-01-11 18:15:35 +00:00
|
|
|
|
2011-03-10 12:39:24 +00:00
|
|
|
# Blame
|
2011-10-24 11:19:04 +01:00
|
|
|
match '/projects/:project_id/git/blame/:treeish/*path', :controller => "git/blobs", :action => :blame, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :blame
|
|
|
|
match '/projects/:project_id/git/commit/blame/:commit_hash/*path', :controller => "git/blobs", :action => :blame, :as => :blame_commit
|
2012-01-11 18:15:35 +00:00
|
|
|
|
|
|
|
# Raw
|
2011-10-24 11:19:04 +01:00
|
|
|
match '/projects/:project_id/git/raw/:treeish/*path', :controller => "git/blobs", :action => :raw, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :raw
|
|
|
|
match '/projects/:project_id/git/commit/raw/:commit_hash/*path', :controller => "git/blobs", :action => :raw, :as => :raw_commit
|
2011-03-10 12:39:24 +00:00
|
|
|
|
2011-03-09 13:13:36 +00:00
|
|
|
root :to => "platforms#index"
|
2011-11-16 18:45:01 +00:00
|
|
|
match '/forbidden', :to => 'platforms#forbidden', :as => 'forbidden'
|
2011-03-09 13:13:36 +00:00
|
|
|
end
|