routes.rb revision 23f0ab4a423943eb59109df37074ef0c330d07c0
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenrequire Rails.root.join('lib', 'router_constraints.rb')
16f816d3f3c32ae3351834253f52ddd0212bcbf3Timo SirainenSpecroutes.define(Ontohub::Application.routes) do
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen # IRI Routing #
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen ###############
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen # as per Loc/Id definition
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen # Special (/ref-based) Loc/Id routes
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen specified_get '/ref/:reference/:repository_id/*locid' => 'ontologies#show',
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen RefLocIdRouterConstraint.new(Ontology, ontology: :id),
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen doc title: 'Ontology IRI (loc/id) with version reference',
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo SirainenWill return a representation of the ontology at a
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenontology version referenced by the {reference}.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen # MMT-Support
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen specified_get '/ref/mmt/:repository_id/*path' => 'ontologies#show',
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen as: :ontology_iri_mmt,
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen constraints: [
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen MMTRouterConstraint.new(Ontology, ontology: :id),
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen accept 'text/html'
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen accept 'text/plain'
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen accept 'application/json'
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen doc title: 'MMT reference to an ontology',
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen body: <<-BODY
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo SirainenWill return a representation of the ontology. The ontology
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainenis determined according to the *path and to the MMT-query-string.
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen specified_get '/ref/mmt/:repository_id/*path' => 'mappings#show',
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen as: :ontology_iri_mmt,
fcfb528483369975066c6adf1c55c16e6fb6e91fTimo Sirainen constraints: [
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen MMTRouterConstraint.new(Mapping, ontology: :ontology_id, element: :id),
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen accept 'text/html'
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen accept 'application/json'
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen doc title: 'MMT reference to a mapping',
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen body: <<-BODY
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo SirainenWill return a representation of the mapping. The mapping
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainenis determined according to the *path and to the MMT-query-string.
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen specified_get '/ref/mmt/:repository_id/*path' => 'symbols#index',
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen as: :ontology_iri_mmt,
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen constraints: [
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen MMTRouterConstraint.new(OntologyMember::Symbol, ontology: :ontology_id),
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen accept 'text/html'
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen accept 'application/json'
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen doc title: 'MMT reference to a symbol',
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen body: <<-BODY
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo SirainenWill return a representation of the symbol. The symbol
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainenis determined according to the *path and to the MMT-query-string.
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo SirainenCurrently the representation ist a list of all symbols in the ontology.
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen specified_get '/ref/mmt/:repository_id/*path' => 'sentences#index',
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen as: :ontology_iri_mmt,
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen constraints: [
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen MMTRouterConstraint.new(Sentence, ontology: :ontology_id),
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen accept 'text/html'
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen accept 'application/json'
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen doc title: 'MMT reference to a sentence',
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen body: <<-BODY
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo SirainenWill return a representation of the sentence. The sentence
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainenis determined according to the *path and to the MMT-query-string.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCurrently the representation is a list of all sentences in the ontology.
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen # Subsites for ontologies
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo Sirainen ontology_subsites = %i(
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen mappings symbols children
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen sentences theorems comments
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117Timo Sirainen metadata ontology_versions graphs
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen projects categories tasks license_models formality_levels
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen ontology_subsites.each do |category|
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen specified_get "/:repository_id/*locid///#{category}" => "#{category}#index",
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen as: :"ontology_iri_#{category}",
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen constraints: [
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen LocIdRouterConstraint.new(Ontology, ontology: :ontology_id),
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen accept 'text/html'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen accept 'application/json'
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen doc title: "Ontology subsite about #{category.to_s.gsub(/_/, ' ')}",
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen body: <<-BODY
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo SirainenWill provide a subsite of a specific ontology.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen # Loc/Id-Show(-equivalent) routes
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen specified_get '/:repository_id/*locid' => 'ontologies#show',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen as: :ontology_iri,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen constraints: [
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen LocIdRouterConstraint.new(Ontology, ontology: :id),
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen accept 'text/html'
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen accept 'text/plain'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen accept 'application/json'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen doc title: 'loc/id reference to an ontology',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen body: <<-BODY
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo SirainenWill return a representation of the ontology. The ontology
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainenis determined according to the *locid.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen specified_get '/:repository_id/*locid' => 'mappings#show',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen as: :mapping_iri,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen constraints: [
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen LocIdRouterConstraint.new(Mapping, ontology: :ontology_id, element: :id),
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen accept 'text/html'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen accept 'application/json'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen doc title: 'loc/id reference to a mapping',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen body: <<-BODY
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo SirainenWill return a representation of the mapping. The mapping
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainenis determined according to the *locid.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen specified_get '/:repository_id/*locid' => 'symbols#index',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen as: :symbol_iri,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen constraints: [
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen LocIdRouterConstraint.new(OntologyMember::Symbol, ontology: :ontology_id),
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen accept 'text/html'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen accept 'application/json'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen doc title: 'loc/id reference to a symbol',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen body: <<-BODY
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo SirainenWill return a representation of the symbol. The symbol
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainenis determined according to the *locid.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo SirainenCurrently this will return the list of all symbols of the ontology.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen specified_get '/:repository_id/*locid' => 'sentences#index',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen as: :ontology_iri,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen constraints: [
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen LocIdRouterConstraint.new(Sentence, ontology: :ontology_id),
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen accept 'text/html'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen accept 'application/json'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen doc title: 'loc/id reference to a sentence',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen body: <<-BODY
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo SirainenWill return a representation of the sentence. The sentence
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainenis determined according to the *locid.
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo SirainenCurrently this will return the list of all sentence of the ontology.
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen ###############
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :ontology_types, only: :show
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen get '/after_signup', to: 'home#show' , as: 'after_sign_up'
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen devise_for :users, controllers: {
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen confirmations: 'users/confirmations',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen registrations: 'users/registrations'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :users, only: :show
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :keys, except: [:show, :edit, :update]
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :logics, only: [:index, :show] do
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :supports, :only => [:create, :update, :destroy, :index]
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :graphs, :only => [:index]
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :languages do
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :supports, :only => [:create, :update, :destroy, :index]
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :language_mappings
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :logic_mappings
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :mappings, only: :index
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :categories, :only => [:index, :show]
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :projects
785b1ca149341b70bf2cb8cc3049f1c4c1070b52Timo Sirainen resources :tasks
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :license_models
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :formality_levels
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :language_adjoints
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :logic_adjoints
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :serializations
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen namespace :admin do
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :teams, :only => :index
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :users
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :jobs, :only => :index
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :status, only: :index
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen authenticate :user, lambda { |u| u.admin? } do
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen mount Sidekiq::Web => 'admin/sidekiq'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen namespace :api, defaults: { format: 'json' } do
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen namespace :v1 do
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :categories, only: [:index]
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :repositories, only: [:index, :update]
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen resources :ontologies, only: [:index, :update]
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :ontologies, only: [:index] do
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen collection do
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen get 'search' => 'ontology_search#search'
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen resources :mappings do
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen get 'update_version', :on => :member
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :teams do
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :permissions, :only => [:index], :controller => 'teams/permissions'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users'
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen get 'autocomplete' => 'autocomplete#index'
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen get 'symbols_search' => 'symbols_search#index'
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen resources :repositories do
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen post 'undestroy',
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen controller: :repositories,
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen action: :undestroy,
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen as: :undestroy
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen resources :s_s_h_access, :only => :index, path: 'ssh_access'
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :permissions, :only => [:index, :create, :update, :destroy]
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen resources :url_maps, except: :show
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :errors, :only => :index
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen resources :repository_settings, :only => :index
dd4b5f14b71b01a84af942e720a2d6e5f15ee1a7Timo Sirainen resources :ontologies, only: [:index, :show, :edit, :update, :destroy] do
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen collection do
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen post 'retry_failed' => 'ontologies#retry_failed'
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen get 'search' => 'ontology_search#search'
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen post 'retry_failed' => 'ontologies#retry_failed'
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen resources :children, :only => :index
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :symbols, only: :index
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :sentences, :only => :index
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :theorems, only: :index
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen resources :mappings do
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen get 'update_version', :on => :member
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions' do
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen resource :oops_request, :only => [:show, :create]
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen resources :categories
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :tasks
710deabc6b3c305c3a842e7a2e0d173c526d13a7Timo Sirainen resources :license_models
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :tools
710deabc6b3c305c3a842e7a2e0d173c526d13a7Timo Sirainen resources :projects
710deabc6b3c305c3a842e7a2e0d173c526d13a7Timo Sirainen resources :metadata, :only => [:index, :create, :destroy]
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :comments, :only => [:index, :create, :destroy]
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :graphs, :only => [:index]
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :formality_levels
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen resources :files, only: [:new, :create]
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen resources :repository_directories, only: [:create]
dd4b5f14b71b01a84af942e720a2d6e5f15ee1a7Timo Sirainen get ':ref/files(/*path)',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen controller: :files,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen action: :show,
dd4b5f14b71b01a84af942e720a2d6e5f15ee1a7Timo Sirainen constraints: FilesRouterConstraint.new
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen get ':ref/history(/:path)',
dd4b5f14b71b01a84af942e720a2d6e5f15ee1a7Timo Sirainen controller: :history,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen action: :show,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen as: :history,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen constraints: { path: /.*/ }
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen get ':ref/diff',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen controller: :diffs,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen action: :show,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen # action: entries_info
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen get ':ref/:action(/:path)',
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen controller: :files,
dd4b5f14b71b01a84af942e720a2d6e5f15ee1a7Timo Sirainen constraints: { path: /.*/ }
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen post ':repository_id/:path',
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen controller: :files,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen action: :update,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen as: :repository_tree,
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen constraints: { path: /.*/ }
710deabc6b3c305c3a842e7a2e0d173c526d13a7Timo Sirainen get ':repository_id(/*path)',
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen controller: :files,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen action: :show,
710deabc6b3c305c3a842e7a2e0d173c526d13a7Timo Sirainen as: :repository_tree,
992a13add4eea0810e4db0f042a595dddf85536aTimo Sirainen constraints: FilesRouterConstraint.new
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen controller: :ontologies,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen action: :show,
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen constraints: IRIRouterConstraint.new
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen root :to => 'home#index'