Class Rake::Application
In: lib/rake/application.rb
Parent: Object

Rake main application object. When invoking rake from the command line, a Rake::Application object is created and run.

Methods

Included Modules

TaskManager TraceOutput

Constants

DEFAULT_RAKEFILES = ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb'].freeze

Attributes

name  [R]  The name of the application (typically ‘rake’)
original_dir  [R]  The original directory where rake was invoked.
rakefile  [R]  Name of the actual rakefile used.
terminal_columns  [RW]  Number of columns on the terminal
top_level_tasks  [R]  List of the top level task names (task names from the command line).

Public Class methods

Initialize a Rake::Application object.

Public Instance methods

Add a file to the list of files to be imported.

Add a loader to handle imported files ending in the extension ext.

Collect the list of tasks on the command line. If no tasks are given, return a list containing only the default task. Environmental assignments are processed at this time as well.

Warn about deprecated usage.

Example:

   Rake.application.deprecate("import", "Rake.import", caller.first)

Display the error message that caused the exception.

Display the tasks and prerequisites

Display the tasks and comments.

Calculate the dynamic width of the

Read and handle the command line options.

True if one of the files in RAKEFILES is in the current directory. If a match is found, it is copied into @rakefile.

Initialize the command line parameters and app name.

private —————————————————————-

Load the pending list of imported files.

Find the rakefile and then load it and any pending imports.

Application options from the command line

Similar to the regular Ruby require command, but will check for *.rake files in addition to *.rb files.

Run the Rake application. The run method performs the following three steps:

If you wish to build a custom rake command, you should call init on your application. Then define any tasks. Finally, call top_level to run your top level tasks.

Run the given block with the thread startup and shutdown.

Provide standard exception handling for the given block.

A list of all the standard options used in rake, suitable for passing to OptionParser.

The directory path containing the system wide rakefiles.

Run the top level tasks of a Rake application.

We will truncate output if we are outputting to a TTY or if we‘ve been given an explicit column width to honor

Override the detected TTY output state (mostly for testing)

True if we are outputting to TTY, false otherwise

[Validate]