RedmineRake » History » Version 7

Version 6 (Trevor Jones, 2013-04-23 21:01) → Version 7/13 (Etienne Massip, 2013-04-24 09:47)

h1. Rake tasks

p{color:red}. WIP

{{>toc}}

Redmine defines a set of "Rake":http://rake.rubyforge.org tasks for use in maintenance operations.

Information about tasks defined by the Ruby on Rails framework are accessible on "the dedicated page":http://guides.rubyonrails.org/command_line.html#rake.

h2. Batch job tasks

h3.
@rake redmine:attachments:prune@

Available in version version:2.3.0.

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.

This task removes uploaded files left unattached (meaning the form has never been submitted) after one day.

h3. h2. @rake redmine:email:read@ about@

Read an email from standard input. List versions of all Rails frameworks and the environment
Available in versions version:2.3.0

h2. @rake assets:clean@


h3. Remove compiled assets
Available in versions version:2.3.0

h2.
@rake redmine:email:receive_imap@ assets:precompile@

Read emails from an IMAP server. Compile all the assets named in config.assets.precompile
Available in versions version:2.3.0

h2. @rake ci@


h3. Run the Continous Integration tests for Redmine
Available in versions version:2.3.0

h2.
@rake redmine:email:receive_pop3@ ci:build@

Read emails from an POP3 server. Build Redmine
Available in versions version:2.3.0

h2. @rake ci:setup@


h3. Setup Redmine for a new build
Available in versions version:2.3.0

h2.
@rake redmine:fetch_changesets@ ci:teardown@

Fetch changesets Finish the build
Available in versions version:2.3.0

h2. @rake config/database.yml@

Creates database.yml for the CI server
Available in versions version:2.3.0

h2. @rake config/initializers/secret_token.rb@

Generates a secret token for the application.
Available in versions version:2.3.0

h2. @rake db:create@

Create the database
from DATABASE_URL or config/database.yml for the repositories current Rails.env (use db:create:all to create all dbs in the config)
Available in versions version:2.3.0

h2. @rake db:decrypt@


h3. Decrypts SCM and LDAP passwords in the database.
Available in versions version:2.3.0

h2.
@rake redmine:send_reminders@ db:drop@

Send reminders about issues due Drops the database using DATABASE_URL or the current Rails.env (use db:drop:all to drop all databases)
Available
in versions version:2.3.0

h2. @rake db:encrypt@

Encrypts SCM and LDAP passwords in
the next days. database.
See: [[RedmineReminderEmails]] Available in versions version:2.3.0

h2. @rake db:fixtures:load@


h3. Load fixtures into the current environment's database.
Available in versions version:2.3.0

h2.
@rake redmine:tokens:prune@ db:migrate@

Removes expired tokens. Migrate the database (options: VERSION=x, VERBOSE=false).
Available in versions version:2.3.0

h2. @rake db:migrate:status@


h3. Display status of migrations
Available in versions version:2.3.0

h2.
@rake redmine:watchers:prune@ db:rollback@

Removes watchers from what they Rolls the schema back to the previous version (specify steps w/ STEP=n).
Available in versions version:2.3.0

h2. @rake db:schema:dump@

Create a db/schema.rb file that
can no longer view. be portably used against any DB supported by AR
Available in versions version:2.3.0

h2. @rake db:schema:load@


Load a schema.rb file into the database
Available in versions version:2.3.0

h2. Other maintenance tasks @rake db:seed@

h3. Load the seed data from db/seeds.rb
Available in versions version:2.3.0

h2.
@rake generate_secret_tokenb@ db:setup@

Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the db first)
Available in versions version:2.3.0

h2. @rake db:structure:dump@

Dump the database structure to db/structure.sql. Specify another file with DB_STRUCTURE=db/my_structure.sql
Available in versions version:2.3.0

h2. @rake db:version@

Retrieves the current schema version number
Available in versions version:2.3.0

h2. @rake doc:app@

Generate docs for the app -- also available doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/rdoc-template.rb, TITLE="Custom Title")
Available in versions version:2.3.0

h2. @rake extract_fixtures@

Create YAML test fixtures from data in an existing database.
Available in versions version:2.3.0

h2. @rake generate_secret_token@

Generates a secret token for the application.
Available in versions version:2.3.0

h2. @rake locales@


h3. @rake db:encrypt@ Updates and checks locales against en.yml
Available in versions version:2.3.0

h2.
@rake db:decrypt@ locales:add_key@

Encrypts 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).
Available in versions version:2.3.0

h2. @rake locales:check_interpolation@

Checks interpolation arguments in locals against en.yml
Available in versions version:2.3.0

h2. @rake locales:check_parsing_by_psych@

Check parsing yaml by psych library on Ruby 1.9.
Available in versions version:2.3.0

h2. @rake locales:dup@

Duplicates a key.
Available in versions version:2.3.0

h2. @rake locales:remove_key@

Removes a translation string from all locale file (only works for top-level childless non-multiline keys, probably doesn't work on windows).
Available in versions version:2.3.0

h2. @rake locales:update@

Updates language files based on en.yml content (only works for new top level keys).
Available in versions version:2.3.0

h2. @rake log:clear@

Truncates all *.log files in log/ to zero bytes
Available in versions version:2.3.0

h2. @rake middleware@

Prints out your Rack middleware stack
Available in versions version:2.3.0

h2. @rake notes@

Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)
Available in versions version:2.3.0

h2. @rake notes:custom@

Enumerate a custom annotation, specify with ANNOTATION=CUSTOM
Available in versions version:2.3.0

h2. @rake rails:template@

Applies the template supplied by LOCATION=(/path/to/template)
or decrypts SCM URL
Available in versions version:2.3.0

h2. @rake rails:update@

