Sha256: 7760c28cc6f8e8be737c64f795a1070f00f004481b6efe1cfb895d0a7681dbd8

Contents?: true

Size: 1.45 KB

Versions: 3

Compression:

Stored size: 1.45 KB

Contents

PublishMyData::Engine.routes.draw do

  # resource show
  match "/resource(.:format)" => "resources#show", :as => 'show_resource' # http://resource?uri=http://foo.bar

  # resources lists
  match "/resources(.:format)" => "resources#index", :as => 'list_resources' # +filters on thh query string

  # datasets

  # note that the separate .:format and no-format verisons allow extensions like .json on the end of the uri not to be globbed as the *id
  match "/data/*id/dump" => "datasets#dump", :as => 'dataset_dump'
  match "/data/*id.:format" => "information_resources#data"
  match "/data/*id" => "information_resources#data", :as => 'dataset'
  match "/data(.:format)" => "datasets#index",  :as => 'datasets'

  # themes
  resources :themes, :only => [:index, :show]

  # URI dereferencing
  match "/id/*path" => "resources#id"
  match "/doc/*path.:format" => "resources#doc"
  match "/doc/*path" => "resources#doc"

  # download paths
  match "/def/*id/dump" => "information_resources#dump"
  match "/vocabularies/:id/dump" => "vocabularies#dump"

  # def pages
  match "/def/*id.:format" => "information_resources#def"
  match "/def/*id" => "information_resources#def"

  # queries
  resources :queries, :only => [:show] # add index later

  # SPARQL
  match "sparql(.:format)" => "sparql#endpoint", :as => 'sparql_endpoint' # the main sparql endpoint

  #http://techoctave.com/c7/posts/36-rails-3-0-rescue-from-routing-error-solution
  match '*a', :to => 'errors#routing'
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
publish_my_data-0.0.32 config/routes.rb
publish_my_data-0.0.31 config/routes.rb
publish_my_data-0.0.30 config/routes.rb