described_routes 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +8 -1
- data/Manifest.txt +31 -0
- data/README.rdoc +6 -2
- data/Rakefile +13 -11
- data/lib/described_routes/rake_task_methods.rb +38 -0
- data/lib/described_routes.rb +1 -1
- data/lib/tasks/described_routes.rb +12 -22
- data/test_rails_app/Rakefile +12 -0
- data/test_rails_app/app/controllers/application_controller.rb +10 -0
- data/test_rails_app/app/helpers/application_helper.rb +3 -0
- data/test_rails_app/config/boot.rb +110 -0
- data/test_rails_app/config/environment.rb +41 -0
- data/test_rails_app/config/environments/development.rb +17 -0
- data/test_rails_app/config/environments/production.rb +28 -0
- data/test_rails_app/config/environments/test.rb +28 -0
- data/test_rails_app/config/initializers/described_routes.rb +1 -0
- data/test_rails_app/config/initializers/new_rails_defaults.rb +19 -0
- data/test_rails_app/config/initializers/session_store.rb +15 -0
- data/test_rails_app/config/routes.rb +28 -0
- data/test_rails_app/log/development.log +0 -0
- data/test_rails_app/log/production.log +0 -0
- data/test_rails_app/log/server.log +0 -0
- data/test_rails_app/log/test.log +0 -0
- data/test_rails_app/script/server +3 -0
- data/test_rails_app/test/fixtures/build_time/described_routes.json +1 -0
- data/test_rails_app/test/fixtures/build_time/described_routes.text +27 -0
- data/test_rails_app/test/fixtures/build_time/described_routes.xml +309 -0
- data/test_rails_app/test/fixtures/build_time/described_routes.yaml +243 -0
- data/test_rails_app/test/fixtures/build_time/described_routes.yaml_short +72 -0
- data/test_rails_app/test/fixtures/run_time/described_routes.json +1 -0
- data/test_rails_app/test/fixtures/run_time/described_routes.text +27 -0
- data/test_rails_app/test/fixtures/run_time/described_routes.xml +336 -0
- data/test_rails_app/test/fixtures/run_time/described_routes.yaml +270 -0
- data/test_rails_app/test/fixtures/run_time/described_routes.yaml_short +99 -0
- data/test_rails_app/test/integration/described_routes_run_time_test.rb +37 -0
- data/test_rails_app/test/integration/rake_tasks_test.rb +29 -0
- data/test_rails_app/test/test_helper.rb +2 -0
- metadata +34 -3
@@ -0,0 +1,309 @@
|
|
1
|
+
<ResourceTemplates>
|
2
|
+
<ResourceTemplate>
|
3
|
+
<name>root</name>
|
4
|
+
<path_template>/</path_template>
|
5
|
+
</ResourceTemplate>
|
6
|
+
<ResourceTemplate>
|
7
|
+
<name>admin_products</name>
|
8
|
+
<path_template>/admin/products{-prefix|.|format}</path_template>
|
9
|
+
<OptionalParams>
|
10
|
+
<param>format</param>
|
11
|
+
</OptionalParams>
|
12
|
+
<options>GET, POST</options>
|
13
|
+
<ResourceTemplates>
|
14
|
+
<ResourceTemplate>
|
15
|
+
<rel>new_admin_product</rel>
|
16
|
+
<name>new_admin_product</name>
|
17
|
+
<path_template>/admin/products/new{-prefix|.|format}</path_template>
|
18
|
+
<OptionalParams>
|
19
|
+
<param>format</param>
|
20
|
+
</OptionalParams>
|
21
|
+
<options>GET</options>
|
22
|
+
</ResourceTemplate>
|
23
|
+
<ResourceTemplate>
|
24
|
+
<name>admin_product</name>
|
25
|
+
<path_template>/admin/products/{product_id}{-prefix|.|format}</path_template>
|
26
|
+
<Params>
|
27
|
+
<param>product_id</param>
|
28
|
+
</Params>
|
29
|
+
<OptionalParams>
|
30
|
+
<param>format</param>
|
31
|
+
</OptionalParams>
|
32
|
+
<options>GET, PUT, DELETE</options>
|
33
|
+
<ResourceTemplates>
|
34
|
+
<ResourceTemplate>
|
35
|
+
<rel>edit</rel>
|
36
|
+
<name>edit_admin_product</name>
|
37
|
+
<path_template>/admin/products/{product_id}/edit{-prefix|.|format}</path_template>
|
38
|
+
<Params>
|
39
|
+
<param>product_id</param>
|
40
|
+
</Params>
|
41
|
+
<OptionalParams>
|
42
|
+
<param>format</param>
|
43
|
+
</OptionalParams>
|
44
|
+
<options>GET</options>
|
45
|
+
</ResourceTemplate>
|
46
|
+
</ResourceTemplates>
|
47
|
+
</ResourceTemplate>
|
48
|
+
</ResourceTemplates>
|
49
|
+
</ResourceTemplate>
|
50
|
+
<ResourceTemplate>
|
51
|
+
<name>described_routes</name>
|
52
|
+
<path_template>/described_routes{-prefix|.|format}</path_template>
|
53
|
+
<OptionalParams>
|
54
|
+
<param>format</param>
|
55
|
+
</OptionalParams>
|
56
|
+
<options>GET, POST</options>
|
57
|
+
<ResourceTemplates>
|
58
|
+
<ResourceTemplate>
|
59
|
+
<rel>new_described_route</rel>
|
60
|
+
<name>new_described_route</name>
|
61
|
+
<path_template>/described_routes/new{-prefix|.|format}</path_template>
|
62
|
+
<OptionalParams>
|
63
|
+
<param>format</param>
|
64
|
+
</OptionalParams>
|
65
|
+
<options>GET</options>
|
66
|
+
</ResourceTemplate>
|
67
|
+
<ResourceTemplate>
|
68
|
+
<name>described_route</name>
|
69
|
+
<path_template>/described_routes/{route_name}{-prefix|.|format}</path_template>
|
70
|
+
<Params>
|
71
|
+
<param>route_name</param>
|
72
|
+
</Params>
|
73
|
+
<OptionalParams>
|
74
|
+
<param>format</param>
|
75
|
+
</OptionalParams>
|
76
|
+
<options>GET, PUT, DELETE</options>
|
77
|
+
<ResourceTemplates>
|
78
|
+
<ResourceTemplate>
|
79
|
+
<rel>edit</rel>
|
80
|
+
<name>edit_described_route</name>
|
81
|
+
<path_template>/described_routes/{route_name}/edit{-prefix|.|format}</path_template>
|
82
|
+
<Params>
|
83
|
+
<param>route_name</param>
|
84
|
+
</Params>
|
85
|
+
<OptionalParams>
|
86
|
+
<param>format</param>
|
87
|
+
</OptionalParams>
|
88
|
+
<options>GET</options>
|
89
|
+
</ResourceTemplate>
|
90
|
+
</ResourceTemplates>
|
91
|
+
</ResourceTemplate>
|
92
|
+
</ResourceTemplates>
|
93
|
+
</ResourceTemplate>
|
94
|
+
<ResourceTemplate>
|
95
|
+
<name>pages</name>
|
96
|
+
<path_template>/pages{-prefix|.|format}</path_template>
|
97
|
+
<OptionalParams>
|
98
|
+
<param>format</param>
|
99
|
+
</OptionalParams>
|
100
|
+
<options>GET, POST</options>
|
101
|
+
<ResourceTemplates>
|
102
|
+
<ResourceTemplate>
|
103
|
+
<rel>new_page</rel>
|
104
|
+
<name>new_page</name>
|
105
|
+
<path_template>/pages/new{-prefix|.|format}</path_template>
|
106
|
+
<OptionalParams>
|
107
|
+
<param>format</param>
|
108
|
+
</OptionalParams>
|
109
|
+
<options>GET</options>
|
110
|
+
</ResourceTemplate>
|
111
|
+
<ResourceTemplate>
|
112
|
+
<name>page</name>
|
113
|
+
<path_template>/pages/{page_id}{-prefix|.|format}</path_template>
|
114
|
+
<Params>
|
115
|
+
<param>page_id</param>
|
116
|
+
</Params>
|
117
|
+
<OptionalParams>
|
118
|
+
<param>format</param>
|
119
|
+
</OptionalParams>
|
120
|
+
<options>GET, PUT, DELETE</options>
|
121
|
+
<ResourceTemplates>
|
122
|
+
<ResourceTemplate>
|
123
|
+
<rel>edit</rel>
|
124
|
+
<name>edit_page</name>
|
125
|
+
<path_template>/pages/{page_id}/edit{-prefix|.|format}</path_template>
|
126
|
+
<Params>
|
127
|
+
<param>page_id</param>
|
128
|
+
</Params>
|
129
|
+
<OptionalParams>
|
130
|
+
<param>format</param>
|
131
|
+
</OptionalParams>
|
132
|
+
<options>GET</options>
|
133
|
+
</ResourceTemplate>
|
134
|
+
<ResourceTemplate>
|
135
|
+
<rel>summary</rel>
|
136
|
+
<name>summary_page</name>
|
137
|
+
<path_template>/pages/{page_id}/summary{-prefix|.|format}</path_template>
|
138
|
+
<Params>
|
139
|
+
<param>page_id</param>
|
140
|
+
</Params>
|
141
|
+
<OptionalParams>
|
142
|
+
<param>format</param>
|
143
|
+
</OptionalParams>
|
144
|
+
<options>GET</options>
|
145
|
+
</ResourceTemplate>
|
146
|
+
<ResourceTemplate>
|
147
|
+
<rel>toggle_visibility</rel>
|
148
|
+
<name>toggle_visibility_page</name>
|
149
|
+
<path_template>/pages/{page_id}/toggle_visibility{-prefix|.|format}</path_template>
|
150
|
+
<Params>
|
151
|
+
<param>page_id</param>
|
152
|
+
</Params>
|
153
|
+
<OptionalParams>
|
154
|
+
<param>format</param>
|
155
|
+
</OptionalParams>
|
156
|
+
<options>POST</options>
|
157
|
+
</ResourceTemplate>
|
158
|
+
</ResourceTemplates>
|
159
|
+
</ResourceTemplate>
|
160
|
+
</ResourceTemplates>
|
161
|
+
</ResourceTemplate>
|
162
|
+
<ResourceTemplate>
|
163
|
+
<name>users</name>
|
164
|
+
<path_template>/users{-prefix|.|format}</path_template>
|
165
|
+
<OptionalParams>
|
166
|
+
<param>format</param>
|
167
|
+
</OptionalParams>
|
168
|
+
<options>GET, POST</options>
|
169
|
+
<ResourceTemplates>
|
170
|
+
<ResourceTemplate>
|
171
|
+
<rel>new_user</rel>
|
172
|
+
<name>new_user</name>
|
173
|
+
<path_template>/users/new{-prefix|.|format}</path_template>
|
174
|
+
<OptionalParams>
|
175
|
+
<param>format</param>
|
176
|
+
</OptionalParams>
|
177
|
+
<options>GET</options>
|
178
|
+
</ResourceTemplate>
|
179
|
+
<ResourceTemplate>
|
180
|
+
<name>user</name>
|
181
|
+
<path_template>/users/{user_id}{-prefix|.|format}</path_template>
|
182
|
+
<Params>
|
183
|
+
<param>user_id</param>
|
184
|
+
</Params>
|
185
|
+
<OptionalParams>
|
186
|
+
<param>format</param>
|
187
|
+
</OptionalParams>
|
188
|
+
<options>GET, PUT, DELETE</options>
|
189
|
+
<ResourceTemplates>
|
190
|
+
<ResourceTemplate>
|
191
|
+
<rel>edit</rel>
|
192
|
+
<name>edit_user</name>
|
193
|
+
<path_template>/users/{user_id}/edit{-prefix|.|format}</path_template>
|
194
|
+
<Params>
|
195
|
+
<param>user_id</param>
|
196
|
+
</Params>
|
197
|
+
<OptionalParams>
|
198
|
+
<param>format</param>
|
199
|
+
</OptionalParams>
|
200
|
+
<options>GET</options>
|
201
|
+
</ResourceTemplate>
|
202
|
+
<ResourceTemplate>
|
203
|
+
<rel>articles</rel>
|
204
|
+
<name>user_articles</name>
|
205
|
+
<path_template>/users/{user_id}/articles{-prefix|.|format}</path_template>
|
206
|
+
<Params>
|
207
|
+
<param>user_id</param>
|
208
|
+
</Params>
|
209
|
+
<OptionalParams>
|
210
|
+
<param>format</param>
|
211
|
+
</OptionalParams>
|
212
|
+
<options>GET, POST</options>
|
213
|
+
<ResourceTemplates>
|
214
|
+
<ResourceTemplate>
|
215
|
+
<rel>new_user_article</rel>
|
216
|
+
<name>new_user_article</name>
|
217
|
+
<path_template>/users/{user_id}/articles/new{-prefix|.|format}</path_template>
|
218
|
+
<Params>
|
219
|
+
<param>user_id</param>
|
220
|
+
</Params>
|
221
|
+
<OptionalParams>
|
222
|
+
<param>format</param>
|
223
|
+
</OptionalParams>
|
224
|
+
<options>GET</options>
|
225
|
+
</ResourceTemplate>
|
226
|
+
<ResourceTemplate>
|
227
|
+
<rel>recent</rel>
|
228
|
+
<name>recent_user_articles</name>
|
229
|
+
<path_template>/users/{user_id}/articles/recent{-prefix|.|format}</path_template>
|
230
|
+
<Params>
|
231
|
+
<param>user_id</param>
|
232
|
+
</Params>
|
233
|
+
<OptionalParams>
|
234
|
+
<param>format</param>
|
235
|
+
</OptionalParams>
|
236
|
+
<options>GET</options>
|
237
|
+
</ResourceTemplate>
|
238
|
+
<ResourceTemplate>
|
239
|
+
<name>user_article</name>
|
240
|
+
<path_template>/users/{user_id}/articles/{article_id}{-prefix|.|format}</path_template>
|
241
|
+
<Params>
|
242
|
+
<param>user_id</param>
|
243
|
+
<param>article_id</param>
|
244
|
+
</Params>
|
245
|
+
<OptionalParams>
|
246
|
+
<param>format</param>
|
247
|
+
</OptionalParams>
|
248
|
+
<options>GET, PUT, DELETE</options>
|
249
|
+
<ResourceTemplates>
|
250
|
+
<ResourceTemplate>
|
251
|
+
<rel>edit</rel>
|
252
|
+
<name>edit_user_article</name>
|
253
|
+
<path_template>/users/{user_id}/articles/{article_id}/edit{-prefix|.|format}</path_template>
|
254
|
+
<Params>
|
255
|
+
<param>user_id</param>
|
256
|
+
<param>article_id</param>
|
257
|
+
</Params>
|
258
|
+
<OptionalParams>
|
259
|
+
<param>format</param>
|
260
|
+
</OptionalParams>
|
261
|
+
<options>GET</options>
|
262
|
+
</ResourceTemplate>
|
263
|
+
</ResourceTemplates>
|
264
|
+
</ResourceTemplate>
|
265
|
+
</ResourceTemplates>
|
266
|
+
</ResourceTemplate>
|
267
|
+
<ResourceTemplate>
|
268
|
+
<rel>profile</rel>
|
269
|
+
<name>user_profile</name>
|
270
|
+
<path_template>/users/{user_id}/profile{-prefix|.|format}</path_template>
|
271
|
+
<Params>
|
272
|
+
<param>user_id</param>
|
273
|
+
</Params>
|
274
|
+
<OptionalParams>
|
275
|
+
<param>format</param>
|
276
|
+
</OptionalParams>
|
277
|
+
<options>GET, PUT, DELETE, POST</options>
|
278
|
+
<ResourceTemplates>
|
279
|
+
<ResourceTemplate>
|
280
|
+
<rel>edit</rel>
|
281
|
+
<name>edit_user_profile</name>
|
282
|
+
<path_template>/users/{user_id}/profile/edit{-prefix|.|format}</path_template>
|
283
|
+
<Params>
|
284
|
+
<param>user_id</param>
|
285
|
+
</Params>
|
286
|
+
<OptionalParams>
|
287
|
+
<param>format</param>
|
288
|
+
</OptionalParams>
|
289
|
+
<options>GET</options>
|
290
|
+
</ResourceTemplate>
|
291
|
+
<ResourceTemplate>
|
292
|
+
<rel>new</rel>
|
293
|
+
<name>new_user_profile</name>
|
294
|
+
<path_template>/users/{user_id}/profile/new{-prefix|.|format}</path_template>
|
295
|
+
<Params>
|
296
|
+
<param>user_id</param>
|
297
|
+
</Params>
|
298
|
+
<OptionalParams>
|
299
|
+
<param>format</param>
|
300
|
+
</OptionalParams>
|
301
|
+
<options>GET</options>
|
302
|
+
</ResourceTemplate>
|
303
|
+
</ResourceTemplates>
|
304
|
+
</ResourceTemplate>
|
305
|
+
</ResourceTemplates>
|
306
|
+
</ResourceTemplate>
|
307
|
+
</ResourceTemplates>
|
308
|
+
</ResourceTemplate>
|
309
|
+
</ResourceTemplates>
|
@@ -0,0 +1,243 @@
|
|
1
|
+
---
|
2
|
+
- name: root
|
3
|
+
path_template: /
|
4
|
+
- name: admin_products
|
5
|
+
resource_templates:
|
6
|
+
- name: new_admin_product
|
7
|
+
options:
|
8
|
+
- GET
|
9
|
+
path_template: /admin/products/new{-prefix|.|format}
|
10
|
+
rel: new_admin_product
|
11
|
+
optional_params:
|
12
|
+
- format
|
13
|
+
- name: admin_product
|
14
|
+
resource_templates:
|
15
|
+
- name: edit_admin_product
|
16
|
+
options:
|
17
|
+
- GET
|
18
|
+
path_template: /admin/products/{product_id}/edit{-prefix|.|format}
|
19
|
+
rel: edit
|
20
|
+
optional_params:
|
21
|
+
- format
|
22
|
+
params:
|
23
|
+
- product_id
|
24
|
+
options:
|
25
|
+
- GET
|
26
|
+
- PUT
|
27
|
+
- DELETE
|
28
|
+
path_template: /admin/products/{product_id}{-prefix|.|format}
|
29
|
+
optional_params:
|
30
|
+
- format
|
31
|
+
params:
|
32
|
+
- product_id
|
33
|
+
options:
|
34
|
+
- GET
|
35
|
+
- POST
|
36
|
+
path_template: /admin/products{-prefix|.|format}
|
37
|
+
optional_params:
|
38
|
+
- format
|
39
|
+
- name: described_routes
|
40
|
+
resource_templates:
|
41
|
+
- name: new_described_route
|
42
|
+
options:
|
43
|
+
- GET
|
44
|
+
path_template: /described_routes/new{-prefix|.|format}
|
45
|
+
rel: new_described_route
|
46
|
+
optional_params:
|
47
|
+
- format
|
48
|
+
- name: described_route
|
49
|
+
resource_templates:
|
50
|
+
- name: edit_described_route
|
51
|
+
options:
|
52
|
+
- GET
|
53
|
+
path_template: /described_routes/{route_name}/edit{-prefix|.|format}
|
54
|
+
rel: edit
|
55
|
+
optional_params:
|
56
|
+
- format
|
57
|
+
params:
|
58
|
+
- route_name
|
59
|
+
options:
|
60
|
+
- GET
|
61
|
+
- PUT
|
62
|
+
- DELETE
|
63
|
+
path_template: /described_routes/{route_name}{-prefix|.|format}
|
64
|
+
optional_params:
|
65
|
+
- format
|
66
|
+
params:
|
67
|
+
- route_name
|
68
|
+
options:
|
69
|
+
- GET
|
70
|
+
- POST
|
71
|
+
path_template: /described_routes{-prefix|.|format}
|
72
|
+
optional_params:
|
73
|
+
- format
|
74
|
+
- name: pages
|
75
|
+
resource_templates:
|
76
|
+
- name: new_page
|
77
|
+
options:
|
78
|
+
- GET
|
79
|
+
path_template: /pages/new{-prefix|.|format}
|
80
|
+
rel: new_page
|
81
|
+
optional_params:
|
82
|
+
- format
|
83
|
+
- name: page
|
84
|
+
resource_templates:
|
85
|
+
- name: edit_page
|
86
|
+
options:
|
87
|
+
- GET
|
88
|
+
path_template: /pages/{page_id}/edit{-prefix|.|format}
|
89
|
+
rel: edit
|
90
|
+
optional_params:
|
91
|
+
- format
|
92
|
+
params:
|
93
|
+
- page_id
|
94
|
+
- name: summary_page
|
95
|
+
options:
|
96
|
+
- GET
|
97
|
+
path_template: /pages/{page_id}/summary{-prefix|.|format}
|
98
|
+
rel: summary
|
99
|
+
optional_params:
|
100
|
+
- format
|
101
|
+
params:
|
102
|
+
- page_id
|
103
|
+
- name: toggle_visibility_page
|
104
|
+
options:
|
105
|
+
- POST
|
106
|
+
path_template: /pages/{page_id}/toggle_visibility{-prefix|.|format}
|
107
|
+
rel: toggle_visibility
|
108
|
+
optional_params:
|
109
|
+
- format
|
110
|
+
params:
|
111
|
+
- page_id
|
112
|
+
options:
|
113
|
+
- GET
|
114
|
+
- PUT
|
115
|
+
- DELETE
|
116
|
+
path_template: /pages/{page_id}{-prefix|.|format}
|
117
|
+
optional_params:
|
118
|
+
- format
|
119
|
+
params:
|
120
|
+
- page_id
|
121
|
+
options:
|
122
|
+
- GET
|
123
|
+
- POST
|
124
|
+
path_template: /pages{-prefix|.|format}
|
125
|
+
optional_params:
|
126
|
+
- format
|
127
|
+
- name: users
|
128
|
+
resource_templates:
|
129
|
+
- name: new_user
|
130
|
+
options:
|
131
|
+
- GET
|
132
|
+
path_template: /users/new{-prefix|.|format}
|
133
|
+
rel: new_user
|
134
|
+
optional_params:
|
135
|
+
- format
|
136
|
+
- name: user
|
137
|
+
resource_templates:
|
138
|
+
- name: edit_user
|
139
|
+
options:
|
140
|
+
- GET
|
141
|
+
path_template: /users/{user_id}/edit{-prefix|.|format}
|
142
|
+
rel: edit
|
143
|
+
optional_params:
|
144
|
+
- format
|
145
|
+
params:
|
146
|
+
- user_id
|
147
|
+
- name: user_articles
|
148
|
+
resource_templates:
|
149
|
+
- name: new_user_article
|
150
|
+
options:
|
151
|
+
- GET
|
152
|
+
path_template: /users/{user_id}/articles/new{-prefix|.|format}
|
153
|
+
rel: new_user_article
|
154
|
+
optional_params:
|
155
|
+
- format
|
156
|
+
params:
|
157
|
+
- user_id
|
158
|
+
- name: recent_user_articles
|
159
|
+
options:
|
160
|
+
- GET
|
161
|
+
path_template: /users/{user_id}/articles/recent{-prefix|.|format}
|
162
|
+
rel: recent
|
163
|
+
optional_params:
|
164
|
+
- format
|
165
|
+
params:
|
166
|
+
- user_id
|
167
|
+
- name: user_article
|
168
|
+
resource_templates:
|
169
|
+
- name: edit_user_article
|
170
|
+
options:
|
171
|
+
- GET
|
172
|
+
path_template: /users/{user_id}/articles/{article_id}/edit{-prefix|.|format}
|
173
|
+
rel: edit
|
174
|
+
optional_params:
|
175
|
+
- format
|
176
|
+
params:
|
177
|
+
- user_id
|
178
|
+
- article_id
|
179
|
+
options:
|
180
|
+
- GET
|
181
|
+
- PUT
|
182
|
+
- DELETE
|
183
|
+
path_template: /users/{user_id}/articles/{article_id}{-prefix|.|format}
|
184
|
+
optional_params:
|
185
|
+
- format
|
186
|
+
params:
|
187
|
+
- user_id
|
188
|
+
- article_id
|
189
|
+
options:
|
190
|
+
- GET
|
191
|
+
- POST
|
192
|
+
path_template: /users/{user_id}/articles{-prefix|.|format}
|
193
|
+
rel: articles
|
194
|
+
optional_params:
|
195
|
+
- format
|
196
|
+
params:
|
197
|
+
- user_id
|
198
|
+
- name: user_profile
|
199
|
+
resource_templates:
|
200
|
+
- name: edit_user_profile
|
201
|
+
options:
|
202
|
+
- GET
|
203
|
+
path_template: /users/{user_id}/profile/edit{-prefix|.|format}
|
204
|
+
rel: edit
|
205
|
+
optional_params:
|
206
|
+
- format
|
207
|
+
params:
|
208
|
+
- user_id
|
209
|
+
- name: new_user_profile
|
210
|
+
options:
|
211
|
+
- GET
|
212
|
+
path_template: /users/{user_id}/profile/new{-prefix|.|format}
|
213
|
+
rel: new
|
214
|
+
optional_params:
|
215
|
+
- format
|
216
|
+
params:
|
217
|
+
- user_id
|
218
|
+
options:
|
219
|
+
- GET
|
220
|
+
- PUT
|
221
|
+
- DELETE
|
222
|
+
- POST
|
223
|
+
path_template: /users/{user_id}/profile{-prefix|.|format}
|
224
|
+
rel: profile
|
225
|
+
optional_params:
|
226
|
+
- format
|
227
|
+
params:
|
228
|
+
- user_id
|
229
|
+
options:
|
230
|
+
- GET
|
231
|
+
- PUT
|
232
|
+
- DELETE
|
233
|
+
path_template: /users/{user_id}{-prefix|.|format}
|
234
|
+
optional_params:
|
235
|
+
- format
|
236
|
+
params:
|
237
|
+
- user_id
|
238
|
+
options:
|
239
|
+
- GET
|
240
|
+
- POST
|
241
|
+
path_template: /users{-prefix|.|format}
|
242
|
+
optional_params:
|
243
|
+
- format
|
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
- name: root
|
3
|
+
path_template: /
|
4
|
+
- name: admin_products
|
5
|
+
- name: new_admin_product
|
6
|
+
path_template: /admin/products/new{-prefix|.|format}
|
7
|
+
rel: new_admin_product
|
8
|
+
- name: admin_product
|
9
|
+
- name: edit_admin_product
|
10
|
+
path_template: /admin/products/{product_id}/edit{-prefix|.|format}
|
11
|
+
rel: edit
|
12
|
+
path_template: /admin/products/{product_id}{-prefix|.|format}
|
13
|
+
path_template: /admin/products{-prefix|.|format}
|
14
|
+
- name: described_routes
|
15
|
+
- name: new_described_route
|
16
|
+
path_template: /described_routes/new{-prefix|.|format}
|
17
|
+
rel: new_described_route
|
18
|
+
- name: described_route
|
19
|
+
- name: edit_described_route
|
20
|
+
path_template: /described_routes/{route_name}/edit{-prefix|.|format}
|
21
|
+
rel: edit
|
22
|
+
path_template: /described_routes/{route_name}{-prefix|.|format}
|
23
|
+
path_template: /described_routes{-prefix|.|format}
|
24
|
+
- name: pages
|
25
|
+
- name: new_page
|
26
|
+
path_template: /pages/new{-prefix|.|format}
|
27
|
+
rel: new_page
|
28
|
+
- name: page
|
29
|
+
- name: edit_page
|
30
|
+
path_template: /pages/{page_id}/edit{-prefix|.|format}
|
31
|
+
rel: edit
|
32
|
+
- name: summary_page
|
33
|
+
path_template: /pages/{page_id}/summary{-prefix|.|format}
|
34
|
+
rel: summary
|
35
|
+
- name: toggle_visibility_page
|
36
|
+
path_template: /pages/{page_id}/toggle_visibility{-prefix|.|format}
|
37
|
+
rel: toggle_visibility
|
38
|
+
path_template: /pages/{page_id}{-prefix|.|format}
|
39
|
+
path_template: /pages{-prefix|.|format}
|
40
|
+
- name: users
|
41
|
+
- name: new_user
|
42
|
+
path_template: /users/new{-prefix|.|format}
|
43
|
+
rel: new_user
|
44
|
+
- name: user
|
45
|
+
- name: edit_user
|
46
|
+
path_template: /users/{user_id}/edit{-prefix|.|format}
|
47
|
+
rel: edit
|
48
|
+
- name: user_articles
|
49
|
+
- name: new_user_article
|
50
|
+
path_template: /users/{user_id}/articles/new{-prefix|.|format}
|
51
|
+
rel: new_user_article
|
52
|
+
- name: recent_user_articles
|
53
|
+
path_template: /users/{user_id}/articles/recent{-prefix|.|format}
|
54
|
+
rel: recent
|
55
|
+
- name: user_article
|
56
|
+
- name: edit_user_article
|
57
|
+
path_template: /users/{user_id}/articles/{article_id}/edit{-prefix|.|format}
|
58
|
+
rel: edit
|
59
|
+
path_template: /users/{user_id}/articles/{article_id}{-prefix|.|format}
|
60
|
+
path_template: /users/{user_id}/articles{-prefix|.|format}
|
61
|
+
rel: articles
|
62
|
+
- name: user_profile
|
63
|
+
- name: edit_user_profile
|
64
|
+
path_template: /users/{user_id}/profile/edit{-prefix|.|format}
|
65
|
+
rel: edit
|
66
|
+
- name: new_user_profile
|
67
|
+
path_template: /users/{user_id}/profile/new{-prefix|.|format}
|
68
|
+
rel: new
|
69
|
+
path_template: /users/{user_id}/profile{-prefix|.|format}
|
70
|
+
rel: profile
|
71
|
+
path_template: /users/{user_id}{-prefix|.|format}
|
72
|
+
path_template: /users{-prefix|.|format}
|
@@ -0,0 +1 @@
|
|
1
|
+
[{"name":"root","path_template":"\/","uri_template":"http:\/\/www.example.com\/"},{"name":"admin_products","resource_templates":[{"name":"new_admin_product","options":["GET"],"path_template":"\/admin\/products\/new{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/admin\/products\/new{-prefix|.|format}","rel":"new_admin_product","optional_params":["format"]},{"name":"admin_product","resource_templates":[{"name":"edit_admin_product","options":["GET"],"path_template":"\/admin\/products\/{product_id}\/edit{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/admin\/products\/{product_id}\/edit{-prefix|.|format}","rel":"edit","optional_params":["format"],"params":["product_id"]}],"options":["GET","PUT","DELETE"],"path_template":"\/admin\/products\/{product_id}{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/admin\/products\/{product_id}{-prefix|.|format}","optional_params":["format"],"params":["product_id"]}],"options":["GET","POST"],"path_template":"\/admin\/products{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/admin\/products{-prefix|.|format}","optional_params":["format"]},{"name":"described_routes","resource_templates":[{"name":"new_described_route","options":["GET"],"path_template":"\/described_routes\/new{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/described_routes\/new{-prefix|.|format}","rel":"new_described_route","optional_params":["format"]},{"name":"described_route","resource_templates":[{"name":"edit_described_route","options":["GET"],"path_template":"\/described_routes\/{route_name}\/edit{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/described_routes\/{route_name}\/edit{-prefix|.|format}","rel":"edit","optional_params":["format"],"params":["route_name"]}],"options":["GET","PUT","DELETE"],"path_template":"\/described_routes\/{route_name}{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/described_routes\/{route_name}{-prefix|.|format}","optional_params":["format"],"params":["route_name"]}],"options":["GET","POST"],"path_template":"\/described_routes{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/described_routes{-prefix|.|format}","optional_params":["format"]},{"name":"pages","resource_templates":[{"name":"new_page","options":["GET"],"path_template":"\/pages\/new{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/pages\/new{-prefix|.|format}","rel":"new_page","optional_params":["format"]},{"name":"page","resource_templates":[{"name":"edit_page","options":["GET"],"path_template":"\/pages\/{page_id}\/edit{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/pages\/{page_id}\/edit{-prefix|.|format}","rel":"edit","optional_params":["format"],"params":["page_id"]},{"name":"summary_page","options":["GET"],"path_template":"\/pages\/{page_id}\/summary{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/pages\/{page_id}\/summary{-prefix|.|format}","rel":"summary","optional_params":["format"],"params":["page_id"]},{"name":"toggle_visibility_page","options":["POST"],"path_template":"\/pages\/{page_id}\/toggle_visibility{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/pages\/{page_id}\/toggle_visibility{-prefix|.|format}","rel":"toggle_visibility","optional_params":["format"],"params":["page_id"]}],"options":["GET","PUT","DELETE"],"path_template":"\/pages\/{page_id}{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/pages\/{page_id}{-prefix|.|format}","optional_params":["format"],"params":["page_id"]}],"options":["GET","POST"],"path_template":"\/pages{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/pages{-prefix|.|format}","optional_params":["format"]},{"name":"users","resource_templates":[{"name":"new_user","options":["GET"],"path_template":"\/users\/new{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/new{-prefix|.|format}","rel":"new_user","optional_params":["format"]},{"name":"user","resource_templates":[{"name":"edit_user","options":["GET"],"path_template":"\/users\/{user_id}\/edit{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/edit{-prefix|.|format}","rel":"edit","optional_params":["format"],"params":["user_id"]},{"name":"user_articles","resource_templates":[{"name":"new_user_article","options":["GET"],"path_template":"\/users\/{user_id}\/articles\/new{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/articles\/new{-prefix|.|format}","rel":"new_user_article","optional_params":["format"],"params":["user_id"]},{"name":"recent_user_articles","options":["GET"],"path_template":"\/users\/{user_id}\/articles\/recent{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/articles\/recent{-prefix|.|format}","rel":"recent","optional_params":["format"],"params":["user_id"]},{"name":"user_article","resource_templates":[{"name":"edit_user_article","options":["GET"],"path_template":"\/users\/{user_id}\/articles\/{article_id}\/edit{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/articles\/{article_id}\/edit{-prefix|.|format}","rel":"edit","optional_params":["format"],"params":["user_id","article_id"]}],"options":["GET","PUT","DELETE"],"path_template":"\/users\/{user_id}\/articles\/{article_id}{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/articles\/{article_id}{-prefix|.|format}","optional_params":["format"],"params":["user_id","article_id"]}],"options":["GET","POST"],"path_template":"\/users\/{user_id}\/articles{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/articles{-prefix|.|format}","rel":"articles","optional_params":["format"],"params":["user_id"]},{"name":"user_profile","resource_templates":[{"name":"edit_user_profile","options":["GET"],"path_template":"\/users\/{user_id}\/profile\/edit{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/profile\/edit{-prefix|.|format}","rel":"edit","optional_params":["format"],"params":["user_id"]},{"name":"new_user_profile","options":["GET"],"path_template":"\/users\/{user_id}\/profile\/new{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/profile\/new{-prefix|.|format}","rel":"new","optional_params":["format"],"params":["user_id"]}],"options":["GET","PUT","DELETE","POST"],"path_template":"\/users\/{user_id}\/profile{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}\/profile{-prefix|.|format}","rel":"profile","optional_params":["format"],"params":["user_id"]}],"options":["GET","PUT","DELETE"],"path_template":"\/users\/{user_id}{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users\/{user_id}{-prefix|.|format}","optional_params":["format"],"params":["user_id"]}],"options":["GET","POST"],"path_template":"\/users{-prefix|.|format}","uri_template":"http:\/\/www.example.com\/users{-prefix|.|format}","optional_params":["format"]}]
|
@@ -0,0 +1,27 @@
|
|
1
|
+
root root http://www.example.com/
|
2
|
+
admin_products admin_products GET, POST http://www.example.com/admin/products{-prefix|.|format}
|
3
|
+
new_admin_product new_admin_product GET http://www.example.com/admin/products/new{-prefix|.|format}
|
4
|
+
{product_id} admin_product GET, PUT, DELETE http://www.example.com/admin/products/{product_id}{-prefix|.|format}
|
5
|
+
edit edit_admin_product GET http://www.example.com/admin/products/{product_id}/edit{-prefix|.|format}
|
6
|
+
described_routes described_routes GET, POST http://www.example.com/described_routes{-prefix|.|format}
|
7
|
+
new_described_route new_described_route GET http://www.example.com/described_routes/new{-prefix|.|format}
|
8
|
+
{route_name} described_route GET, PUT, DELETE http://www.example.com/described_routes/{route_name}{-prefix|.|format}
|
9
|
+
edit edit_described_route GET http://www.example.com/described_routes/{route_name}/edit{-prefix|.|format}
|
10
|
+
pages pages GET, POST http://www.example.com/pages{-prefix|.|format}
|
11
|
+
new_page new_page GET http://www.example.com/pages/new{-prefix|.|format}
|
12
|
+
{page_id} page GET, PUT, DELETE http://www.example.com/pages/{page_id}{-prefix|.|format}
|
13
|
+
edit edit_page GET http://www.example.com/pages/{page_id}/edit{-prefix|.|format}
|
14
|
+
summary summary_page GET http://www.example.com/pages/{page_id}/summary{-prefix|.|format}
|
15
|
+
toggle_visibility toggle_visibility_page POST http://www.example.com/pages/{page_id}/toggle_visibility{-prefix|.|format}
|
16
|
+
users users GET, POST http://www.example.com/users{-prefix|.|format}
|
17
|
+
new_user new_user GET http://www.example.com/users/new{-prefix|.|format}
|
18
|
+
{user_id} user GET, PUT, DELETE http://www.example.com/users/{user_id}{-prefix|.|format}
|
19
|
+
edit edit_user GET http://www.example.com/users/{user_id}/edit{-prefix|.|format}
|
20
|
+
articles user_articles GET, POST http://www.example.com/users/{user_id}/articles{-prefix|.|format}
|
21
|
+
new_user_article new_user_article GET http://www.example.com/users/{user_id}/articles/new{-prefix|.|format}
|
22
|
+
recent recent_user_articles GET http://www.example.com/users/{user_id}/articles/recent{-prefix|.|format}
|
23
|
+
{article_id} user_article GET, PUT, DELETE http://www.example.com/users/{user_id}/articles/{article_id}{-prefix|.|format}
|
24
|
+
edit edit_user_article GET http://www.example.com/users/{user_id}/articles/{article_id}/edit{-prefix|.|format}
|
25
|
+
profile user_profile GET, PUT, DELETE, POST http://www.example.com/users/{user_id}/profile{-prefix|.|format}
|
26
|
+
edit edit_user_profile GET http://www.example.com/users/{user_id}/profile/edit{-prefix|.|format}
|
27
|
+
new new_user_profile GET http://www.example.com/users/{user_id}/profile/new{-prefix|.|format}
|