fix syntax
[opensuse:software-o-o.git] / config / routes.rb
1 ActionController::Routing::Routes.draw do |map|
2   # The priority is based upon order of creation: first created -> highest priority.
3   
4   # Sample of regular route:
5   # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
6   # Keep in mind you can assign values other than :controller and :action
7
8   # Sample of named route:
9   # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
10   # This route can be invoked with purchase_url(:id => product.id)
11
12   # You can have the root of your site routed by hooking up '' 
13   # -- just remember to delete public/index.html.
14   # map.connect '', :controller => "welcome"
15
16   # Allow downloading Web Service WSDL as a file with an extension
17   # instead of a file named 'wsdl'
18   # map.connect ':controller/service.wsdl', :action => 'wsdl'
19
20   map.connect '/', :controller => 'main', :action => 'index'
21   map.connect 'developer', :controller => 'main', :action => 'developer'
22   map.connect ':release/download.js', :controller => 'main', :action => 'download_js'
23   map.connect '114', :controller => 'main', :action => :index
24   map.connect '114/:lang', :controller => 'main', :action => 'release', :release => "114"
25   map.connect '113/:lang', :controller => 'main', :action => 'release', :release => "113"
26   map.connect '112/:lang', :controller => 'main', :action => 'release', :release => "112"
27   map.connect '111/:lang', :controller => 'main', :action => 'release', :release => "111"
28   map.connect 'developer/:lang', :controller => 'main', :action => 'release', :release => "developer"
29
30   map.connect 'promodvd', :controller => 'order', :action => 'new'
31   map.connect 'promodvds', :controller => 'order', :action => 'new'
32   
33   map.connect 'ymp/:project/:repository/:package.ymp', 
34     :requirements => { :project => /[\w\-\.:]+/, :repository => /[\w\-\.:]+/, :package => /[\w\-\.:]+/ },
35     :controller => 'main', :action => 'ymp_without_arch_and_version'
36   map.connect 'ymp/:project/:repository/:arch/:binary.ymp',
37     :requirements => { :project => /[\w\-\.:]+/, :repository => /[\w\-\.:]+/, :package => /[\w\-\.:]+/ },
38     :controller => 'main', :action => 'ymp_with_arch_and_version'
39
40   map.connect '/codecs', :controller => 'codecs', :action => 'index'
41
42   map.connect '/download.html', :controller => 'download', :action => 'iframe'
43   map.connect '/download.json', :controller => 'download', :action => 'json'
44
45   # Install the default route as the lowest priority.
46   map.connect ':controller/:action/:id.:format'
47   map.connect ':controller/:action/:id'
48 end