/
routes.rb
63 lines (48 loc) · 2.44 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
SoftwareOO::Application.routes.draw do
controller :main do
match '/' => :index
match 'developer' => :developer
match ':release/download.js' => :download_js
match 'main/download' => :download
match '121' => :release, :release => "121", :outdated => true
match '121/:locale' => :release, :release => "121", :outdated => true, :constraints => { :locale => /[\w]+/ }
match ':release' => :release, :constraints => { :release => /[123][\d]+/ }, :format => false
match ':release/:locale' => :release, :constraints => { :release => /[123][\d]+/, :locale => /[\w]+/ }, :format => false
match 'developer/:locale' => :release, :release => "developer", :format => false, :constraints => { :locale => /[\w]+/ }
match 'change_install' => :change_install
match 'ymp/:project/:repository/:package.ymp' => :ymp_without_arch_and_version,
:constraints => { :project => /[\w\-\.:\+]+/, :repository => /[\w\-\.:\+]+/, :package => /[-+\w\.:\@]+/ }
match 'ymp/:project/:repository/:arch/:binary.ymp' => :ymp_with_arch_and_version,
:constrains => { :project => /[\w\-\.:]+/, :repository => /[\w\-\.:]+/, :arch => /[\w\-\.:]+/, :binary => /[\w\-\.:\+]+/ }
end
controller :search do
match 'search' => :searchresult, :format => false
match 'find' => :find, :format => false
end
controller :package do
match 'package/:package' => :show, :constraints => { :package => /[-+\w\.:\@]+/ }
match 'package/thumbnail/:package.png' => :thumbnail, :constraints => { :package => /[-+\w\.:\@]+/ }
match 'package/screenshot/:package.png' => :screenshot, :constraints => { :package => /[-+\w\.:\@]+/ }
match 'packages' => :categories
match 'appstore' => :categories
match 'appstore/:category' => :category, :constraints => { :category => /[\w\-\.: ]+/ }
end
resource :orders, :controller => "order" do
member do
get 'thanks'
end
end
controller 'order' do
match 'order/thanks' => :thanks
end
match 'promodvd' => "order#new"
match 'promodvds' => "order#new"
match 'codecs' => "codecs#index"
match 'statistic' => "statistic#index"
# compatibility routes for old download implementation
match 'download' => "download#package"
match 'download.:format' => "download#package"
match 'download/iframe' => "download#package", :format => 'iframe'
match 'download/json' => "download#package", :format => 'json'
match '/download/:action(.:format)', :controller => 'download'
end