@@ -1,205 +1,203 | |||||
1 | ActionController::Routing::Routes.draw do |map| |
|
1 | ActionController::Routing::Routes.draw do |map| | |
2 | # Add your own custom routes here. |
|
2 | # Add your own custom routes here. | |
3 | # The priority is based upon order of creation: first created -> highest priority. |
|
3 | # The priority is based upon order of creation: first created -> highest priority. | |
4 |
|
4 | |||
5 | # Here's a sample route: |
|
5 | # Here's a sample route: | |
6 | # map.connect 'products/:id', :controller => 'catalog', :action => 'view' |
|
6 | # map.connect 'products/:id', :controller => 'catalog', :action => 'view' | |
7 | # Keep in mind you can assign values other than :controller and :action |
|
7 | # Keep in mind you can assign values other than :controller and :action | |
8 |
|
8 | |||
9 | map.home '', :controller => 'welcome' |
|
9 | map.home '', :controller => 'welcome' | |
10 |
|
10 | |||
11 | map.signin 'login', :controller => 'account', :action => 'login' |
|
11 | map.signin 'login', :controller => 'account', :action => 'login' | |
12 | map.signout 'logout', :controller => 'account', :action => 'logout' |
|
12 | map.signout 'logout', :controller => 'account', :action => 'logout' | |
13 |
|
13 | |||
14 | map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow' |
|
14 | map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow' | |
15 | map.connect 'help/:ctrl/:page', :controller => 'help' |
|
15 | map.connect 'help/:ctrl/:page', :controller => 'help' | |
16 |
|
16 | |||
17 | map.time_entries_context_menu '/time_entries/context_menu', |
|
17 | map.time_entries_context_menu '/time_entries/context_menu', | |
18 | :controller => 'context_menus', :action => 'time_entries' |
|
18 | :controller => 'context_menus', :action => 'time_entries' | |
19 |
|
19 | |||
20 | map.resources :time_entries, :controller => 'timelog', :collection => {:report => :get, :bulk_edit => :get, :bulk_update => :post} |
|
20 | map.resources :time_entries, :controller => 'timelog', :collection => {:report => :get, :bulk_edit => :get, :bulk_update => :post} | |
21 |
|
21 | |||
22 | map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post} |
|
22 | map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post} | |
23 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :get} |
|
23 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :get} | |
24 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :post} |
|
24 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :post} | |
25 |
|
25 | |||
26 | map.with_options :controller => 'messages' do |messages_routes| |
|
26 | map.with_options :controller => 'messages' do |messages_routes| | |
27 | messages_routes.with_options :conditions => {:method => :get} do |messages_views| |
|
27 | messages_routes.with_options :conditions => {:method => :get} do |messages_views| | |
28 | messages_views.connect 'boards/:board_id/topics/new', :action => 'new' |
|
28 | messages_views.connect 'boards/:board_id/topics/new', :action => 'new' | |
29 | messages_views.connect 'boards/:board_id/topics/:id', :action => 'show' |
|
29 | messages_views.connect 'boards/:board_id/topics/:id', :action => 'show' | |
30 | messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit' |
|
30 | messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit' | |
31 | end |
|
31 | end | |
32 | messages_routes.with_options :conditions => {:method => :post} do |messages_actions| |
|
32 | messages_routes.with_options :conditions => {:method => :post} do |messages_actions| | |
33 | messages_actions.connect 'boards/:board_id/topics/new', :action => 'new' |
|
33 | messages_actions.connect 'boards/:board_id/topics/new', :action => 'new' | |
34 | messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply' |
|
34 | messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply' | |
35 | messages_actions.connect 'boards/:board_id/topics/:id/:action', :action => /edit|destroy/ |
|
35 | messages_actions.connect 'boards/:board_id/topics/:id/:action', :action => /edit|destroy/ | |
36 | end |
|
36 | end | |
37 | end |
|
37 | end | |
38 |
|
38 | |||
39 | map.resources :issue_moves, :only => [:new, :create], :path_prefix => '/issues', :as => 'move' |
|
39 | map.resources :issue_moves, :only => [:new, :create], :path_prefix => '/issues', :as => 'move' | |
40 | map.resources :queries, :except => [:show] |
|
40 | map.resources :queries, :except => [:show] | |
41 |
|
41 | |||
42 | # Misc issue routes. TODO: move into resources |
|
42 | # Misc issue routes. TODO: move into resources | |
43 | map.auto_complete_issues '/issues/auto_complete', :controller => 'auto_completes', :action => 'issues', :conditions => { :method => :get } |
|
43 | map.auto_complete_issues '/issues/auto_complete', :controller => 'auto_completes', :action => 'issues', :conditions => { :method => :get } | |
44 | map.preview_issue '/issues/preview/:id', :controller => 'previews', :action => 'issue' # TODO: would look nicer as /issues/:id/preview |
|
44 | map.preview_issue '/issues/preview/:id', :controller => 'previews', :action => 'issue' # TODO: would look nicer as /issues/:id/preview | |
45 | map.issues_context_menu '/issues/context_menu', :controller => 'context_menus', :action => 'issues' |
|
45 | map.issues_context_menu '/issues/context_menu', :controller => 'context_menus', :action => 'issues' | |
46 | map.issue_changes '/issues/changes', :controller => 'journals', :action => 'index' |
|
46 | map.issue_changes '/issues/changes', :controller => 'journals', :action => 'index' | |
47 | map.bulk_edit_issue 'issues/bulk_edit', :controller => 'issues', :action => 'bulk_edit', :conditions => { :method => :get } |
|
|||
48 | map.bulk_update_issue 'issues/bulk_edit', :controller => 'issues', :action => 'bulk_update', :conditions => { :method => :post } |
|
|||
49 | map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new', :id => /\d+/, :conditions => { :method => :post } |
|
47 | map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new', :id => /\d+/, :conditions => { :method => :post } | |
50 | map.connect '/issues/:id/destroy', :controller => 'issues', :action => 'destroy', :conditions => { :method => :post } # legacy |
|
48 | map.connect '/issues/:id/destroy', :controller => 'issues', :action => 'destroy', :conditions => { :method => :post } # legacy | |
51 |
|
49 | |||
52 | map.with_options :controller => 'gantts', :action => 'show' do |gantts_routes| |
|
50 | map.with_options :controller => 'gantts', :action => 'show' do |gantts_routes| | |
53 | gantts_routes.connect '/projects/:project_id/issues/gantt' |
|
51 | gantts_routes.connect '/projects/:project_id/issues/gantt' | |
54 | gantts_routes.connect '/projects/:project_id/issues/gantt.:format' |
|
52 | gantts_routes.connect '/projects/:project_id/issues/gantt.:format' | |
55 | gantts_routes.connect '/issues/gantt.:format' |
|
53 | gantts_routes.connect '/issues/gantt.:format' | |
56 | end |
|
54 | end | |
57 |
|
55 | |||
58 | map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes| |
|
56 | map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes| | |
59 | calendars_routes.connect '/projects/:project_id/issues/calendar' |
|
57 | calendars_routes.connect '/projects/:project_id/issues/calendar' | |
60 | calendars_routes.connect '/issues/calendar' |
|
58 | calendars_routes.connect '/issues/calendar' | |
61 | end |
|
59 | end | |
62 |
|
60 | |||
63 | map.with_options :controller => 'reports', :conditions => {:method => :get} do |reports| |
|
61 | map.with_options :controller => 'reports', :conditions => {:method => :get} do |reports| | |
64 | reports.connect 'projects/:id/issues/report', :action => 'issue_report' |
|
62 | reports.connect 'projects/:id/issues/report', :action => 'issue_report' | |
65 | reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details' |
|
63 | reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details' | |
66 | end |
|
64 | end | |
67 |
|
65 | |||
68 | map.resources :issues do |issues| |
|
66 | map.resources :issues, :collection => {:bulk_edit => :get, :bulk_update => :post} do |issues| | |
69 | issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get} |
|
67 | issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get} | |
70 | issues.resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy] |
|
68 | issues.resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy] | |
71 | end |
|
69 | end | |
72 |
|
70 | |||
73 | map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new' |
|
71 | map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new' | |
74 |
|
72 | |||
75 | map.resources :users |
|
73 | map.resources :users | |
76 | map.with_options :controller => 'users' do |users| |
|
74 | map.with_options :controller => 'users' do |users| | |
77 | users.user_memberships 'users/:id/memberships', :action => 'edit_membership', :conditions => {:method => :post} |
|
75 | users.user_memberships 'users/:id/memberships', :action => 'edit_membership', :conditions => {:method => :post} | |
78 | users.user_membership 'users/:id/memberships/:membership_id', :action => 'edit_membership', :conditions => {:method => :put} |
|
76 | users.user_membership 'users/:id/memberships/:membership_id', :action => 'edit_membership', :conditions => {:method => :put} | |
79 | users.connect 'users/:id/memberships/:membership_id', :action => 'destroy_membership', :conditions => {:method => :delete} |
|
77 | users.connect 'users/:id/memberships/:membership_id', :action => 'destroy_membership', :conditions => {:method => :delete} | |
80 | end |
|
78 | end | |
81 |
|
79 | |||
82 | # For nice "roadmap" in the url for the index action |
|
80 | # For nice "roadmap" in the url for the index action | |
83 | map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index' |
|
81 | map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index' | |
84 |
|
82 | |||
85 | map.all_news 'news', :controller => 'news', :action => 'index' |
|
83 | map.all_news 'news', :controller => 'news', :action => 'index' | |
86 | map.formatted_all_news 'news.:format', :controller => 'news', :action => 'index' |
|
84 | map.formatted_all_news 'news.:format', :controller => 'news', :action => 'index' | |
87 | map.preview_news '/news/preview', :controller => 'previews', :action => 'news' |
|
85 | map.preview_news '/news/preview', :controller => 'previews', :action => 'news' | |
88 | map.connect 'news/:id/comments', :controller => 'comments', :action => 'create', :conditions => {:method => :post} |
|
86 | map.connect 'news/:id/comments', :controller => 'comments', :action => 'create', :conditions => {:method => :post} | |
89 | map.connect 'news/:id/comments/:comment_id', :controller => 'comments', :action => 'destroy', :conditions => {:method => :delete} |
|
87 | map.connect 'news/:id/comments/:comment_id', :controller => 'comments', :action => 'destroy', :conditions => {:method => :delete} | |
90 |
|
88 | |||
91 | map.resources :projects, :member => { |
|
89 | map.resources :projects, :member => { | |
92 | :copy => [:get, :post], |
|
90 | :copy => [:get, :post], | |
93 | :settings => :get, |
|
91 | :settings => :get, | |
94 | :modules => :post, |
|
92 | :modules => :post, | |
95 | :archive => :post, |
|
93 | :archive => :post, | |
96 | :unarchive => :post |
|
94 | :unarchive => :post | |
97 | } do |project| |
|
95 | } do |project| | |
98 | project.resource :project_enumerations, :as => 'enumerations', :only => [:update, :destroy] |
|
96 | project.resource :project_enumerations, :as => 'enumerations', :only => [:update, :destroy] | |
99 | project.resources :issues, :only => [:index, :new, :create] do |issues| |
|
97 | project.resources :issues, :only => [:index, :new, :create] do |issues| | |
100 | issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get} |
|
98 | issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get} | |
101 | end |
|
99 | end | |
102 | project.resources :files, :only => [:index, :new, :create] |
|
100 | project.resources :files, :only => [:index, :new, :create] | |
103 | project.resources :versions, :shallow => true, :collection => {:close_completed => :put}, :member => {:status_by => :post} |
|
101 | project.resources :versions, :shallow => true, :collection => {:close_completed => :put}, :member => {:status_by => :post} | |
104 | project.resources :news, :shallow => true |
|
102 | project.resources :news, :shallow => true | |
105 | project.resources :time_entries, :controller => 'timelog', :path_prefix => 'projects/:project_id', :collection => {:report => :get} |
|
103 | project.resources :time_entries, :controller => 'timelog', :path_prefix => 'projects/:project_id', :collection => {:report => :get} | |
106 | project.resources :queries, :only => [:new, :create] |
|
104 | project.resources :queries, :only => [:new, :create] | |
107 | project.resources :issue_categories, :shallow => true |
|
105 | project.resources :issue_categories, :shallow => true | |
108 | project.resources :documents, :shallow => true, :member => {:add_attachment => :post} |
|
106 | project.resources :documents, :shallow => true, :member => {:add_attachment => :post} | |
109 | project.resources :boards |
|
107 | project.resources :boards | |
110 |
|
108 | |||
111 | project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get} |
|
109 | project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get} | |
112 | project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get} |
|
110 | project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get} | |
113 | project.wiki_diff 'wiki/:id/diff/:version', :controller => 'wiki', :action => 'diff', :version => nil |
|
111 | project.wiki_diff 'wiki/:id/diff/:version', :controller => 'wiki', :action => 'diff', :version => nil | |
114 | project.wiki_diff 'wiki/:id/diff/:version/vs/:version_from', :controller => 'wiki', :action => 'diff' |
|
112 | project.wiki_diff 'wiki/:id/diff/:version/vs/:version_from', :controller => 'wiki', :action => 'diff' | |
115 | project.wiki_annotate 'wiki/:id/annotate/:version', :controller => 'wiki', :action => 'annotate' |
|
113 | project.wiki_annotate 'wiki/:id/annotate/:version', :controller => 'wiki', :action => 'annotate' | |
116 | project.resources :wiki, :except => [:new, :create], :member => { |
|
114 | project.resources :wiki, :except => [:new, :create], :member => { | |
117 | :rename => [:get, :post], |
|
115 | :rename => [:get, :post], | |
118 | :history => :get, |
|
116 | :history => :get, | |
119 | :preview => :any, |
|
117 | :preview => :any, | |
120 | :protect => :post, |
|
118 | :protect => :post, | |
121 | :add_attachment => :post |
|
119 | :add_attachment => :post | |
122 | }, :collection => { |
|
120 | }, :collection => { | |
123 | :export => :get, |
|
121 | :export => :get, | |
124 | :date_index => :get |
|
122 | :date_index => :get | |
125 | } |
|
123 | } | |
126 |
|
124 | |||
127 | end |
|
125 | end | |
128 |
|
126 | |||
129 | # Destroy uses a get request to prompt the user before the actual DELETE request |
|
127 | # Destroy uses a get request to prompt the user before the actual DELETE request | |
130 | map.project_destroy_confirm 'projects/:id/destroy', :controller => 'projects', :action => 'destroy', :conditions => {:method => :get} |
|
128 | map.project_destroy_confirm 'projects/:id/destroy', :controller => 'projects', :action => 'destroy', :conditions => {:method => :get} | |
131 |
|
129 | |||
132 | # TODO: port to be part of the resources route(s) |
|
130 | # TODO: port to be part of the resources route(s) | |
133 | map.with_options :controller => 'projects' do |project_mapper| |
|
131 | map.with_options :controller => 'projects' do |project_mapper| | |
134 | project_mapper.with_options :conditions => {:method => :get} do |project_views| |
|
132 | project_mapper.with_options :conditions => {:method => :get} do |project_views| | |
135 | project_views.connect 'projects/:id/settings/:tab', :controller => 'projects', :action => 'settings' |
|
133 | project_views.connect 'projects/:id/settings/:tab', :controller => 'projects', :action => 'settings' | |
136 | project_views.connect 'projects/:project_id/issues/:copy_from/copy', :controller => 'issues', :action => 'new' |
|
134 | project_views.connect 'projects/:project_id/issues/:copy_from/copy', :controller => 'issues', :action => 'new' | |
137 | end |
|
135 | end | |
138 | end |
|
136 | end | |
139 |
|
137 | |||
140 | map.with_options :controller => 'activities', :action => 'index', :conditions => {:method => :get} do |activity| |
|
138 | map.with_options :controller => 'activities', :action => 'index', :conditions => {:method => :get} do |activity| | |
141 | activity.connect 'projects/:id/activity' |
|
139 | activity.connect 'projects/:id/activity' | |
142 | activity.connect 'projects/:id/activity.:format' |
|
140 | activity.connect 'projects/:id/activity.:format' | |
143 | activity.connect 'activity', :id => nil |
|
141 | activity.connect 'activity', :id => nil | |
144 | activity.connect 'activity.:format', :id => nil |
|
142 | activity.connect 'activity.:format', :id => nil | |
145 | end |
|
143 | end | |
146 |
|
144 | |||
147 | map.with_options :controller => 'repositories' do |repositories| |
|
145 | map.with_options :controller => 'repositories' do |repositories| | |
148 | repositories.with_options :conditions => {:method => :get} do |repository_views| |
|
146 | repositories.with_options :conditions => {:method => :get} do |repository_views| | |
149 | repository_views.connect 'projects/:id/repository', :action => 'show' |
|
147 | repository_views.connect 'projects/:id/repository', :action => 'show' | |
150 | repository_views.connect 'projects/:id/repository/edit', :action => 'edit' |
|
148 | repository_views.connect 'projects/:id/repository/edit', :action => 'edit' | |
151 | repository_views.connect 'projects/:id/repository/statistics', :action => 'stats' |
|
149 | repository_views.connect 'projects/:id/repository/statistics', :action => 'stats' | |
152 | repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions' |
|
150 | repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions' | |
153 | repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions' |
|
151 | repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions' | |
154 | repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision' |
|
152 | repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision' | |
155 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff' |
|
153 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff' | |
156 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' |
|
154 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' | |
157 | repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path', :action => 'entry', :format => 'raw', :requirements => { :rev => /[a-z0-9\.\-_]+/ } |
|
155 | repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path', :action => 'entry', :format => 'raw', :requirements => { :rev => /[a-z0-9\.\-_]+/ } | |
158 | repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path', :requirements => { :rev => /[a-z0-9\.\-_]+/ } |
|
156 | repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path', :requirements => { :rev => /[a-z0-9\.\-_]+/ } | |
159 | repository_views.connect 'projects/:id/repository/raw/*path', :action => 'entry', :format => 'raw' |
|
157 | repository_views.connect 'projects/:id/repository/raw/*path', :action => 'entry', :format => 'raw' | |
160 | # TODO: why the following route is required? |
|
158 | # TODO: why the following route is required? | |
161 | repository_views.connect 'projects/:id/repository/entry/*path', :action => 'entry' |
|
159 | repository_views.connect 'projects/:id/repository/entry/*path', :action => 'entry' | |
162 | repository_views.connect 'projects/:id/repository/:action/*path' |
|
160 | repository_views.connect 'projects/:id/repository/:action/*path' | |
163 | end |
|
161 | end | |
164 |
|
162 | |||
165 | repositories.connect 'projects/:id/repository/:action', :conditions => {:method => :post} |
|
163 | repositories.connect 'projects/:id/repository/:action', :conditions => {:method => :post} | |
166 | end |
|
164 | end | |
167 |
|
165 | |||
168 | map.resources :attachments, :only => [:show, :destroy] |
|
166 | map.resources :attachments, :only => [:show, :destroy] | |
169 | # additional routes for having the file name at the end of url |
|
167 | # additional routes for having the file name at the end of url | |
170 | map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/ |
|
168 | map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/ | |
171 | map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/ |
|
169 | map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/ | |
172 |
|
170 | |||
173 | map.resources :groups, :member => {:autocomplete_for_user => :get} |
|
171 | map.resources :groups, :member => {:autocomplete_for_user => :get} | |
174 | map.group_users 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :conditions => {:method => :post} |
|
172 | map.group_users 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :conditions => {:method => :post} | |
175 | map.group_user 'groups/:id/users/:user_id', :controller => 'groups', :action => 'remove_user', :id => /\d+/, :conditions => {:method => :delete} |
|
173 | map.group_user 'groups/:id/users/:user_id', :controller => 'groups', :action => 'remove_user', :id => /\d+/, :conditions => {:method => :delete} | |
176 |
|
174 | |||
177 | map.resources :trackers, :except => :show |
|
175 | map.resources :trackers, :except => :show | |
178 | map.resources :issue_statuses, :except => :show, :collection => {:update_issue_done_ratio => :post} |
|
176 | map.resources :issue_statuses, :except => :show, :collection => {:update_issue_done_ratio => :post} | |
179 | map.resources :custom_fields, :except => :show |
|
177 | map.resources :custom_fields, :except => :show | |
180 | map.resources :roles, :except => :show, :collection => {:permissions => [:get, :post]} |
|
178 | map.resources :roles, :except => :show, :collection => {:permissions => [:get, :post]} | |
181 |
|
179 | |||
182 | #left old routes at the bottom for backwards compat |
|
180 | #left old routes at the bottom for backwards compat | |
183 | map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages' |
|
181 | map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages' | |
184 | map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki' |
|
182 | map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki' | |
185 | map.connect 'projects/:project_id/news/:action', :controller => 'news' |
|
183 | map.connect 'projects/:project_id/news/:action', :controller => 'news' | |
186 | map.with_options :controller => 'repositories' do |omap| |
|
184 | map.with_options :controller => 'repositories' do |omap| | |
187 | omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse' |
|
185 | omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse' | |
188 | omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes' |
|
186 | omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes' | |
189 | omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff' |
|
187 | omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff' | |
190 | omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry' |
|
188 | omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry' | |
191 | omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate' |
|
189 | omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate' | |
192 | omap.connect 'repositories/revision/:id/:rev', :action => 'revision' |
|
190 | omap.connect 'repositories/revision/:id/:rev', :action => 'revision' | |
193 | end |
|
191 | end | |
194 |
|
192 | |||
195 | map.with_options :controller => 'sys' do |sys| |
|
193 | map.with_options :controller => 'sys' do |sys| | |
196 | sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get} |
|
194 | sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get} | |
197 | sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post} |
|
195 | sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post} | |
198 | end |
|
196 | end | |
199 |
|
197 | |||
200 | # Install the default route as the lowest priority. |
|
198 | # Install the default route as the lowest priority. | |
201 | map.connect ':controller/:action/:id' |
|
199 | map.connect ':controller/:action/:id' | |
202 | map.connect 'robots.txt', :controller => 'welcome', :action => 'robots' |
|
200 | map.connect 'robots.txt', :controller => 'welcome', :action => 'robots' | |
203 | # Used for OpenID |
|
201 | # Used for OpenID | |
204 | map.root :controller => 'account', :action => 'login' |
|
202 | map.root :controller => 'account', :action => 'login' | |
205 | end |
|
203 | end |
@@ -1,445 +1,445 | |||||
1 | # Redmine - project management software |
|
1 | # Redmine - project management software | |
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
6 | # as published by the Free Software Foundation; either version 2 |
|
6 | # as published by the Free Software Foundation; either version 2 | |
7 | # of the License, or (at your option) any later version. |
|
7 | # of the License, or (at your option) any later version. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU General Public License |
|
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software |
|
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
17 |
|
17 | |||
18 | require File.expand_path('../../test_helper', __FILE__) |
|
18 | require File.expand_path('../../test_helper', __FILE__) | |
19 |
|
19 | |||
20 | class RoutingTest < ActionController::IntegrationTest |
|
20 | class RoutingTest < ActionController::IntegrationTest | |
21 | context "activities" do |
|
21 | context "activities" do | |
22 | should_route :get, "/activity", :controller => 'activities', :action => 'index', :id => nil |
|
22 | should_route :get, "/activity", :controller => 'activities', :action => 'index', :id => nil | |
23 | should_route :get, "/activity.atom", :controller => 'activities', :action => 'index', :id => nil, :format => 'atom' |
|
23 | should_route :get, "/activity.atom", :controller => 'activities', :action => 'index', :id => nil, :format => 'atom' | |
24 | end |
|
24 | end | |
25 |
|
25 | |||
26 | context "attachments" do |
|
26 | context "attachments" do | |
27 | should_route :get, "/attachments/1", :controller => 'attachments', :action => 'show', :id => '1' |
|
27 | should_route :get, "/attachments/1", :controller => 'attachments', :action => 'show', :id => '1' | |
28 | should_route :get, "/attachments/1.xml", :controller => 'attachments', :action => 'show', :id => '1', :format => 'xml' |
|
28 | should_route :get, "/attachments/1.xml", :controller => 'attachments', :action => 'show', :id => '1', :format => 'xml' | |
29 | should_route :get, "/attachments/1.json", :controller => 'attachments', :action => 'show', :id => '1', :format => 'json' |
|
29 | should_route :get, "/attachments/1.json", :controller => 'attachments', :action => 'show', :id => '1', :format => 'json' | |
30 | should_route :get, "/attachments/1/filename.ext", :controller => 'attachments', :action => 'show', :id => '1', :filename => 'filename.ext' |
|
30 | should_route :get, "/attachments/1/filename.ext", :controller => 'attachments', :action => 'show', :id => '1', :filename => 'filename.ext' | |
31 | should_route :get, "/attachments/download/1", :controller => 'attachments', :action => 'download', :id => '1' |
|
31 | should_route :get, "/attachments/download/1", :controller => 'attachments', :action => 'download', :id => '1' | |
32 | should_route :get, "/attachments/download/1/filename.ext", :controller => 'attachments', :action => 'download', :id => '1', :filename => 'filename.ext' |
|
32 | should_route :get, "/attachments/download/1/filename.ext", :controller => 'attachments', :action => 'download', :id => '1', :filename => 'filename.ext' | |
33 | end |
|
33 | end | |
34 |
|
34 | |||
35 | context "boards" do |
|
35 | context "boards" do | |
36 | should_route :get, "/projects/world_domination/boards", :controller => 'boards', :action => 'index', :project_id => 'world_domination' |
|
36 | should_route :get, "/projects/world_domination/boards", :controller => 'boards', :action => 'index', :project_id => 'world_domination' | |
37 | should_route :get, "/projects/world_domination/boards/new", :controller => 'boards', :action => 'new', :project_id => 'world_domination' |
|
37 | should_route :get, "/projects/world_domination/boards/new", :controller => 'boards', :action => 'new', :project_id => 'world_domination' | |
38 | should_route :get, "/projects/world_domination/boards/44", :controller => 'boards', :action => 'show', :project_id => 'world_domination', :id => '44' |
|
38 | should_route :get, "/projects/world_domination/boards/44", :controller => 'boards', :action => 'show', :project_id => 'world_domination', :id => '44' | |
39 | should_route :get, "/projects/world_domination/boards/44.atom", :controller => 'boards', :action => 'show', :project_id => 'world_domination', :id => '44', :format => 'atom' |
|
39 | should_route :get, "/projects/world_domination/boards/44.atom", :controller => 'boards', :action => 'show', :project_id => 'world_domination', :id => '44', :format => 'atom' | |
40 | should_route :get, "/projects/world_domination/boards/44/edit", :controller => 'boards', :action => 'edit', :project_id => 'world_domination', :id => '44' |
|
40 | should_route :get, "/projects/world_domination/boards/44/edit", :controller => 'boards', :action => 'edit', :project_id => 'world_domination', :id => '44' | |
41 |
|
41 | |||
42 | should_route :post, "/projects/world_domination/boards", :controller => 'boards', :action => 'create', :project_id => 'world_domination' |
|
42 | should_route :post, "/projects/world_domination/boards", :controller => 'boards', :action => 'create', :project_id => 'world_domination' | |
43 | should_route :put, "/projects/world_domination/boards/44", :controller => 'boards', :action => 'update', :project_id => 'world_domination', :id => '44' |
|
43 | should_route :put, "/projects/world_domination/boards/44", :controller => 'boards', :action => 'update', :project_id => 'world_domination', :id => '44' | |
44 | should_route :delete, "/projects/world_domination/boards/44", :controller => 'boards', :action => 'destroy', :project_id => 'world_domination', :id => '44' |
|
44 | should_route :delete, "/projects/world_domination/boards/44", :controller => 'boards', :action => 'destroy', :project_id => 'world_domination', :id => '44' | |
45 |
|
45 | |||
46 | end |
|
46 | end | |
47 |
|
47 | |||
48 | context "custom_fields" do |
|
48 | context "custom_fields" do | |
49 | should_route :get, "/custom_fields", :controller => 'custom_fields', :action => 'index' |
|
49 | should_route :get, "/custom_fields", :controller => 'custom_fields', :action => 'index' | |
50 | should_route :get, "/custom_fields/new", :controller => 'custom_fields', :action => 'new' |
|
50 | should_route :get, "/custom_fields/new", :controller => 'custom_fields', :action => 'new' | |
51 | should_route :post, "/custom_fields", :controller => 'custom_fields', :action => 'create' |
|
51 | should_route :post, "/custom_fields", :controller => 'custom_fields', :action => 'create' | |
52 | should_route :get, "/custom_fields/2/edit", :controller => 'custom_fields', :action => 'edit', :id => 2 |
|
52 | should_route :get, "/custom_fields/2/edit", :controller => 'custom_fields', :action => 'edit', :id => 2 | |
53 | should_route :put, "/custom_fields/2", :controller => 'custom_fields', :action => 'update', :id => 2 |
|
53 | should_route :put, "/custom_fields/2", :controller => 'custom_fields', :action => 'update', :id => 2 | |
54 | should_route :delete, "/custom_fields/2", :controller => 'custom_fields', :action => 'destroy', :id => 2 |
|
54 | should_route :delete, "/custom_fields/2", :controller => 'custom_fields', :action => 'destroy', :id => 2 | |
55 | end |
|
55 | end | |
56 |
|
56 | |||
57 | context "documents" do |
|
57 | context "documents" do | |
58 | should_route :get, "/projects/567/documents", :controller => 'documents', :action => 'index', :project_id => '567' |
|
58 | should_route :get, "/projects/567/documents", :controller => 'documents', :action => 'index', :project_id => '567' | |
59 | should_route :get, "/projects/567/documents/new", :controller => 'documents', :action => 'new', :project_id => '567' |
|
59 | should_route :get, "/projects/567/documents/new", :controller => 'documents', :action => 'new', :project_id => '567' | |
60 | should_route :get, "/documents/22", :controller => 'documents', :action => 'show', :id => '22' |
|
60 | should_route :get, "/documents/22", :controller => 'documents', :action => 'show', :id => '22' | |
61 | should_route :get, "/documents/22/edit", :controller => 'documents', :action => 'edit', :id => '22' |
|
61 | should_route :get, "/documents/22/edit", :controller => 'documents', :action => 'edit', :id => '22' | |
62 |
|
62 | |||
63 | should_route :post, "/projects/567/documents", :controller => 'documents', :action => 'create', :project_id => '567' |
|
63 | should_route :post, "/projects/567/documents", :controller => 'documents', :action => 'create', :project_id => '567' | |
64 | should_route :put, "/documents/22", :controller => 'documents', :action => 'update', :id => '22' |
|
64 | should_route :put, "/documents/22", :controller => 'documents', :action => 'update', :id => '22' | |
65 | should_route :delete, "/documents/22", :controller => 'documents', :action => 'destroy', :id => '22' |
|
65 | should_route :delete, "/documents/22", :controller => 'documents', :action => 'destroy', :id => '22' | |
66 |
|
66 | |||
67 | should_route :post, "/documents/22/add_attachment", :controller => 'documents', :action => 'add_attachment', :id => '22' |
|
67 | should_route :post, "/documents/22/add_attachment", :controller => 'documents', :action => 'add_attachment', :id => '22' | |
68 | end |
|
68 | end | |
69 |
|
69 | |||
70 | context "groups" do |
|
70 | context "groups" do | |
71 | should_route :post, "/groups/567/users", :controller => 'groups', :action => 'add_users', :id => '567' |
|
71 | should_route :post, "/groups/567/users", :controller => 'groups', :action => 'add_users', :id => '567' | |
72 | should_route :delete, "/groups/567/users/12", :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12' |
|
72 | should_route :delete, "/groups/567/users/12", :controller => 'groups', :action => 'remove_user', :id => '567', :user_id => '12' | |
73 | end |
|
73 | end | |
74 |
|
74 | |||
75 | context "issues" do |
|
75 | context "issues" do | |
76 | # REST actions |
|
76 | # REST actions | |
77 | should_route :get, "/issues", :controller => 'issues', :action => 'index' |
|
77 | should_route :get, "/issues", :controller => 'issues', :action => 'index' | |
78 | should_route :get, "/issues.pdf", :controller => 'issues', :action => 'index', :format => 'pdf' |
|
78 | should_route :get, "/issues.pdf", :controller => 'issues', :action => 'index', :format => 'pdf' | |
79 | should_route :get, "/issues.atom", :controller => 'issues', :action => 'index', :format => 'atom' |
|
79 | should_route :get, "/issues.atom", :controller => 'issues', :action => 'index', :format => 'atom' | |
80 | should_route :get, "/issues.xml", :controller => 'issues', :action => 'index', :format => 'xml' |
|
80 | should_route :get, "/issues.xml", :controller => 'issues', :action => 'index', :format => 'xml' | |
81 | should_route :get, "/projects/23/issues", :controller => 'issues', :action => 'index', :project_id => '23' |
|
81 | should_route :get, "/projects/23/issues", :controller => 'issues', :action => 'index', :project_id => '23' | |
82 | should_route :get, "/projects/23/issues.pdf", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'pdf' |
|
82 | should_route :get, "/projects/23/issues.pdf", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'pdf' | |
83 | should_route :get, "/projects/23/issues.atom", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'atom' |
|
83 | should_route :get, "/projects/23/issues.atom", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'atom' | |
84 | should_route :get, "/projects/23/issues.xml", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'xml' |
|
84 | should_route :get, "/projects/23/issues.xml", :controller => 'issues', :action => 'index', :project_id => '23', :format => 'xml' | |
85 | should_route :get, "/issues/64", :controller => 'issues', :action => 'show', :id => '64' |
|
85 | should_route :get, "/issues/64", :controller => 'issues', :action => 'show', :id => '64' | |
86 | should_route :get, "/issues/64.pdf", :controller => 'issues', :action => 'show', :id => '64', :format => 'pdf' |
|
86 | should_route :get, "/issues/64.pdf", :controller => 'issues', :action => 'show', :id => '64', :format => 'pdf' | |
87 | should_route :get, "/issues/64.atom", :controller => 'issues', :action => 'show', :id => '64', :format => 'atom' |
|
87 | should_route :get, "/issues/64.atom", :controller => 'issues', :action => 'show', :id => '64', :format => 'atom' | |
88 | should_route :get, "/issues/64.xml", :controller => 'issues', :action => 'show', :id => '64', :format => 'xml' |
|
88 | should_route :get, "/issues/64.xml", :controller => 'issues', :action => 'show', :id => '64', :format => 'xml' | |
89 |
|
89 | |||
90 | should_route :get, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23' |
|
90 | should_route :get, "/projects/23/issues/new", :controller => 'issues', :action => 'new', :project_id => '23' | |
91 | should_route :post, "/projects/23/issues", :controller => 'issues', :action => 'create', :project_id => '23' |
|
91 | should_route :post, "/projects/23/issues", :controller => 'issues', :action => 'create', :project_id => '23' | |
92 | should_route :post, "/issues.xml", :controller => 'issues', :action => 'create', :format => 'xml' |
|
92 | should_route :post, "/issues.xml", :controller => 'issues', :action => 'create', :format => 'xml' | |
93 |
|
93 | |||
94 | should_route :get, "/issues/64/edit", :controller => 'issues', :action => 'edit', :id => '64' |
|
94 | should_route :get, "/issues/64/edit", :controller => 'issues', :action => 'edit', :id => '64' | |
95 | should_route :put, "/issues/1.xml", :controller => 'issues', :action => 'update', :id => '1', :format => 'xml' |
|
95 | should_route :put, "/issues/1.xml", :controller => 'issues', :action => 'update', :id => '1', :format => 'xml' | |
96 |
|
96 | |||
97 | # TODO: Should use DELETE |
|
97 | # TODO: Should use DELETE | |
98 | should_route :post, "/issues/64/destroy", :controller => 'issues', :action => 'destroy', :id => '64' |
|
98 | should_route :post, "/issues/64/destroy", :controller => 'issues', :action => 'destroy', :id => '64' | |
99 | should_route :delete, "/issues/1.xml", :controller => 'issues', :action => 'destroy', :id => '1', :format => 'xml' |
|
99 | should_route :delete, "/issues/1.xml", :controller => 'issues', :action => 'destroy', :id => '1', :format => 'xml' | |
100 |
|
100 | |||
101 | # Extra actions |
|
101 | # Extra actions | |
102 | should_route :get, "/projects/23/issues/64/copy", :controller => 'issues', :action => 'new', :project_id => '23', :copy_from => '64' |
|
102 | should_route :get, "/projects/23/issues/64/copy", :controller => 'issues', :action => 'new', :project_id => '23', :copy_from => '64' | |
103 |
|
103 | |||
104 | should_route :get, "/issues/move/new", :controller => 'issue_moves', :action => 'new' |
|
104 | should_route :get, "/issues/move/new", :controller => 'issue_moves', :action => 'new' | |
105 | should_route :post, "/issues/move", :controller => 'issue_moves', :action => 'create' |
|
105 | should_route :post, "/issues/move", :controller => 'issue_moves', :action => 'create' | |
106 |
|
106 | |||
107 | should_route :post, "/issues/1/quoted", :controller => 'journals', :action => 'new', :id => '1' |
|
107 | should_route :post, "/issues/1/quoted", :controller => 'journals', :action => 'new', :id => '1' | |
108 |
|
108 | |||
109 | should_route :get, "/issues/calendar", :controller => 'calendars', :action => 'show' |
|
109 | should_route :get, "/issues/calendar", :controller => 'calendars', :action => 'show' | |
110 | should_route :get, "/projects/project-name/issues/calendar", :controller => 'calendars', :action => 'show', :project_id => 'project-name' |
|
110 | should_route :get, "/projects/project-name/issues/calendar", :controller => 'calendars', :action => 'show', :project_id => 'project-name' | |
111 |
|
111 | |||
112 | should_route :get, "/issues/gantt", :controller => 'gantts', :action => 'show' |
|
112 | should_route :get, "/issues/gantt", :controller => 'gantts', :action => 'show' | |
113 | should_route :get, "/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :format => 'pdf' |
|
113 | should_route :get, "/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :format => 'pdf' | |
114 | should_route :get, "/projects/project-name/issues/gantt", :controller => 'gantts', :action => 'show', :project_id => 'project-name' |
|
114 | should_route :get, "/projects/project-name/issues/gantt", :controller => 'gantts', :action => 'show', :project_id => 'project-name' | |
115 | should_route :get, "/projects/project-name/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :project_id => 'project-name', :format => 'pdf' |
|
115 | should_route :get, "/projects/project-name/issues/gantt.pdf", :controller => 'gantts', :action => 'show', :project_id => 'project-name', :format => 'pdf' | |
116 |
|
116 | |||
117 | should_route :get, "/issues/auto_complete", :controller => 'auto_completes', :action => 'issues' |
|
117 | should_route :get, "/issues/auto_complete", :controller => 'auto_completes', :action => 'issues' | |
118 |
|
118 | |||
119 | should_route :get, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123' |
|
119 | should_route :get, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123' | |
120 | should_route :post, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123' |
|
120 | should_route :post, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123' | |
121 | should_route :get, "/issues/context_menu", :controller => 'context_menus', :action => 'issues' |
|
121 | should_route :get, "/issues/context_menu", :controller => 'context_menus', :action => 'issues' | |
122 | should_route :post, "/issues/context_menu", :controller => 'context_menus', :action => 'issues' |
|
122 | should_route :post, "/issues/context_menu", :controller => 'context_menus', :action => 'issues' | |
123 |
|
123 | |||
124 | should_route :get, "/issues/changes", :controller => 'journals', :action => 'index' |
|
124 | should_route :get, "/issues/changes", :controller => 'journals', :action => 'index' | |
125 |
|
125 | |||
126 | should_route :get, "/issues/bulk_edit", :controller => 'issues', :action => 'bulk_edit' |
|
126 | should_route :get, "/issues/bulk_edit", :controller => 'issues', :action => 'bulk_edit' | |
127 |
should_route :post, "/issues/bulk_ |
|
127 | should_route :post, "/issues/bulk_update", :controller => 'issues', :action => 'bulk_update' | |
128 | end |
|
128 | end | |
129 |
|
129 | |||
130 | context "issue categories" do |
|
130 | context "issue categories" do | |
131 | should_route :get, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'index', :project_id => 'foo' |
|
131 | should_route :get, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'index', :project_id => 'foo' | |
132 | should_route :get, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'xml' |
|
132 | should_route :get, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'xml' | |
133 | should_route :get, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'json' |
|
133 | should_route :get, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'json' | |
134 |
|
134 | |||
135 | should_route :get, "/projects/foo/issue_categories/new", :controller => 'issue_categories', :action => 'new', :project_id => 'foo' |
|
135 | should_route :get, "/projects/foo/issue_categories/new", :controller => 'issue_categories', :action => 'new', :project_id => 'foo' | |
136 |
|
136 | |||
137 | should_route :post, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'create', :project_id => 'foo' |
|
137 | should_route :post, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'create', :project_id => 'foo' | |
138 | should_route :post, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'xml' |
|
138 | should_route :post, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'xml' | |
139 | should_route :post, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'json' |
|
139 | should_route :post, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'json' | |
140 |
|
140 | |||
141 | should_route :get, "/issue_categories/1", :controller => 'issue_categories', :action => 'show', :id => '1' |
|
141 | should_route :get, "/issue_categories/1", :controller => 'issue_categories', :action => 'show', :id => '1' | |
142 | should_route :get, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'xml' |
|
142 | should_route :get, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'xml' | |
143 | should_route :get, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'json' |
|
143 | should_route :get, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'json' | |
144 |
|
144 | |||
145 | should_route :get, "/issue_categories/1/edit", :controller => 'issue_categories', :action => 'edit', :id => '1' |
|
145 | should_route :get, "/issue_categories/1/edit", :controller => 'issue_categories', :action => 'edit', :id => '1' | |
146 |
|
146 | |||
147 | should_route :put, "/issue_categories/1", :controller => 'issue_categories', :action => 'update', :id => '1' |
|
147 | should_route :put, "/issue_categories/1", :controller => 'issue_categories', :action => 'update', :id => '1' | |
148 | should_route :put, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'xml' |
|
148 | should_route :put, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'xml' | |
149 | should_route :put, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'json' |
|
149 | should_route :put, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'json' | |
150 |
|
150 | |||
151 | should_route :delete, "/issue_categories/1", :controller => 'issue_categories', :action => 'destroy', :id => '1' |
|
151 | should_route :delete, "/issue_categories/1", :controller => 'issue_categories', :action => 'destroy', :id => '1' | |
152 | should_route :delete, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'xml' |
|
152 | should_route :delete, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'xml' | |
153 | should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json' |
|
153 | should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json' | |
154 | end |
|
154 | end | |
155 |
|
155 | |||
156 | context "issue relations" do |
|
156 | context "issue relations" do | |
157 | should_route :get, "/issues/1/relations", :controller => 'issue_relations', :action => 'index', :issue_id => '1' |
|
157 | should_route :get, "/issues/1/relations", :controller => 'issue_relations', :action => 'index', :issue_id => '1' | |
158 | should_route :get, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'xml' |
|
158 | should_route :get, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'xml' | |
159 | should_route :get, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'json' |
|
159 | should_route :get, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'index', :issue_id => '1', :format => 'json' | |
160 |
|
160 | |||
161 | should_route :post, "/issues/1/relations", :controller => 'issue_relations', :action => 'create', :issue_id => '1' |
|
161 | should_route :post, "/issues/1/relations", :controller => 'issue_relations', :action => 'create', :issue_id => '1' | |
162 | should_route :post, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'xml' |
|
162 | should_route :post, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'xml' | |
163 | should_route :post, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'json' |
|
163 | should_route :post, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'json' | |
164 |
|
164 | |||
165 | should_route :get, "/relations/23", :controller => 'issue_relations', :action => 'show', :id => '23' |
|
165 | should_route :get, "/relations/23", :controller => 'issue_relations', :action => 'show', :id => '23' | |
166 | should_route :get, "/relations/23.xml", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'xml' |
|
166 | should_route :get, "/relations/23.xml", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'xml' | |
167 | should_route :get, "/relations/23.json", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'json' |
|
167 | should_route :get, "/relations/23.json", :controller => 'issue_relations', :action => 'show', :id => '23', :format => 'json' | |
168 |
|
168 | |||
169 | should_route :delete, "/relations/23", :controller => 'issue_relations', :action => 'destroy', :id => '23' |
|
169 | should_route :delete, "/relations/23", :controller => 'issue_relations', :action => 'destroy', :id => '23' | |
170 | should_route :delete, "/relations/23.xml", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'xml' |
|
170 | should_route :delete, "/relations/23.xml", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'xml' | |
171 | should_route :delete, "/relations/23.json", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'json' |
|
171 | should_route :delete, "/relations/23.json", :controller => 'issue_relations', :action => 'destroy', :id => '23', :format => 'json' | |
172 | end |
|
172 | end | |
173 |
|
173 | |||
174 | context "issue reports" do |
|
174 | context "issue reports" do | |
175 | should_route :get, "/projects/567/issues/report", :controller => 'reports', :action => 'issue_report', :id => '567' |
|
175 | should_route :get, "/projects/567/issues/report", :controller => 'reports', :action => 'issue_report', :id => '567' | |
176 | should_route :get, "/projects/567/issues/report/assigned_to", :controller => 'reports', :action => 'issue_report_details', :id => '567', :detail => 'assigned_to' |
|
176 | should_route :get, "/projects/567/issues/report/assigned_to", :controller => 'reports', :action => 'issue_report_details', :id => '567', :detail => 'assigned_to' | |
177 | end |
|
177 | end | |
178 |
|
178 | |||
179 | context "members" do |
|
179 | context "members" do | |
180 | should_route :post, "/projects/5234/members/new", :controller => 'members', :action => 'new', :id => '5234' |
|
180 | should_route :post, "/projects/5234/members/new", :controller => 'members', :action => 'new', :id => '5234' | |
181 | end |
|
181 | end | |
182 |
|
182 | |||
183 | context "messages" do |
|
183 | context "messages" do | |
184 | should_route :get, "/boards/22/topics/2", :controller => 'messages', :action => 'show', :id => '2', :board_id => '22' |
|
184 | should_route :get, "/boards/22/topics/2", :controller => 'messages', :action => 'show', :id => '2', :board_id => '22' | |
185 | should_route :get, "/boards/lala/topics/new", :controller => 'messages', :action => 'new', :board_id => 'lala' |
|
185 | should_route :get, "/boards/lala/topics/new", :controller => 'messages', :action => 'new', :board_id => 'lala' | |
186 | should_route :get, "/boards/lala/topics/22/edit", :controller => 'messages', :action => 'edit', :id => '22', :board_id => 'lala' |
|
186 | should_route :get, "/boards/lala/topics/22/edit", :controller => 'messages', :action => 'edit', :id => '22', :board_id => 'lala' | |
187 |
|
187 | |||
188 | should_route :post, "/boards/lala/topics/new", :controller => 'messages', :action => 'new', :board_id => 'lala' |
|
188 | should_route :post, "/boards/lala/topics/new", :controller => 'messages', :action => 'new', :board_id => 'lala' | |
189 | should_route :post, "/boards/lala/topics/22/edit", :controller => 'messages', :action => 'edit', :id => '22', :board_id => 'lala' |
|
189 | should_route :post, "/boards/lala/topics/22/edit", :controller => 'messages', :action => 'edit', :id => '22', :board_id => 'lala' | |
190 | should_route :post, "/boards/22/topics/555/replies", :controller => 'messages', :action => 'reply', :id => '555', :board_id => '22' |
|
190 | should_route :post, "/boards/22/topics/555/replies", :controller => 'messages', :action => 'reply', :id => '555', :board_id => '22' | |
191 | should_route :post, "/boards/22/topics/555/destroy", :controller => 'messages', :action => 'destroy', :id => '555', :board_id => '22' |
|
191 | should_route :post, "/boards/22/topics/555/destroy", :controller => 'messages', :action => 'destroy', :id => '555', :board_id => '22' | |
192 | end |
|
192 | end | |
193 |
|
193 | |||
194 | context "news" do |
|
194 | context "news" do | |
195 | should_route :get, "/news", :controller => 'news', :action => 'index' |
|
195 | should_route :get, "/news", :controller => 'news', :action => 'index' | |
196 | should_route :get, "/news.atom", :controller => 'news', :action => 'index', :format => 'atom' |
|
196 | should_route :get, "/news.atom", :controller => 'news', :action => 'index', :format => 'atom' | |
197 | should_route :get, "/news.xml", :controller => 'news', :action => 'index', :format => 'xml' |
|
197 | should_route :get, "/news.xml", :controller => 'news', :action => 'index', :format => 'xml' | |
198 | should_route :get, "/news.json", :controller => 'news', :action => 'index', :format => 'json' |
|
198 | should_route :get, "/news.json", :controller => 'news', :action => 'index', :format => 'json' | |
199 | should_route :get, "/projects/567/news", :controller => 'news', :action => 'index', :project_id => '567' |
|
199 | should_route :get, "/projects/567/news", :controller => 'news', :action => 'index', :project_id => '567' | |
200 | should_route :get, "/projects/567/news.atom", :controller => 'news', :action => 'index', :format => 'atom', :project_id => '567' |
|
200 | should_route :get, "/projects/567/news.atom", :controller => 'news', :action => 'index', :format => 'atom', :project_id => '567' | |
201 | should_route :get, "/projects/567/news.xml", :controller => 'news', :action => 'index', :format => 'xml', :project_id => '567' |
|
201 | should_route :get, "/projects/567/news.xml", :controller => 'news', :action => 'index', :format => 'xml', :project_id => '567' | |
202 | should_route :get, "/projects/567/news.json", :controller => 'news', :action => 'index', :format => 'json', :project_id => '567' |
|
202 | should_route :get, "/projects/567/news.json", :controller => 'news', :action => 'index', :format => 'json', :project_id => '567' | |
203 | should_route :get, "/news/2", :controller => 'news', :action => 'show', :id => '2' |
|
203 | should_route :get, "/news/2", :controller => 'news', :action => 'show', :id => '2' | |
204 | should_route :get, "/projects/567/news/new", :controller => 'news', :action => 'new', :project_id => '567' |
|
204 | should_route :get, "/projects/567/news/new", :controller => 'news', :action => 'new', :project_id => '567' | |
205 | should_route :get, "/news/234", :controller => 'news', :action => 'show', :id => '234' |
|
205 | should_route :get, "/news/234", :controller => 'news', :action => 'show', :id => '234' | |
206 | should_route :get, "/news/567/edit", :controller => 'news', :action => 'edit', :id => '567' |
|
206 | should_route :get, "/news/567/edit", :controller => 'news', :action => 'edit', :id => '567' | |
207 | should_route :get, "/news/preview", :controller => 'previews', :action => 'news' |
|
207 | should_route :get, "/news/preview", :controller => 'previews', :action => 'news' | |
208 |
|
208 | |||
209 | should_route :post, "/projects/567/news", :controller => 'news', :action => 'create', :project_id => '567' |
|
209 | should_route :post, "/projects/567/news", :controller => 'news', :action => 'create', :project_id => '567' | |
210 | should_route :post, "/news/567/comments", :controller => 'comments', :action => 'create', :id => '567' |
|
210 | should_route :post, "/news/567/comments", :controller => 'comments', :action => 'create', :id => '567' | |
211 |
|
211 | |||
212 | should_route :put, "/news/567", :controller => 'news', :action => 'update', :id => '567' |
|
212 | should_route :put, "/news/567", :controller => 'news', :action => 'update', :id => '567' | |
213 |
|
213 | |||
214 | should_route :delete, "/news/567", :controller => 'news', :action => 'destroy', :id => '567' |
|
214 | should_route :delete, "/news/567", :controller => 'news', :action => 'destroy', :id => '567' | |
215 | should_route :delete, "/news/567/comments/15", :controller => 'comments', :action => 'destroy', :id => '567', :comment_id => '15' |
|
215 | should_route :delete, "/news/567/comments/15", :controller => 'comments', :action => 'destroy', :id => '567', :comment_id => '15' | |
216 | end |
|
216 | end | |
217 |
|
217 | |||
218 | context "projects" do |
|
218 | context "projects" do | |
219 | should_route :get, "/projects", :controller => 'projects', :action => 'index' |
|
219 | should_route :get, "/projects", :controller => 'projects', :action => 'index' | |
220 | should_route :get, "/projects.atom", :controller => 'projects', :action => 'index', :format => 'atom' |
|
220 | should_route :get, "/projects.atom", :controller => 'projects', :action => 'index', :format => 'atom' | |
221 | should_route :get, "/projects.xml", :controller => 'projects', :action => 'index', :format => 'xml' |
|
221 | should_route :get, "/projects.xml", :controller => 'projects', :action => 'index', :format => 'xml' | |
222 | should_route :get, "/projects/new", :controller => 'projects', :action => 'new' |
|
222 | should_route :get, "/projects/new", :controller => 'projects', :action => 'new' | |
223 | should_route :get, "/projects/test", :controller => 'projects', :action => 'show', :id => 'test' |
|
223 | should_route :get, "/projects/test", :controller => 'projects', :action => 'show', :id => 'test' | |
224 | should_route :get, "/projects/1.xml", :controller => 'projects', :action => 'show', :id => '1', :format => 'xml' |
|
224 | should_route :get, "/projects/1.xml", :controller => 'projects', :action => 'show', :id => '1', :format => 'xml' | |
225 | should_route :get, "/projects/4223/settings", :controller => 'projects', :action => 'settings', :id => '4223' |
|
225 | should_route :get, "/projects/4223/settings", :controller => 'projects', :action => 'settings', :id => '4223' | |
226 | should_route :get, "/projects/4223/settings/members", :controller => 'projects', :action => 'settings', :id => '4223', :tab => 'members' |
|
226 | should_route :get, "/projects/4223/settings/members", :controller => 'projects', :action => 'settings', :id => '4223', :tab => 'members' | |
227 | should_route :get, "/projects/33/files", :controller => 'files', :action => 'index', :project_id => '33' |
|
227 | should_route :get, "/projects/33/files", :controller => 'files', :action => 'index', :project_id => '33' | |
228 | should_route :get, "/projects/33/files/new", :controller => 'files', :action => 'new', :project_id => '33' |
|
228 | should_route :get, "/projects/33/files/new", :controller => 'files', :action => 'new', :project_id => '33' | |
229 | should_route :get, "/projects/33/roadmap", :controller => 'versions', :action => 'index', :project_id => '33' |
|
229 | should_route :get, "/projects/33/roadmap", :controller => 'versions', :action => 'index', :project_id => '33' | |
230 | should_route :get, "/projects/33/activity", :controller => 'activities', :action => 'index', :id => '33' |
|
230 | should_route :get, "/projects/33/activity", :controller => 'activities', :action => 'index', :id => '33' | |
231 | should_route :get, "/projects/33/activity.atom", :controller => 'activities', :action => 'index', :id => '33', :format => 'atom' |
|
231 | should_route :get, "/projects/33/activity.atom", :controller => 'activities', :action => 'index', :id => '33', :format => 'atom' | |
232 |
|
232 | |||
233 | should_route :post, "/projects", :controller => 'projects', :action => 'create' |
|
233 | should_route :post, "/projects", :controller => 'projects', :action => 'create' | |
234 | should_route :post, "/projects.xml", :controller => 'projects', :action => 'create', :format => 'xml' |
|
234 | should_route :post, "/projects.xml", :controller => 'projects', :action => 'create', :format => 'xml' | |
235 | should_route :post, "/projects/33/files", :controller => 'files', :action => 'create', :project_id => '33' |
|
235 | should_route :post, "/projects/33/files", :controller => 'files', :action => 'create', :project_id => '33' | |
236 | should_route :post, "/projects/64/archive", :controller => 'projects', :action => 'archive', :id => '64' |
|
236 | should_route :post, "/projects/64/archive", :controller => 'projects', :action => 'archive', :id => '64' | |
237 | should_route :post, "/projects/64/unarchive", :controller => 'projects', :action => 'unarchive', :id => '64' |
|
237 | should_route :post, "/projects/64/unarchive", :controller => 'projects', :action => 'unarchive', :id => '64' | |
238 |
|
238 | |||
239 | should_route :put, "/projects/64/enumerations", :controller => 'project_enumerations', :action => 'update', :project_id => '64' |
|
239 | should_route :put, "/projects/64/enumerations", :controller => 'project_enumerations', :action => 'update', :project_id => '64' | |
240 | should_route :put, "/projects/4223", :controller => 'projects', :action => 'update', :id => '4223' |
|
240 | should_route :put, "/projects/4223", :controller => 'projects', :action => 'update', :id => '4223' | |
241 | should_route :put, "/projects/1.xml", :controller => 'projects', :action => 'update', :id => '1', :format => 'xml' |
|
241 | should_route :put, "/projects/1.xml", :controller => 'projects', :action => 'update', :id => '1', :format => 'xml' | |
242 |
|
242 | |||
243 | should_route :delete, "/projects/64", :controller => 'projects', :action => 'destroy', :id => '64' |
|
243 | should_route :delete, "/projects/64", :controller => 'projects', :action => 'destroy', :id => '64' | |
244 | should_route :delete, "/projects/1.xml", :controller => 'projects', :action => 'destroy', :id => '1', :format => 'xml' |
|
244 | should_route :delete, "/projects/1.xml", :controller => 'projects', :action => 'destroy', :id => '1', :format => 'xml' | |
245 | should_route :delete, "/projects/64/enumerations", :controller => 'project_enumerations', :action => 'destroy', :project_id => '64' |
|
245 | should_route :delete, "/projects/64/enumerations", :controller => 'project_enumerations', :action => 'destroy', :project_id => '64' | |
246 | end |
|
246 | end | |
247 |
|
247 | |||
248 | context "queries" do |
|
248 | context "queries" do | |
249 | should_route :get, "/queries.xml", :controller => 'queries', :action => 'index', :format => 'xml' |
|
249 | should_route :get, "/queries.xml", :controller => 'queries', :action => 'index', :format => 'xml' | |
250 | should_route :get, "/queries.json", :controller => 'queries', :action => 'index', :format => 'json' |
|
250 | should_route :get, "/queries.json", :controller => 'queries', :action => 'index', :format => 'json' | |
251 |
|
251 | |||
252 | should_route :get, "/queries/new", :controller => 'queries', :action => 'new' |
|
252 | should_route :get, "/queries/new", :controller => 'queries', :action => 'new' | |
253 | should_route :get, "/projects/redmine/queries/new", :controller => 'queries', :action => 'new', :project_id => 'redmine' |
|
253 | should_route :get, "/projects/redmine/queries/new", :controller => 'queries', :action => 'new', :project_id => 'redmine' | |
254 |
|
254 | |||
255 | should_route :post, "/queries", :controller => 'queries', :action => 'create' |
|
255 | should_route :post, "/queries", :controller => 'queries', :action => 'create' | |
256 | should_route :post, "/projects/redmine/queries", :controller => 'queries', :action => 'create', :project_id => 'redmine' |
|
256 | should_route :post, "/projects/redmine/queries", :controller => 'queries', :action => 'create', :project_id => 'redmine' | |
257 |
|
257 | |||
258 | should_route :get, "/queries/1/edit", :controller => 'queries', :action => 'edit', :id => '1' |
|
258 | should_route :get, "/queries/1/edit", :controller => 'queries', :action => 'edit', :id => '1' | |
259 |
|
259 | |||
260 | should_route :put, "/queries/1", :controller => 'queries', :action => 'update', :id => '1' |
|
260 | should_route :put, "/queries/1", :controller => 'queries', :action => 'update', :id => '1' | |
261 |
|
261 | |||
262 | should_route :delete, "/queries/1", :controller => 'queries', :action => 'destroy', :id => '1' |
|
262 | should_route :delete, "/queries/1", :controller => 'queries', :action => 'destroy', :id => '1' | |
263 | end |
|
263 | end | |
264 |
|
264 | |||
265 | context "repositories" do |
|
265 | context "repositories" do | |
266 | should_route :get, "/projects/redmine/repository", :controller => 'repositories', :action => 'show', :id => 'redmine' |
|
266 | should_route :get, "/projects/redmine/repository", :controller => 'repositories', :action => 'show', :id => 'redmine' | |
267 | should_route :get, "/projects/redmine/repository/edit", :controller => 'repositories', :action => 'edit', :id => 'redmine' |
|
267 | should_route :get, "/projects/redmine/repository/edit", :controller => 'repositories', :action => 'edit', :id => 'redmine' | |
268 | should_route :get, "/projects/redmine/repository/revisions", :controller => 'repositories', :action => 'revisions', :id => 'redmine' |
|
268 | should_route :get, "/projects/redmine/repository/revisions", :controller => 'repositories', :action => 'revisions', :id => 'redmine' | |
269 | should_route :get, "/projects/redmine/repository/revisions.atom", :controller => 'repositories', :action => 'revisions', :id => 'redmine', :format => 'atom' |
|
269 | should_route :get, "/projects/redmine/repository/revisions.atom", :controller => 'repositories', :action => 'revisions', :id => 'redmine', :format => 'atom' | |
270 | should_route :get, "/projects/redmine/repository/revisions/2457", :controller => 'repositories', :action => 'revision', :id => 'redmine', :rev => '2457' |
|
270 | should_route :get, "/projects/redmine/repository/revisions/2457", :controller => 'repositories', :action => 'revision', :id => 'redmine', :rev => '2457' | |
271 | should_route :get, "/projects/redmine/repository/revisions/2457/diff", :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457' |
|
271 | should_route :get, "/projects/redmine/repository/revisions/2457/diff", :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457' | |
272 | should_route :get, "/projects/redmine/repository/revisions/2457/diff.diff", :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457', :format => 'diff' |
|
272 | should_route :get, "/projects/redmine/repository/revisions/2457/diff.diff", :controller => 'repositories', :action => 'diff', :id => 'redmine', :rev => '2457', :format => 'diff' | |
273 | should_route :get, "/projects/redmine/repository/diff/path/to/file.c", :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c] |
|
273 | should_route :get, "/projects/redmine/repository/diff/path/to/file.c", :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c] | |
274 | should_route :get, "/projects/redmine/repository/revisions/2/diff/path/to/file.c", :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c], :rev => '2' |
|
274 | should_route :get, "/projects/redmine/repository/revisions/2/diff/path/to/file.c", :controller => 'repositories', :action => 'diff', :id => 'redmine', :path => %w[path to file.c], :rev => '2' | |
275 | should_route :get, "/projects/redmine/repository/browse/path/to/file.c", :controller => 'repositories', :action => 'browse', :id => 'redmine', :path => %w[path to file.c] |
|
275 | should_route :get, "/projects/redmine/repository/browse/path/to/file.c", :controller => 'repositories', :action => 'browse', :id => 'redmine', :path => %w[path to file.c] | |
276 | should_route :get, "/projects/redmine/repository/entry/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c] |
|
276 | should_route :get, "/projects/redmine/repository/entry/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c] | |
277 | should_route :get, "/projects/redmine/repository/revisions/2/entry/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :rev => '2' |
|
277 | should_route :get, "/projects/redmine/repository/revisions/2/entry/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :rev => '2' | |
278 | should_route :get, "/projects/redmine/repository/raw/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :format => 'raw' |
|
278 | should_route :get, "/projects/redmine/repository/raw/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :format => 'raw' | |
279 | should_route :get, "/projects/redmine/repository/revisions/2/raw/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :rev => '2', :format => 'raw' |
|
279 | should_route :get, "/projects/redmine/repository/revisions/2/raw/path/to/file.c", :controller => 'repositories', :action => 'entry', :id => 'redmine', :path => %w[path to file.c], :rev => '2', :format => 'raw' | |
280 | should_route :get, "/projects/redmine/repository/annotate/path/to/file.c", :controller => 'repositories', :action => 'annotate', :id => 'redmine', :path => %w[path to file.c] |
|
280 | should_route :get, "/projects/redmine/repository/annotate/path/to/file.c", :controller => 'repositories', :action => 'annotate', :id => 'redmine', :path => %w[path to file.c] | |
281 | should_route :get, "/projects/redmine/repository/changes/path/to/file.c", :controller => 'repositories', :action => 'changes', :id => 'redmine', :path => %w[path to file.c] |
|
281 | should_route :get, "/projects/redmine/repository/changes/path/to/file.c", :controller => 'repositories', :action => 'changes', :id => 'redmine', :path => %w[path to file.c] | |
282 | should_route :get, "/projects/redmine/repository/statistics", :controller => 'repositories', :action => 'stats', :id => 'redmine' |
|
282 | should_route :get, "/projects/redmine/repository/statistics", :controller => 'repositories', :action => 'stats', :id => 'redmine' | |
283 |
|
283 | |||
284 | should_route :post, "/projects/redmine/repository/edit", :controller => 'repositories', :action => 'edit', :id => 'redmine' |
|
284 | should_route :post, "/projects/redmine/repository/edit", :controller => 'repositories', :action => 'edit', :id => 'redmine' | |
285 | end |
|
285 | end | |
286 |
|
286 | |||
287 | context "roles" do |
|
287 | context "roles" do | |
288 | should_route :get, "/roles", :controller => 'roles', :action => 'index' |
|
288 | should_route :get, "/roles", :controller => 'roles', :action => 'index' | |
289 | should_route :get, "/roles/new", :controller => 'roles', :action => 'new' |
|
289 | should_route :get, "/roles/new", :controller => 'roles', :action => 'new' | |
290 | should_route :post, "/roles", :controller => 'roles', :action => 'create' |
|
290 | should_route :post, "/roles", :controller => 'roles', :action => 'create' | |
291 | should_route :get, "/roles/2/edit", :controller => 'roles', :action => 'edit', :id => 2 |
|
291 | should_route :get, "/roles/2/edit", :controller => 'roles', :action => 'edit', :id => 2 | |
292 | should_route :put, "/roles/2", :controller => 'roles', :action => 'update', :id => 2 |
|
292 | should_route :put, "/roles/2", :controller => 'roles', :action => 'update', :id => 2 | |
293 | should_route :delete, "/roles/2", :controller => 'roles', :action => 'destroy', :id => 2 |
|
293 | should_route :delete, "/roles/2", :controller => 'roles', :action => 'destroy', :id => 2 | |
294 | should_route :get, "/roles/permissions", :controller => 'roles', :action => 'permissions' |
|
294 | should_route :get, "/roles/permissions", :controller => 'roles', :action => 'permissions' | |
295 | should_route :post, "/roles/permissions", :controller => 'roles', :action => 'permissions' |
|
295 | should_route :post, "/roles/permissions", :controller => 'roles', :action => 'permissions' | |
296 | end |
|
296 | end | |
297 |
|
297 | |||
298 | context "timelogs (global)" do |
|
298 | context "timelogs (global)" do | |
299 | should_route :get, "/time_entries", :controller => 'timelog', :action => 'index' |
|
299 | should_route :get, "/time_entries", :controller => 'timelog', :action => 'index' | |
300 | should_route :get, "/time_entries.csv", :controller => 'timelog', :action => 'index', :format => 'csv' |
|
300 | should_route :get, "/time_entries.csv", :controller => 'timelog', :action => 'index', :format => 'csv' | |
301 | should_route :get, "/time_entries.atom", :controller => 'timelog', :action => 'index', :format => 'atom' |
|
301 | should_route :get, "/time_entries.atom", :controller => 'timelog', :action => 'index', :format => 'atom' | |
302 | should_route :get, "/time_entries/new", :controller => 'timelog', :action => 'new' |
|
302 | should_route :get, "/time_entries/new", :controller => 'timelog', :action => 'new' | |
303 | should_route :get, "/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22' |
|
303 | should_route :get, "/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22' | |
304 |
|
304 | |||
305 | should_route :post, "/time_entries", :controller => 'timelog', :action => 'create' |
|
305 | should_route :post, "/time_entries", :controller => 'timelog', :action => 'create' | |
306 |
|
306 | |||
307 | should_route :put, "/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22' |
|
307 | should_route :put, "/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22' | |
308 |
|
308 | |||
309 | should_route :delete, "/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55' |
|
309 | should_route :delete, "/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55' | |
310 | end |
|
310 | end | |
311 |
|
311 | |||
312 | context "timelogs (scoped under project)" do |
|
312 | context "timelogs (scoped under project)" do | |
313 | should_route :get, "/projects/567/time_entries", :controller => 'timelog', :action => 'index', :project_id => '567' |
|
313 | should_route :get, "/projects/567/time_entries", :controller => 'timelog', :action => 'index', :project_id => '567' | |
314 | should_route :get, "/projects/567/time_entries.csv", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'csv' |
|
314 | should_route :get, "/projects/567/time_entries.csv", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'csv' | |
315 | should_route :get, "/projects/567/time_entries.atom", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'atom' |
|
315 | should_route :get, "/projects/567/time_entries.atom", :controller => 'timelog', :action => 'index', :project_id => '567', :format => 'atom' | |
316 | should_route :get, "/projects/567/time_entries/new", :controller => 'timelog', :action => 'new', :project_id => '567' |
|
316 | should_route :get, "/projects/567/time_entries/new", :controller => 'timelog', :action => 'new', :project_id => '567' | |
317 | should_route :get, "/projects/567/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :project_id => '567' |
|
317 | should_route :get, "/projects/567/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :project_id => '567' | |
318 |
|
318 | |||
319 | should_route :post, "/projects/567/time_entries", :controller => 'timelog', :action => 'create', :project_id => '567' |
|
319 | should_route :post, "/projects/567/time_entries", :controller => 'timelog', :action => 'create', :project_id => '567' | |
320 |
|
320 | |||
321 | should_route :put, "/projects/567/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :project_id => '567' |
|
321 | should_route :put, "/projects/567/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :project_id => '567' | |
322 |
|
322 | |||
323 | should_route :delete, "/projects/567/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :project_id => '567' |
|
323 | should_route :delete, "/projects/567/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :project_id => '567' | |
324 | end |
|
324 | end | |
325 |
|
325 | |||
326 | context "timelogs (scoped under issues)" do |
|
326 | context "timelogs (scoped under issues)" do | |
327 | should_route :get, "/issues/234/time_entries", :controller => 'timelog', :action => 'index', :issue_id => '234' |
|
327 | should_route :get, "/issues/234/time_entries", :controller => 'timelog', :action => 'index', :issue_id => '234' | |
328 | should_route :get, "/issues/234/time_entries.csv", :controller => 'timelog', :action => 'index', :issue_id => '234', :format => 'csv' |
|
328 | should_route :get, "/issues/234/time_entries.csv", :controller => 'timelog', :action => 'index', :issue_id => '234', :format => 'csv' | |
329 | should_route :get, "/issues/234/time_entries.atom", :controller => 'timelog', :action => 'index', :issue_id => '234', :format => 'atom' |
|
329 | should_route :get, "/issues/234/time_entries.atom", :controller => 'timelog', :action => 'index', :issue_id => '234', :format => 'atom' | |
330 | should_route :get, "/issues/234/time_entries/new", :controller => 'timelog', :action => 'new', :issue_id => '234' |
|
330 | should_route :get, "/issues/234/time_entries/new", :controller => 'timelog', :action => 'new', :issue_id => '234' | |
331 | should_route :get, "/issues/234/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :issue_id => '234' |
|
331 | should_route :get, "/issues/234/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :issue_id => '234' | |
332 |
|
332 | |||
333 | should_route :post, "/issues/234/time_entries", :controller => 'timelog', :action => 'create', :issue_id => '234' |
|
333 | should_route :post, "/issues/234/time_entries", :controller => 'timelog', :action => 'create', :issue_id => '234' | |
334 |
|
334 | |||
335 | should_route :put, "/issues/234/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :issue_id => '234' |
|
335 | should_route :put, "/issues/234/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :issue_id => '234' | |
336 |
|
336 | |||
337 | should_route :delete, "/issues/234/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234' |
|
337 | should_route :delete, "/issues/234/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234' | |
338 | end |
|
338 | end | |
339 |
|
339 | |||
340 | context "timelogs (scoped under project and issues)" do |
|
340 | context "timelogs (scoped under project and issues)" do | |
341 | should_route :get, "/projects/ecookbook/issues/234/time_entries", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook' |
|
341 | should_route :get, "/projects/ecookbook/issues/234/time_entries", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook' | |
342 | should_route :get, "/projects/ecookbook/issues/234/time_entries.csv", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook', :format => 'csv' |
|
342 | should_route :get, "/projects/ecookbook/issues/234/time_entries.csv", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook', :format => 'csv' | |
343 | should_route :get, "/projects/ecookbook/issues/234/time_entries.atom", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook', :format => 'atom' |
|
343 | should_route :get, "/projects/ecookbook/issues/234/time_entries.atom", :controller => 'timelog', :action => 'index', :issue_id => '234', :project_id => 'ecookbook', :format => 'atom' | |
344 | should_route :get, "/projects/ecookbook/issues/234/time_entries/new", :controller => 'timelog', :action => 'new', :issue_id => '234', :project_id => 'ecookbook' |
|
344 | should_route :get, "/projects/ecookbook/issues/234/time_entries/new", :controller => 'timelog', :action => 'new', :issue_id => '234', :project_id => 'ecookbook' | |
345 | should_route :get, "/projects/ecookbook/issues/234/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :issue_id => '234', :project_id => 'ecookbook' |
|
345 | should_route :get, "/projects/ecookbook/issues/234/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22', :issue_id => '234', :project_id => 'ecookbook' | |
346 |
|
346 | |||
347 | should_route :post, "/projects/ecookbook/issues/234/time_entries", :controller => 'timelog', :action => 'create', :issue_id => '234', :project_id => 'ecookbook' |
|
347 | should_route :post, "/projects/ecookbook/issues/234/time_entries", :controller => 'timelog', :action => 'create', :issue_id => '234', :project_id => 'ecookbook' | |
348 |
|
348 | |||
349 | should_route :put, "/projects/ecookbook/issues/234/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :issue_id => '234', :project_id => 'ecookbook' |
|
349 | should_route :put, "/projects/ecookbook/issues/234/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22', :issue_id => '234', :project_id => 'ecookbook' | |
350 |
|
350 | |||
351 | should_route :delete, "/projects/ecookbook/issues/234/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234', :project_id => 'ecookbook' |
|
351 | should_route :delete, "/projects/ecookbook/issues/234/time_entries/55", :controller => 'timelog', :action => 'destroy', :id => '55', :issue_id => '234', :project_id => 'ecookbook' | |
352 |
|
352 | |||
353 | should_route :get, "/time_entries/report", :controller => 'timelog', :action => 'report' |
|
353 | should_route :get, "/time_entries/report", :controller => 'timelog', :action => 'report' | |
354 | should_route :get, "/projects/567/time_entries/report", :controller => 'timelog', :action => 'report', :project_id => '567' |
|
354 | should_route :get, "/projects/567/time_entries/report", :controller => 'timelog', :action => 'report', :project_id => '567' | |
355 | should_route :get, "/projects/567/time_entries/report.csv", :controller => 'timelog', :action => 'report', :project_id => '567', :format => 'csv' |
|
355 | should_route :get, "/projects/567/time_entries/report.csv", :controller => 'timelog', :action => 'report', :project_id => '567', :format => 'csv' | |
356 | end |
|
356 | end | |
357 |
|
357 | |||
358 | context "users" do |
|
358 | context "users" do | |
359 | should_route :get, "/users", :controller => 'users', :action => 'index' |
|
359 | should_route :get, "/users", :controller => 'users', :action => 'index' | |
360 | should_route :get, "/users.xml", :controller => 'users', :action => 'index', :format => 'xml' |
|
360 | should_route :get, "/users.xml", :controller => 'users', :action => 'index', :format => 'xml' | |
361 | should_route :get, "/users/44", :controller => 'users', :action => 'show', :id => '44' |
|
361 | should_route :get, "/users/44", :controller => 'users', :action => 'show', :id => '44' | |
362 | should_route :get, "/users/44.xml", :controller => 'users', :action => 'show', :id => '44', :format => 'xml' |
|
362 | should_route :get, "/users/44.xml", :controller => 'users', :action => 'show', :id => '44', :format => 'xml' | |
363 | should_route :get, "/users/current", :controller => 'users', :action => 'show', :id => 'current' |
|
363 | should_route :get, "/users/current", :controller => 'users', :action => 'show', :id => 'current' | |
364 | should_route :get, "/users/current.xml", :controller => 'users', :action => 'show', :id => 'current', :format => 'xml' |
|
364 | should_route :get, "/users/current.xml", :controller => 'users', :action => 'show', :id => 'current', :format => 'xml' | |
365 | should_route :get, "/users/new", :controller => 'users', :action => 'new' |
|
365 | should_route :get, "/users/new", :controller => 'users', :action => 'new' | |
366 | should_route :get, "/users/444/edit", :controller => 'users', :action => 'edit', :id => '444' |
|
366 | should_route :get, "/users/444/edit", :controller => 'users', :action => 'edit', :id => '444' | |
367 |
|
367 | |||
368 | should_route :post, "/users", :controller => 'users', :action => 'create' |
|
368 | should_route :post, "/users", :controller => 'users', :action => 'create' | |
369 | should_route :post, "/users.xml", :controller => 'users', :action => 'create', :format => 'xml' |
|
369 | should_route :post, "/users.xml", :controller => 'users', :action => 'create', :format => 'xml' | |
370 |
|
370 | |||
371 | should_route :put, "/users/444", :controller => 'users', :action => 'update', :id => '444' |
|
371 | should_route :put, "/users/444", :controller => 'users', :action => 'update', :id => '444' | |
372 | should_route :put, "/users/444.xml", :controller => 'users', :action => 'update', :id => '444', :format => 'xml' |
|
372 | should_route :put, "/users/444.xml", :controller => 'users', :action => 'update', :id => '444', :format => 'xml' | |
373 |
|
373 | |||
374 | should_route :delete, "/users/44", :controller => 'users', :action => 'destroy', :id => '44' |
|
374 | should_route :delete, "/users/44", :controller => 'users', :action => 'destroy', :id => '44' | |
375 | should_route :delete, "/users/44.xml", :controller => 'users', :action => 'destroy', :id => '44', :format => 'xml' |
|
375 | should_route :delete, "/users/44.xml", :controller => 'users', :action => 'destroy', :id => '44', :format => 'xml' | |
376 |
|
376 | |||
377 | should_route :post, "/users/123/memberships", :controller => 'users', :action => 'edit_membership', :id => '123' |
|
377 | should_route :post, "/users/123/memberships", :controller => 'users', :action => 'edit_membership', :id => '123' | |
378 | should_route :put, "/users/123/memberships/55", :controller => 'users', :action => 'edit_membership', :id => '123', :membership_id => '55' |
|
378 | should_route :put, "/users/123/memberships/55", :controller => 'users', :action => 'edit_membership', :id => '123', :membership_id => '55' | |
379 | should_route :delete, "/users/123/memberships/55", :controller => 'users', :action => 'destroy_membership', :id => '123', :membership_id => '55' |
|
379 | should_route :delete, "/users/123/memberships/55", :controller => 'users', :action => 'destroy_membership', :id => '123', :membership_id => '55' | |
380 | end |
|
380 | end | |
381 |
|
381 | |||
382 | context "versions" do |
|
382 | context "versions" do | |
383 | # /projects/foo/versions is /projects/foo/roadmap |
|
383 | # /projects/foo/versions is /projects/foo/roadmap | |
384 | should_route :get, "/projects/foo/versions.xml", :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'xml' |
|
384 | should_route :get, "/projects/foo/versions.xml", :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'xml' | |
385 | should_route :get, "/projects/foo/versions.json", :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'json' |
|
385 | should_route :get, "/projects/foo/versions.json", :controller => 'versions', :action => 'index', :project_id => 'foo', :format => 'json' | |
386 |
|
386 | |||
387 | should_route :get, "/projects/foo/versions/new", :controller => 'versions', :action => 'new', :project_id => 'foo' |
|
387 | should_route :get, "/projects/foo/versions/new", :controller => 'versions', :action => 'new', :project_id => 'foo' | |
388 |
|
388 | |||
389 | should_route :post, "/projects/foo/versions", :controller => 'versions', :action => 'create', :project_id => 'foo' |
|
389 | should_route :post, "/projects/foo/versions", :controller => 'versions', :action => 'create', :project_id => 'foo' | |
390 | should_route :post, "/projects/foo/versions.xml", :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'xml' |
|
390 | should_route :post, "/projects/foo/versions.xml", :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'xml' | |
391 | should_route :post, "/projects/foo/versions.json", :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'json' |
|
391 | should_route :post, "/projects/foo/versions.json", :controller => 'versions', :action => 'create', :project_id => 'foo', :format => 'json' | |
392 |
|
392 | |||
393 | should_route :get, "/versions/1", :controller => 'versions', :action => 'show', :id => '1' |
|
393 | should_route :get, "/versions/1", :controller => 'versions', :action => 'show', :id => '1' | |
394 | should_route :get, "/versions/1.xml", :controller => 'versions', :action => 'show', :id => '1', :format => 'xml' |
|
394 | should_route :get, "/versions/1.xml", :controller => 'versions', :action => 'show', :id => '1', :format => 'xml' | |
395 | should_route :get, "/versions/1.json", :controller => 'versions', :action => 'show', :id => '1', :format => 'json' |
|
395 | should_route :get, "/versions/1.json", :controller => 'versions', :action => 'show', :id => '1', :format => 'json' | |
396 |
|
396 | |||
397 | should_route :get, "/versions/1/edit", :controller => 'versions', :action => 'edit', :id => '1' |
|
397 | should_route :get, "/versions/1/edit", :controller => 'versions', :action => 'edit', :id => '1' | |
398 |
|
398 | |||
399 | should_route :put, "/versions/1", :controller => 'versions', :action => 'update', :id => '1' |
|
399 | should_route :put, "/versions/1", :controller => 'versions', :action => 'update', :id => '1' | |
400 | should_route :put, "/versions/1.xml", :controller => 'versions', :action => 'update', :id => '1', :format => 'xml' |
|
400 | should_route :put, "/versions/1.xml", :controller => 'versions', :action => 'update', :id => '1', :format => 'xml' | |
401 | should_route :put, "/versions/1.json", :controller => 'versions', :action => 'update', :id => '1', :format => 'json' |
|
401 | should_route :put, "/versions/1.json", :controller => 'versions', :action => 'update', :id => '1', :format => 'json' | |
402 |
|
402 | |||
403 | should_route :delete, "/versions/1", :controller => 'versions', :action => 'destroy', :id => '1' |
|
403 | should_route :delete, "/versions/1", :controller => 'versions', :action => 'destroy', :id => '1' | |
404 | should_route :delete, "/versions/1.xml", :controller => 'versions', :action => 'destroy', :id => '1', :format => 'xml' |
|
404 | should_route :delete, "/versions/1.xml", :controller => 'versions', :action => 'destroy', :id => '1', :format => 'xml' | |
405 | should_route :delete, "/versions/1.json", :controller => 'versions', :action => 'destroy', :id => '1', :format => 'json' |
|
405 | should_route :delete, "/versions/1.json", :controller => 'versions', :action => 'destroy', :id => '1', :format => 'json' | |
406 |
|
406 | |||
407 | should_route :put, "/projects/foo/versions/close_completed", :controller => 'versions', :action => 'close_completed', :project_id => 'foo' |
|
407 | should_route :put, "/projects/foo/versions/close_completed", :controller => 'versions', :action => 'close_completed', :project_id => 'foo' | |
408 | should_route :post, "/versions/1/status_by", :controller => 'versions', :action => 'status_by', :id => '1' |
|
408 | should_route :post, "/versions/1/status_by", :controller => 'versions', :action => 'status_by', :id => '1' | |
409 | end |
|
409 | end | |
410 |
|
410 | |||
411 | context "wiki (singular, project's pages)" do |
|
411 | context "wiki (singular, project's pages)" do | |
412 | should_route :get, "/projects/567/wiki", :controller => 'wiki', :action => 'show', :project_id => '567' |
|
412 | should_route :get, "/projects/567/wiki", :controller => 'wiki', :action => 'show', :project_id => '567' | |
413 | should_route :get, "/projects/567/wiki/lalala", :controller => 'wiki', :action => 'show', :project_id => '567', :id => 'lalala' |
|
413 | should_route :get, "/projects/567/wiki/lalala", :controller => 'wiki', :action => 'show', :project_id => '567', :id => 'lalala' | |
414 | should_route :get, "/projects/567/wiki/my_page/edit", :controller => 'wiki', :action => 'edit', :project_id => '567', :id => 'my_page' |
|
414 | should_route :get, "/projects/567/wiki/my_page/edit", :controller => 'wiki', :action => 'edit', :project_id => '567', :id => 'my_page' | |
415 | should_route :get, "/projects/1/wiki/CookBook_documentation/history", :controller => 'wiki', :action => 'history', :project_id => '1', :id => 'CookBook_documentation' |
|
415 | should_route :get, "/projects/1/wiki/CookBook_documentation/history", :controller => 'wiki', :action => 'history', :project_id => '1', :id => 'CookBook_documentation' | |
416 | should_route :get, "/projects/1/wiki/CookBook_documentation/diff", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation' |
|
416 | should_route :get, "/projects/1/wiki/CookBook_documentation/diff", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation' | |
417 | should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2' |
|
417 | should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2' | |
418 | should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2/vs/1", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2', :version_from => '1' |
|
418 | should_route :get, "/projects/1/wiki/CookBook_documentation/diff/2/vs/1", :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2', :version_from => '1' | |
419 | should_route :get, "/projects/1/wiki/CookBook_documentation/annotate/2", :controller => 'wiki', :action => 'annotate', :project_id => '1', :id => 'CookBook_documentation', :version => '2' |
|
419 | should_route :get, "/projects/1/wiki/CookBook_documentation/annotate/2", :controller => 'wiki', :action => 'annotate', :project_id => '1', :id => 'CookBook_documentation', :version => '2' | |
420 | should_route :get, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida' |
|
420 | should_route :get, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida' | |
421 | should_route :get, "/projects/567/wiki/index", :controller => 'wiki', :action => 'index', :project_id => '567' |
|
421 | should_route :get, "/projects/567/wiki/index", :controller => 'wiki', :action => 'index', :project_id => '567' | |
422 | should_route :get, "/projects/567/wiki/date_index", :controller => 'wiki', :action => 'date_index', :project_id => '567' |
|
422 | should_route :get, "/projects/567/wiki/date_index", :controller => 'wiki', :action => 'date_index', :project_id => '567' | |
423 | should_route :get, "/projects/567/wiki/export", :controller => 'wiki', :action => 'export', :project_id => '567' |
|
423 | should_route :get, "/projects/567/wiki/export", :controller => 'wiki', :action => 'export', :project_id => '567' | |
424 |
|
424 | |||
425 | should_route :post, "/projects/567/wiki/CookBook_documentation/preview", :controller => 'wiki', :action => 'preview', :project_id => '567', :id => 'CookBook_documentation' |
|
425 | should_route :post, "/projects/567/wiki/CookBook_documentation/preview", :controller => 'wiki', :action => 'preview', :project_id => '567', :id => 'CookBook_documentation' | |
426 | should_route :post, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida' |
|
426 | should_route :post, "/projects/22/wiki/ladida/rename", :controller => 'wiki', :action => 'rename', :project_id => '22', :id => 'ladida' | |
427 | should_route :post, "/projects/22/wiki/ladida/protect", :controller => 'wiki', :action => 'protect', :project_id => '22', :id => 'ladida' |
|
427 | should_route :post, "/projects/22/wiki/ladida/protect", :controller => 'wiki', :action => 'protect', :project_id => '22', :id => 'ladida' | |
428 | should_route :post, "/projects/22/wiki/ladida/add_attachment", :controller => 'wiki', :action => 'add_attachment', :project_id => '22', :id => 'ladida' |
|
428 | should_route :post, "/projects/22/wiki/ladida/add_attachment", :controller => 'wiki', :action => 'add_attachment', :project_id => '22', :id => 'ladida' | |
429 |
|
429 | |||
430 | should_route :put, "/projects/567/wiki/my_page", :controller => 'wiki', :action => 'update', :project_id => '567', :id => 'my_page' |
|
430 | should_route :put, "/projects/567/wiki/my_page", :controller => 'wiki', :action => 'update', :project_id => '567', :id => 'my_page' | |
431 |
|
431 | |||
432 | should_route :delete, "/projects/22/wiki/ladida", :controller => 'wiki', :action => 'destroy', :project_id => '22', :id => 'ladida' |
|
432 | should_route :delete, "/projects/22/wiki/ladida", :controller => 'wiki', :action => 'destroy', :project_id => '22', :id => 'ladida' | |
433 | end |
|
433 | end | |
434 |
|
434 | |||
435 | context "wikis (plural, admin setup)" do |
|
435 | context "wikis (plural, admin setup)" do | |
436 | should_route :get, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida' |
|
436 | should_route :get, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida' | |
437 |
|
437 | |||
438 | should_route :post, "/projects/ladida/wiki", :controller => 'wikis', :action => 'edit', :id => 'ladida' |
|
438 | should_route :post, "/projects/ladida/wiki", :controller => 'wikis', :action => 'edit', :id => 'ladida' | |
439 | should_route :post, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida' |
|
439 | should_route :post, "/projects/ladida/wiki/destroy", :controller => 'wikis', :action => 'destroy', :id => 'ladida' | |
440 | end |
|
440 | end | |
441 |
|
441 | |||
442 | context "administration panel" do |
|
442 | context "administration panel" do | |
443 | should_route :get, "/admin/projects", :controller => 'admin', :action => 'projects' |
|
443 | should_route :get, "/admin/projects", :controller => 'admin', :action => 'projects' | |
444 | end |
|
444 | end | |
445 | end |
|
445 | end |
General Comments 0
You need to be logged in to leave comments.
Login now