Update configs
and LDAP passwords stored some other initially generated files (or use just update:configs, update:scripts, or update:application_controller)
Available
in the database.

h3.
versions version:2.3.0

h2.
@rake redmine:attachments:move_to_subdirectories@

Moves attachments stored at the root of the file directory (ie.
Available in versions version:2.3.0

h2. @rake redmine:attachments:prune@


h3. Removes uploaded files left unattached after one day.
Available in versions version:2.3.0

h2.
@rake redmine:email:read@

Read an email from standard input.
Available in versions version:2.3.0

h2. @rake redmine:email:receive_imap@

Read emails from an IMAP server.
Available in versions version:2.3.0

h2. @rake redmine:email:receive_pop3@

Read emails from an POP3 server.
Available in versions version:2.3.0

h2. @rake
redmine:email:test[login]@

Send a test email to the user with the provided login name
Available in versions version:2.3.0

h2. @rake redmine:fetch_changesets@


h3. Fetch changesets from the repositories
Available in versions version:2.3.0

h2.
@rake redmine:load_default_data@

Load Redmine default configuration data.
Available in versions version:2.3.0

h2. @rake redmine:migrate_from_mantis@

Mantis migration script
Available in versions version:2.3.0

h2. @rake redmine:migrate_from_trac@

Trac migration script
Available in versions version:2.3.0

h2. @rake
redmine:permissions@

List all permissions and the actions registered with them

h3.

Available in versions version:2.3.0

h2.
@rake redmine:plugins@

Migrates and copies plugins assets.

h3.

Available in versions version:2.3.0

h2.
@rake redmine:plugins:assets@

Copies plugins assets into the public directory.

h3.

Available in versions version:2.3.0

h2.
@rake redmine:plugins:migrate@

Migrates installed plugins.
Available in versions version:2.3.0

h2. @rake redmine:plugins:test@


Runs the plugins tests.
Available in versions version:2.3.0

h2. Migrating @rake redmine:plugins:test:functionals@

Run tests for {:functionals=>"db:test:prepare"}
Available in versions version:2.3.0

h2. @rake redmine:plugins:test:integration@

Run tests for {:integration=>"db:test:prepare"}
Available in versions version:2.3.0

h2. @rake redmine:plugins:test:units@

Run tests for {:units=>"db:test:prepare"}
Available in versions version:2.3.0

h2. @rake redmine:send_reminders@

Send reminders about issues due in the next days.
Available in versions version:2.3.0
See: [[RedmineReminderEmails]]

h2. @rake redmine:tokens:prune@

Removes expired tokens.
Available in versions version:2.3.0

h2. @rake redmine:watchers:prune@

Removes watchers
from another BTS what they can no longer view.
Available in versions version:2.3.0

h2. @rake routes@


h3. Print out all defined routes in match order, with names.
Available in versions version:2.3.0

h2.
@rake redmine:migrate_from_mantis@ secret@

Mantis migration script Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions).
Available in versions version:2.3.0

h2. @rake stats@


h3. Report code statistics (KLOCs, etc) from the application
Available in versions version:2.3.0

h2.
@rake redmine:migrate_from_trac@ test@

Trac migration script Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)
Available in versions version:2.3.0

h2. @rake test:coverage@


Measures test coverage
Available in versions version:2.3.0

h2. @rake test:rdm_routing@

Run tests for rdm_routing / Run the routing tests
Available in versions version:2.3.0

h2. @rake test:recent@

Run tests for {:recent=>"test:prepare"} / Test recent changes
Available in versions version:2.3.0

h2. @rake test:scm@

Run unit and functional scm tests
Available in versions version:2.3.0

h2. @rake test:scm:functionals@

Run tests for {:functionals=>"db:test:prepare"} / Run the scm functional tests
Available in versions version:2.3.0

h2. @rake test:scm:setup:all@

Creates all test repositories
Available in versions version:2.3.0

h2. @rake test:scm:setup:bazaar@

Creates a test bazaar repository
Available in versions version:2.3.0

h2. @rake test:scm:setup:create_dir@

Creates directory for test repositories
Available in versions version:2.3.0

h2. @rake test:scm:setup:cvs@

Creates a test cvs repository
Available in versions version:2.3.0

h2. @rake test:scm:setup:darcs@

Creates a test darcs repository
Available in versions version:2.3.0

h2. @rake test:scm:setup:filesystem@

Creates a test filesystem repository
Available in versions version:2.3.0

h2. @rake test:scm:setup:git@

Creates a test git repository
Available in versions version:2.3.0

h2. @rake test:scm:setup:mercurial@

Creates a test mercurial repository
Available in versions version:2.3.0

h2. @rake test:scm:setup:subversion@

Creates a test subversion repository
Available in versions version:2.3.0

h2. @rake test:scm:units@

Run tests for {:units=>"db:test:prepare"} / Run the scm unit tests
Available in versions version:2.3.0

h2. @rake test:scm:update@

Updates installed test repositories
Available in versions version:2.3.0

h2. @rake test:single@

Run tests for {:single=>"test:prepare"}
Available in versions version:2.3.0

h2. @rake test:ui@

Run tests for {:ui=>"db:test:prepare"} / Run the UI tests with Capybara (PhantomJS listening on port 4444 is required)
Available in versions version:2.3.0

h2. @rake test:uncommitted@

Run tests for {:uncommitted=>"test:prepare"} / Test changes since last checkin (only Subversion and Git)
Available in versions version:2.3.0

h2. @rake time:zones:all@

Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6
Available in versions version:2.3.0

h2. @rake tmp:clear@

Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)
Available in versions version:2.3.0

h2. @rake tmp:create@

Creates tmp directories for sessions, cache, sockets, and pids
Available in versions version:2.3.0