routes.rb revision 5ec1c6ff5da427d945d7fb708567ce3526c4c741
2ronwalfrequire 'sidekiq/web' if defined? Sidekiq
2ronwalfrequire Rails.root.join('lib', 'router_constraints.rb')
2ronwalf
2ronwalfOntohub::Application.routes.draw do
2ronwalf
2ronwalf # IRI Routing #
2ronwalf ###############
2ronwalf #
2ronwalf
2ronwalf get ':repository_id(/*path)/:file',
2ronwalf controller: :ontologies,
2ronwalf action: :show,
2ronwalf as: :ontology_iri,
2ronwalf constraints: GroupedConstraint.new(
2ronwalf IRIRouterConstraint.new,
2ronwalf MIMERouterConstraint.new('text/plain', 'text/html'))
2ronwalf
2ronwalf #
2ronwalf ###############
2ronwalf
2ronwalf resources :ontology_types, only: :show
2ronwalf get '/after_signup', to: 'home#show' , as: 'after_sign_up'
2ronwalf
2ronwalf devise_for :users, controllers: {
2ronwalf confirmations: 'users/confirmations',
2ronwalf registrations: 'users/registrations'
2ronwalf }
2ronwalf resources :users, only: :show
2ronwalf resources :keys, except: [:show, :edit, :update]
18daenzerorama
18daenzerorama resources :logics, only: [:index, :show] do
18daenzerorama resources :supports, :only => [:create, :update, :destroy, :index]
18daenzerorama resources :graphs, :only => [:index]
2ronwalf end
38daenzerorama
2ronwalf resources :languages do
2ronwalf resources :supports, :only => [:create, :update, :destroy, :index]
18daenzerorama end
18daenzerorama
18daenzerorama resources :language_mappings
18daenzerorama resources :logic_mappings
2ronwalf
2ronwalf resources :links, :only => :index
18daenzerorama
18daenzerorama resources :categories, :only => [:index, :show]
18daenzerorama resources :projects
18daenzerorama resources :tasks
2ronwalf resources :license_models
18daenzerorama resources :formality_levels
18daenzerorama
18daenzerorama
18daenzerorama resources :language_adjoints
18daenzerorama resources :logic_adjoints
18daenzerorama
18daenzerorama resources :serializations
18daenzerorama
18daenzerorama namespace :admin do
18daenzerorama resources :teams, :only => :index
2ronwalf resources :users
resources :jobs, :only => :index
resources :status, only: :index
end
authenticate :user, lambda { |u| u.admin? } do
mount Sidekiq::Web => 'admin/sidekiq'
end
namespace :api, defaults: { format: 'json' } do
namespace :v1 do
resources :categories, only: [:index]
resources :repositories, only: [:index, :update]
resources :ontologies, only: [:index, :update]
end
end
resources :ontologies, only: [:index] do
collection do
get 'keywords' => 'ontology_search#keywords'
get 'search' => 'ontology_search#search'
get 'filters_map' => 'ontology_search#filters_map'
end
end
resources :links do
get 'update_version', :on => :member
end
resources :teams do
resources :permissions, :only => [:index], :controller => 'teams/permissions'
resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users'
end
get 'autocomplete' => 'autocomplete#index'
get 'entities_search' => 'entities_search#index'
resources :repositories do
resources :s_s_h_access, :only => :index, path: 'ssh_access'
resources :permissions, :only => [:index, :create, :update, :destroy]
resources :url_maps, except: :show
resources :errors, :only => :index
resources :repository_settings, :only => :index
resources :ontologies, only: [:index, :show, :edit, :update, :destroy] do
collection do
post 'retry_failed' => 'ontologies#retry_failed'
get 'keywords' => 'ontology_search#keywords'
get 'search' => 'ontology_search#search'
get 'filters_map' => 'ontology_search#filters_map'
end
member do
post 'retry_failed' => 'ontologies#retry_failed'
end
resources :children, :only => :index
resources :entities, :only => :index
resources :sentences, :only => :index
resources :links do
get 'update_version', :on => :member
end
resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions' do
resource :oops_request, :only => [:show, :create]
end
resources :categories
resources :tasks
resources :license_models
resources :tools
resources :projects
resources :metadata, :only => [:index, :create, :destroy]
resources :comments, :only => [:index, :create, :destroy]
resources :graphs, :only => [:index]
resources :formality_levels
end
resources :files, only: [:new, :create]
get ':ref/files(/*path)',
controller: :files,
action: :show,
as: :ref,
constraints: FilesRouterConstraint.new
get ':ref/history(/:path)',
controller: :history,
action: :show,
as: :history,
constraints: { path: /.*/ }
# action: diff, entries_info
get ':ref/:action(/:path)',
controller: :files,
as: :ref,
constraints: { path: /.*/ }
end
post ':repository_id/:path',
controller: :files,
action: :update,
as: :repository_tree,
constraints: { path: /.*/ }
get ':repository_id(/*path)',
controller: :files,
action: :show,
as: :repository_tree,
constraints: FilesRouterConstraint.new
get '*path',
controller: :ontologies,
action: :show,
as: :iri,
constraints: IRIRouterConstraint.new
root :to => 'home#index'
end