rosa-build/config/routes.rb

165 lines
5.2 KiB
Ruby
Raw Normal View History

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'
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-11-30 15:27:19 +00:00
resources :users do
resources :groups, :only => [:new, :create, :index]
get :autocomplete_user_uname, :on => :collection
2011-11-30 15:27:19 +00:00
end
2011-10-21 16:39:32 +01:00
resources :event_logs, :only => :index
2011-03-09 16:16:48 +00:00
#resources :downloads, :only => :index
match 'statistics/' => 'downloads#index', :as => :downloads
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
resources :categories do
get :platforms, :on => :collection
end
match '/private/:platform_name/*file_path' => 'privates#show'
match 'build_lists/publish_build', :to => "build_lists#publish_build"
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"
resources :build_lists, :only => [:index, :show] do
member do
put :cancel
put :publish
end
end
resources :auto_build_lists, :only => [:index, :create, :destroy]
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
resources :private_users, :except => [:show, :destroy, :update]
2011-03-17 14:47:16 +00:00
member do
post 'freeze'
post 'unfreeze'
2011-05-30 10:04:32 +01:00
get 'clone'
post 'clone'
post 'build_all'
2011-03-17 14:47:16 +00:00
end
collection do
get 'easy_urpmi'
2011-12-01 09:29:04 +00:00
get :autocomplete_user_uname
end
resources :products do
# member do
# get :clone
# get :build
# end
resources :product_build_lists, :only => [:create]
end
resources :repositories
resources :categories, :only => [:index, :show]
end
2011-04-11 17:37:09 +01:00
resources :projects do
resources :issues do
resources :comments, :only => [:edit, :create, :update, :destroy]
resources :subscribes, :only => [:create, :destroy]
end
resource :repo, :controller => "git/repositories", :only => [:show]
resources :build_lists, :only => [:index, :new, :create]
2011-10-30 21:52:25 +00:00
resources :collaborators, :only => [:index, :edit, :update, :add] do
2011-10-30 21:52:25 +00:00
collection do
get :edit
post :update
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
member do
post :fork
end
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-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
get :autocomplete_group_uname, :on => :collection
resources :members, :only => [:index, :edit, :update, :add] do
2011-12-05 12:32:18 +00:00
collection do
get :edit
post :add
2011-12-05 12:32:18 +00:00
post :update
end
member do
post :update
end
end
end
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
# 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
match 'product_status', :to => 'product_build_lists#status_build'
# Tree
match '/projects/:project_id/git/tree/:treeish(/*path)', :controller => "git/trees", :action => :show, :treeish => /[0-9a-zA-Z_.\-]*/, :defaults => { :treeish => :master }, :as => :tree
# Commits
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
# Blobs
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
# Blame
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-09 13:13:36 +00:00
root :to => "platforms#index"
match '/forbidden', :to => 'platforms#forbidden', :as => 'forbidden'
2011-03-09 13:13:36 +00:00
end