RedmineRake » History » Version 6
Trevor Jones, 2013-04-23 21:01
1 | 3 | Etienne Massip | h1. Rake tasks |
---|---|---|---|
2 | 1 | Etienne Massip | |
3 | p{color:red}. WIP |
||
4 | |||
5 | {{>toc}} |
||
6 | |||
7 | Redmine defines a set of "Rake":http://rake.rubyforge.org tasks for use in maintenance operations. |
||
8 | |||
9 | 4 | Stanislav German-Evtushenko | h2. @rake redmine:attachments:prune@ |
10 | 1 | Etienne Massip | |
11 | 2 | Etienne Massip | Available in version version:2.3.0. |
12 | 1 | Etienne Massip | |
13 | When a user attaches a file to an issue, a wiki page, etc., the file is immediately uploaded and is attached later on after the form has been submitted. |
||
14 | |||
15 | This task removes uploaded files left unattached (meaning the form has never been submitted) after one day. |
||
16 | 5 | Trevor Jones | |
17 | h2. @rake about@ |
||
18 | |||
19 | List versions of all Rails frameworks and the environment |
||
20 | Available in versions version:2.3.0 |
||
21 | |||
22 | |||
23 | h2. @rake assets:clean@ |
||
24 | |||
25 | Remove compiled assets |
||
26 | Available in versions version:2.3.0 |
||
27 | |||
28 | |||
29 | h2. @rake assets:precompile@ |
||
30 | |||
31 | Compile all the assets named in config.assets.precompile |
||
32 | Available in versions version:2.3.0 |
||
33 | |||
34 | |||
35 | h2. @rake ci@ |
||
36 | |||
37 | Run the Continous Integration tests for Redmine |
||
38 | Available in versions version:2.3.0 |
||
39 | |||
40 | |||
41 | h2. @rake ci:build@ |
||
42 | |||
43 | Build Redmine |
||
44 | Available in versions version:2.3.0 |
||
45 | |||
46 | |||
47 | h2. @rake ci:setup@ |
||
48 | |||
49 | Setup Redmine for a new build |
||
50 | Available in versions version:2.3.0 |
||
51 | |||
52 | |||
53 | h2. @rake ci:teardown@ |
||
54 | |||
55 | Finish the build |
||
56 | Available in versions version:2.3.0 |
||
57 | |||
58 | |||
59 | h2. @rake config/database.yml@ |
||
60 | |||
61 | Creates database.yml for the CI server |
||
62 | Available in versions version:2.3.0 |
||
63 | |||
64 | |||
65 | h2. @rake config/initializers/secret_token.rb@ |
||
66 | |||
67 | Generates a secret token for the application. |
||
68 | Available in versions version:2.3.0 |
||
69 | |||
70 | |||
71 | h2. @rake db:create@ |
||
72 | |||
73 | Create the database from DATABASE_URL or config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config) |
||
74 | Available in versions version:2.3.0 |
||
75 | |||
76 | |||
77 | h2. @rake db:decrypt@ |
||
78 | |||
79 | Decrypts SCM and LDAP passwords in the database. |
||
80 | Available in versions version:2.3.0 |
||
81 | |||
82 | |||
83 | h2. @rake db:drop@ |
||
84 | |||
85 | Drops the database using DATABASE_URL or the current Rails.env (use db:drop:all to drop all databases) |
||
86 | Available in versions version:2.3.0 |
||
87 | |||
88 | |||
89 | h2. @rake db:encrypt@ |
||
90 | |||
91 | Encrypts SCM and LDAP passwords in the database. |
||
92 | Available in versions version:2.3.0 |
||
93 | |||
94 | |||
95 | h2. @rake db:fixtures:load@ |
||
96 | |||
97 | Load fixtures into the current environment's database. |
||
98 | Available in versions version:2.3.0 |
||
99 | |||
100 | |||
101 | h2. @rake db:migrate@ |
||
102 | |||
103 | Migrate the database (options: VERSION=x, VERBOSE=false). |
||
104 | Available in versions version:2.3.0 |
||
105 | |||
106 | |||
107 | h2. @rake db:migrate:status@ |
||
108 | |||
109 | Display status of migrations |
||
110 | Available in versions version:2.3.0 |
||
111 | |||
112 | |||
113 | h2. @rake db:rollback@ |
||
114 | |||
115 | Rolls the schema back to the previous version (specify steps w/ STEP=n). |
||
116 | Available in versions version:2.3.0 |
||
117 | |||
118 | |||
119 | h2. @rake db:schema:dump@ |
||
120 | |||
121 | Create a db/schema.rb file that can be portably used against any DB supported by AR |
||
122 | Available in versions version:2.3.0 |
||
123 | |||
124 | |||
125 | h2. @rake db:schema:load@ |
||
126 | |||
127 | Load a schema.rb file into the database |
||
128 | Available in versions version:2.3.0 |
||
129 | |||
130 | |||
131 | h2. @rake db:seed@ |
||
132 | |||
133 | Load the seed data from db/seeds.rb |
||
134 | Available in versions version:2.3.0 |
||
135 | |||
136 | |||
137 | h2. @rake db:setup@ |
||
138 | |||
139 | Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the db first) |
||
140 | Available in versions version:2.3.0 |
||
141 | |||
142 | |||
143 | h2. @rake db:structure:dump@ |
||
144 | |||
145 | Dump the database structure to db/structure.sql. Specify another file with DB_STRUCTURE=db/my_structure.sql |
||
146 | Available in versions version:2.3.0 |
||
147 | |||
148 | |||
149 | h2. @rake db:version@ |
||
150 | |||
151 | Retrieves the current schema version number |
||
152 | Available in versions version:2.3.0 |
||
153 | |||
154 | |||
155 | h2. @rake doc:app@ |
||
156 | |||
157 | Generate docs for the app -- also available doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/rdoc-template.rb, TITLE="Custom Title") |
||
158 | Available in versions version:2.3.0 |
||
159 | |||
160 | |||
161 | h2. @rake extract_fixtures@ |
||
162 | |||
163 | Create YAML test fixtures from data in an existing database. |
||
164 | Available in versions version:2.3.0 |
||
165 | |||
166 | |||
167 | h2. @rake generate_secret_token@ |
||
168 | |||
169 | Generates a secret token for the application. |
||
170 | Available in versions version:2.3.0 |
||
171 | |||
172 | |||
173 | h2. @rake locales@ |
||
174 | |||
175 | Updates and checks locales against en.yml |
||
176 | Available in versions version:2.3.0 |
||
177 | |||
178 | |||
179 | h2. @rake locales:add_key@ |
||
180 | |||
181 | Adds a new top-level translation string to all locale file (only works for childless keys, probably doesn't work on windows, doesn't check for duplicates). |
||
182 | Available in versions version:2.3.0 |
||
183 | |||
184 | |||
185 | h2. @rake locales:check_interpolation@ |
||
186 | |||
187 | Checks interpolation arguments in locals against en.yml |
||
188 | Available in versions version:2.3.0 |
||
189 | |||
190 | |||
191 | h2. @rake locales:check_parsing_by_psych@ |
||
192 | |||
193 | Check parsing yaml by psych library on Ruby 1.9. |
||
194 | Available in versions version:2.3.0 |
||
195 | |||
196 | |||
197 | h2. @rake locales:dup@ |
||
198 | |||
199 | Duplicates a key. |
||
200 | Available in versions version:2.3.0 |
||
201 | |||
202 | |||
203 | h2. @rake locales:remove_key@ |
||
204 | |||
205 | Removes a translation string from all locale file (only works for top-level childless non-multiline keys, probably doesn't work on windows). |
||
206 | Available in versions version:2.3.0 |
||
207 | |||
208 | |||
209 | h2. @rake locales:update@ |
||
210 | |||
211 | Updates language files based on en.yml content (only works for new top level keys). |
||
212 | Available in versions version:2.3.0 |
||
213 | |||
214 | |||
215 | h2. @rake log:clear@ |
||
216 | |||
217 | Truncates all *.log files in log/ to zero bytes |
||
218 | Available in versions version:2.3.0 |
||
219 | |||
220 | |||
221 | h2. @rake middleware@ |
||
222 | |||
223 | Prints out your Rack middleware stack |
||
224 | Available in versions version:2.3.0 |
||
225 | |||
226 | |||
227 | h2. @rake notes@ |
||
228 | |||
229 | Enumerate all annotations (use notes:optimize, :fixme, :todo for focus) |
||
230 | Available in versions version:2.3.0 |
||
231 | |||
232 | |||
233 | h2. @rake notes:custom@ |
||
234 | |||
235 | Enumerate a custom annotation, specify with ANNOTATION=CUSTOM |
||
236 | Available in versions version:2.3.0 |
||
237 | |||
238 | |||
239 | h2. @rake rails:template@ |
||
240 | |||
241 | Applies the template supplied by LOCATION=(/path/to/template) or URL |
||
242 | Available in versions version:2.3.0 |
||
243 | |||
244 | |||
245 | h2. @rake rails:update@ |
||
246 | |||
247 | Update configs and some other initially generated files (or use just update:configs, update:scripts, or update:application_controller) |
||
248 | Available in versions version:2.3.0 |
||
249 | |||
250 | |||
251 | h2. @rake redmine:attachments:move_to_subdirectories@ |
||
252 | |||
253 | Moves attachments stored at the root of the file directory (ie. |
||
254 | Available in versions version:2.3.0 |
||
255 | |||
256 | |||
257 | h2. @rake redmine:attachments:prune@ |
||
258 | |||
259 | Removes uploaded files left unattached after one day. |
||
260 | Available in versions version:2.3.0 |
||
261 | |||
262 | |||
263 | h2. @rake redmine:email:read@ |
||
264 | |||
265 | Read an email from standard input. |
||
266 | Available in versions version:2.3.0 |
||
267 | |||
268 | |||
269 | h2. @rake redmine:email:receive_imap@ |
||
270 | |||
271 | Read emails from an IMAP server. |
||
272 | Available in versions version:2.3.0 |
||
273 | |||
274 | |||
275 | h2. @rake redmine:email:receive_pop3@ |
||
276 | |||
277 | Read emails from an POP3 server. |
||
278 | Available in versions version:2.3.0 |
||
279 | |||
280 | |||
281 | h2. @rake redmine:email:test[login]@ |
||
282 | |||
283 | Send a test email to the user with the provided login name |
||
284 | Available in versions version:2.3.0 |
||
285 | |||
286 | |||
287 | h2. @rake redmine:fetch_changesets@ |
||
288 | |||
289 | Fetch changesets from the repositories |
||
290 | Available in versions version:2.3.0 |
||
291 | |||
292 | |||
293 | h2. @rake redmine:load_default_data@ |
||
294 | |||
295 | Load Redmine default configuration data. |
||
296 | Available in versions version:2.3.0 |
||
297 | |||
298 | |||
299 | h2. @rake redmine:migrate_from_mantis@ |
||
300 | |||
301 | Mantis migration script |
||
302 | Available in versions version:2.3.0 |
||
303 | |||
304 | |||
305 | h2. @rake redmine:migrate_from_trac@ |
||
306 | |||
307 | Trac migration script |
||
308 | Available in versions version:2.3.0 |
||
309 | |||
310 | |||
311 | h2. @rake redmine:permissions@ |
||
312 | |||
313 | List all permissions and the actions registered with them |
||
314 | Available in versions version:2.3.0 |
||
315 | |||
316 | |||
317 | h2. @rake redmine:plugins@ |
||
318 | |||
319 | Migrates and copies plugins assets. |
||
320 | Available in versions version:2.3.0 |
||
321 | |||
322 | |||
323 | h2. @rake redmine:plugins:assets@ |
||
324 | |||
325 | Copies plugins assets into the public directory. |
||
326 | Available in versions version:2.3.0 |
||
327 | |||
328 | |||
329 | h2. @rake redmine:plugins:migrate@ |
||
330 | |||
331 | Migrates installed plugins. |
||
332 | Available in versions version:2.3.0 |
||
333 | |||
334 | |||
335 | h2. @rake redmine:plugins:test@ |
||
336 | |||
337 | Runs the plugins tests. |
||
338 | Available in versions version:2.3.0 |
||
339 | |||
340 | |||
341 | h2. @rake redmine:plugins:test:functionals@ |
||
342 | |||
343 | Run tests for {:functionals=>"db:test:prepare"} |
||
344 | Available in versions version:2.3.0 |
||
345 | |||
346 | |||
347 | h2. @rake redmine:plugins:test:integration@ |
||
348 | |||
349 | Run tests for {:integration=>"db:test:prepare"} |
||
350 | Available in versions version:2.3.0 |
||
351 | |||
352 | |||
353 | h2. @rake redmine:plugins:test:units@ |
||
354 | |||
355 | Run tests for {:units=>"db:test:prepare"} |
||
356 | Available in versions version:2.3.0 |
||
357 | |||
358 | h2. @rake redmine:send_reminders@ |
||
359 | |||
360 | Send reminders about issues due in the next days. |
||
361 | 1 | Etienne Massip | Available in versions version:2.3.0 |
362 | 6 | Trevor Jones | See: [[RedmineReminderEmails]] |
363 | 5 | Trevor Jones | |
364 | h2. @rake redmine:tokens:prune@ |
||
365 | |||
366 | Removes expired tokens. |
||
367 | Available in versions version:2.3.0 |
||
368 | |||
369 | |||
370 | h2. @rake redmine:watchers:prune@ |
||
371 | |||
372 | Removes watchers from what they can no longer view. |
||
373 | Available in versions version:2.3.0 |
||
374 | |||
375 | |||
376 | h2. @rake routes@ |
||
377 | |||
378 | Print out all defined routes in match order, with names. |
||
379 | Available in versions version:2.3.0 |
||
380 | |||
381 | |||
382 | h2. @rake secret@ |
||
383 | |||
384 | Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions). |
||
385 | Available in versions version:2.3.0 |
||
386 | |||
387 | |||
388 | h2. @rake stats@ |
||
389 | |||
390 | Report code statistics (KLOCs, etc) from the application |
||
391 | Available in versions version:2.3.0 |
||
392 | |||
393 | |||
394 | h2. @rake test@ |
||
395 | |||
396 | Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins) |
||
397 | Available in versions version:2.3.0 |
||
398 | |||
399 | |||
400 | h2. @rake test:coverage@ |
||
401 | |||
402 | Measures test coverage |
||
403 | Available in versions version:2.3.0 |
||
404 | |||
405 | |||
406 | h2. @rake test:rdm_routing@ |
||
407 | |||
408 | Run tests for rdm_routing / Run the routing tests |
||
409 | Available in versions version:2.3.0 |
||
410 | |||
411 | |||
412 | h2. @rake test:recent@ |
||
413 | |||
414 | Run tests for {:recent=>"test:prepare"} / Test recent changes |
||
415 | Available in versions version:2.3.0 |
||
416 | |||
417 | |||
418 | h2. @rake test:scm@ |
||
419 | |||
420 | Run unit and functional scm tests |
||
421 | Available in versions version:2.3.0 |
||
422 | |||
423 | |||
424 | h2. @rake test:scm:functionals@ |
||
425 | |||
426 | Run tests for {:functionals=>"db:test:prepare"} / Run the scm functional tests |
||
427 | Available in versions version:2.3.0 |
||
428 | |||
429 | |||
430 | h2. @rake test:scm:setup:all@ |
||
431 | |||
432 | Creates all test repositories |
||
433 | Available in versions version:2.3.0 |
||
434 | |||
435 | |||
436 | h2. @rake test:scm:setup:bazaar@ |
||
437 | |||
438 | Creates a test bazaar repository |
||
439 | Available in versions version:2.3.0 |
||
440 | |||
441 | |||
442 | h2. @rake test:scm:setup:create_dir@ |
||
443 | |||
444 | Creates directory for test repositories |
||
445 | Available in versions version:2.3.0 |
||
446 | |||
447 | |||
448 | h2. @rake test:scm:setup:cvs@ |
||
449 | |||
450 | Creates a test cvs repository |
||
451 | Available in versions version:2.3.0 |
||
452 | |||
453 | |||
454 | h2. @rake test:scm:setup:darcs@ |
||
455 | |||
456 | Creates a test darcs repository |
||
457 | Available in versions version:2.3.0 |
||
458 | |||
459 | |||
460 | h2. @rake test:scm:setup:filesystem@ |
||
461 | |||
462 | Creates a test filesystem repository |
||
463 | Available in versions version:2.3.0 |
||
464 | |||
465 | |||
466 | h2. @rake test:scm:setup:git@ |
||
467 | |||
468 | Creates a test git repository |
||
469 | Available in versions version:2.3.0 |
||
470 | |||
471 | |||
472 | h2. @rake test:scm:setup:mercurial@ |
||
473 | |||
474 | Creates a test mercurial repository |
||
475 | Available in versions version:2.3.0 |
||
476 | |||
477 | |||
478 | h2. @rake test:scm:setup:subversion@ |
||
479 | |||
480 | Creates a test subversion repository |
||
481 | Available in versions version:2.3.0 |
||
482 | |||
483 | |||
484 | h2. @rake test:scm:units@ |
||
485 | |||
486 | Run tests for {:units=>"db:test:prepare"} / Run the scm unit tests |
||
487 | Available in versions version:2.3.0 |
||
488 | |||
489 | |||
490 | h2. @rake test:scm:update@ |
||
491 | |||
492 | Updates installed test repositories |
||
493 | Available in versions version:2.3.0 |
||
494 | |||
495 | |||
496 | h2. @rake test:single@ |
||
497 | |||
498 | Run tests for {:single=>"test:prepare"} |
||
499 | Available in versions version:2.3.0 |
||
500 | |||
501 | |||
502 | h2. @rake test:ui@ |
||
503 | |||
504 | Run tests for {:ui=>"db:test:prepare"} / Run the UI tests with Capybara (PhantomJS listening on port 4444 is required) |
||
505 | Available in versions version:2.3.0 |
||
506 | |||
507 | |||
508 | h2. @rake test:uncommitted@ |
||
509 | |||
510 | Run tests for {:uncommitted=>"test:prepare"} / Test changes since last checkin (only Subversion and Git) |
||
511 | Available in versions version:2.3.0 |
||
512 | |||
513 | h2. @rake time:zones:all@ |
||
514 | |||
515 | Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6 |
||
516 | Available in versions version:2.3.0 |
||
517 | |||
518 | |||
519 | h2. @rake tmp:clear@ |
||
520 | |||
521 | Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear) |
||
522 | Available in versions version:2.3.0 |
||
523 | |||
524 | |||
525 | h2. @rake tmp:create@ |
||
526 | |||
527 | Creates tmp directories for sessions, cache, sockets, and pids |
||
528 | Available in versions version:2.3.0 |