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'
|
|
|
|
|
2011-10-11 21:56:51 +01:00
|
|
|
devise_for :users, :controllers => {:omniauth_callbacks => 'users/omniauth_callbacks'} do
|
|
|
|
get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru'
|
|
|
|
end
|
2011-10-24 02:55:03 +01:00
|
|
|
|
2011-10-11 21:56:51 +01:00
|
|
|
resources :users
|
2011-10-14 21:45:58 +01:00
|
|
|
|
2011-10-26 01:33:25 +01:00
|
|
|
resources :roles do
|
|
|
|
collection do
|
|
|
|
get 'get_dump'
|
|
|
|
post 'get_dump'
|
|
|
|
post 'load_from_dump'
|
|
|
|
end
|
|
|
|
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-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-10-22 16:28:41 +01:00
|
|
|
match 'build_lists/' => 'build_lists#all', :as => :all_build_lists
|
|
|
|
match 'build_lists/:id/cancel/' => 'build_lists#cancel', :as => :build_list_cancel
|
|
|
|
|
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-10-18 14:47:17 +01:00
|
|
|
resources :private_users
|
|
|
|
|
2011-03-17 14:47:16 +00:00
|
|
|
member do
|
|
|
|
get 'freeze'
|
|
|
|
get 'unfreeze'
|
2011-05-30 10:04:32 +01:00
|
|
|
get 'clone'
|
2011-03-17 14:47:16 +00:00
|
|
|
end
|
|
|
|
|
2011-10-27 12:02:25 +01:00
|
|
|
collection do
|
|
|
|
get 'easy_urpmi'
|
|
|
|
end
|
|
|
|
|
2011-04-14 18:04:32 +01:00
|
|
|
resources :products do
|
|
|
|
member do
|
|
|
|
get :clone
|
2011-04-15 10:23:12 +01:00
|
|
|
get :build
|
2011-04-14 18:04:32 +01:00
|
|
|
end
|
|
|
|
end
|
2011-04-11 09:35:08 +01:00
|
|
|
|
2011-03-11 16:13:24 +00:00
|
|
|
resources :repositories do
|
2011-10-17 15:24:45 +01:00
|
|
|
end
|
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-10-24 11:19:04 +01:00
|
|
|
resource :repo, :controller => "git/repositories", :only => [:show]
|
2011-10-17 15:24:45 +01:00
|
|
|
resources :build_lists, :only => [:index, :show] do
|
|
|
|
collection do
|
|
|
|
get :recent
|
|
|
|
post :filter
|
2011-03-11 16:13:24 +00:00
|
|
|
end
|
2011-10-17 15:24:45 +01:00
|
|
|
member do
|
|
|
|
post :publish
|
2011-03-11 16:13:24 +00:00
|
|
|
end
|
2011-03-10 14:20:09 +00:00
|
|
|
end
|
2011-10-22 16:28:41 +01:00
|
|
|
|
|
|
|
member do
|
|
|
|
get :build
|
2011-10-23 12:24:46 +01:00
|
|
|
post :process_build
|
2011-10-22 16:28:41 +01:00
|
|
|
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-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-10-17 15:24:45 +01:00
|
|
|
resources :users, :groups do
|
2011-10-16 21:48:31 +01:00
|
|
|
resources :platforms, :only => [:new, :create]
|
|
|
|
|
|
|
|
resources :projects, :only => [:new, :create]
|
|
|
|
|
|
|
|
resources :repositories, :only => [:new, :create]
|
|
|
|
end
|
|
|
|
|
2011-04-07 14:20:21 +01:00
|
|
|
match 'build_lists/status_build', :to => "build_lists#status_build"
|
2011-04-07 15:56:28 +01:00
|
|
|
match 'build_lists/post_build', :to => "build_lists#post_build"
|
2011-04-22 12:39:26 +01:00
|
|
|
match 'build_lists/pre_build', :to => "build_lists#pre_build"
|
2011-04-07 15:56:28 +01:00
|
|
|
match 'build_lists/circle_build', :to => "build_lists#circle_build"
|
2011-04-22 13:18:50 +01:00
|
|
|
match 'build_lists/new_bbdt', :to => "build_lists#new_bbdt"
|
2011-04-07 14:20:21 +01:00
|
|
|
|
2011-04-22 15:29:19 +01:00
|
|
|
match 'product_status', :to => 'products#product_status'
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# Raw
|
|
|
|
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"
|
|
|
|
end
|