routes.rb revision 75555d8a283871bfdaee0312d2fa0ead619bf7ae
98N/Arequire 'sidekiq/web' if defined? Sidekiq
98N/Arequire Rails.root.join('lib', 'router_constraints.rb')
98N/A
98N/AOntohub::Application.routes.draw do
1265N/A
98N/A # IRI Routing #
98N/A ###############
919N/A #
919N/A
919N/A get ':repository_id(/*path)/:file',
919N/A controller: :ontologies,
919N/A action: :show,
919N/A as: :ontology_iri,
919N/A constraints: GroupedConstraint.new(
919N/A IRIRouterConstraint.new,
919N/A MIMERouterConstraint.new('text/plain', 'text/html'))
919N/A
919N/A get 'ref/:version_number/:repository_id(/*path)/:file',
919N/A controller: :ontologies,
919N/A action: :show,
919N/A as: :versioned_ontology_iri,
919N/A constraints: GroupedConstraint.new(
919N/A RefIRIRouterConstraint.new,
919N/A MIMERouterConstraint.new('text/plain', 'text/html'))
98N/A #
98N/A ###############
98N/A
98N/A resources :ontology_types, only: :show
98N/A get '/after_signup', to: 'home#show' , as: 'after_sign_up'
98N/A
1265N/A devise_for :users, controllers: {
493N/A confirmations: 'users/confirmations',
98N/A registrations: 'users/registrations'
911N/A }
1301N/A resources :users, only: :show
1301N/A resources :keys, except: [:show, :edit, :update]
1301N/A
911N/A resources :logics, only: [:index, :show] do
98N/A resources :supports, :only => [:create, :update, :destroy, :index]
235N/A resources :graphs, :only => [:index]
493N/A end
98N/A
916N/A resources :languages do
916N/A resources :supports, :only => [:create, :update, :destroy, :index]
916N/A end
916N/A
970N/A resources :language_mappings
970N/A resources :logic_mappings
970N/A
970N/A resources :links, :only => :index
970N/A
970N/A resources :categories, :only => [:index, :show]
970N/A resources :projects
970N/A resources :tasks
970N/A resources :license_models
970N/A resources :formality_levels
970N/A
970N/A
970N/A resources :language_adjoints
970N/A resources :logic_adjoints
970N/A
970N/A resources :serializations
970N/A
970N/A namespace :admin do
970N/A resources :teams, :only => :index
970N/A resources :users
970N/A resources :jobs, :only => :index
970N/A resources :status, only: :index
970N/A end
970N/A
970N/A authenticate :user, lambda { |u| u.admin? } do
1029N/A mount Sidekiq::Web => 'admin/sidekiq'
1029N/A end
1124N/A
1124N/A namespace :api, defaults: { format: 'json' } do
1124N/A namespace :v1 do
1124N/A resources :categories, only: [:index]
1124N/A resources :repositories, only: [:index, :update]
1124N/A resources :ontologies, only: [:index, :update]
1303N/A end
1303N/A end
970N/A
98N/A resources :ontologies, only: [:index] do
98N/A collection do
1265N/A get 'search' => 'ontology_search#search'
1124N/A end
1124N/A end
1124N/A
1265N/A resources :links do
1265N/A get 'update_version', :on => :member
1265N/A end
1124N/A
98N/A resources :teams do
493N/A resources :permissions, :only => [:index], :controller => 'teams/permissions'
98N/A resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users'
970N/A end
970N/A
970N/A get 'autocomplete' => 'autocomplete#index'
1026N/A get 'entities_search' => 'entities_search#index'
970N/A
970N/A resources :repositories do
1026N/A resources :s_s_h_access, :only => :index, path: 'ssh_access'
1124N/A resources :permissions, :only => [:index, :create, :update, :destroy]
1003N/A resources :url_maps, except: :show
98N/A resources :errors, :only => :index
98N/A resources :repository_settings, :only => :index
98N/A
908N/A resources :ontologies, only: [:index, :show, :edit, :update, :destroy] do
591N/A collection do
493N/A post 'retry_failed' => 'ontologies#retry_failed'
493N/A get 'search' => 'ontology_search#search'
1201N/A end
1201N/A member do
1201N/A post 'retry_failed' => 'ontologies#retry_failed'
1201N/A end
1265N/A resources :children, :only => :index
1265N/A resources :entities, :only => :index
1201N/A resources :sentences, :only => :index
1201N/A resources :links do
1201N/A get 'update_version', :on => :member
1201N/A end
493N/A resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions' do
493N/A resource :oops_request, :only => [:show, :create]
493N/A end
493N/A resources :categories
493N/A resources :tasks
493N/A resources :license_models
1026N/A resources :tools
705N/A resources :projects
493N/A
557N/A resources :metadata, :only => [:index, :create, :destroy]
1176N/A resources :comments, :only => [:index, :create, :destroy]
493N/A resources :graphs, :only => [:index]
965N/A resources :formality_levels
965N/A
965N/A end
1196N/A
1196N/A resources :files, only: [:new, :create]
1196N/A resources :directories, only: [:new, :create]
1196N/A
1196N/A get ':ref/files(/*path)',
1196N/A controller: :files,
1196N/A action: :show,
1196N/A as: :ref,
1196N/A constraints: FilesRouterConstraint.new
1196N/A
1196N/A get ':ref/history(/:path)',
606N/A controller: :history,
606N/A action: :show,
851N/A as: :history,
851N/A constraints: { path: /.*/ }
851N/A
851N/A get ':ref/diff',
851N/A controller: :diffs,
851N/A action: :show,
851N/A as: :diffs
98N/A
1193N/A # action: entries_info
1193N/A get ':ref/:action(/:path)',
1193N/A controller: :files,
591N/A as: :ref,
963N/A constraints: { path: /.*/ }
1201N/A end
910N/A
1097N/A post ':repository_id/:path',
910N/A controller: :files,
1097N/A action: :update,
910N/A as: :repository_tree,
98N/A constraints: { path: /.*/ }
98N/A
910N/A get ':repository_id(/*path)',
910N/A controller: :files,
970N/A action: :show,
1030N/A as: :repository_tree,
1030N/A constraints: FilesRouterConstraint.new
970N/A
970N/A get '*path',
970N/A controller: :ontologies,
1097N/A action: :show,
1097N/A as: :iri,
1030N/A constraints: IRIRouterConstraint.new
1030N/A
910N/A root :to => 'home#index'
98N/A
1193N/Aend
1193N/A