Class | Rake::Application |
In: |
lib/rake.rb
|
Parent: | Object |
Rake main application object. When invoking rake from the command line, a Rake::Application object is created and run.
DEFAULT_RAKEFILES | = | ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb'].freeze |
OPTIONS | = | [ # :nodoc: ['--classic-namespace', '-C', GetoptLong::NO_ARGUMENT, "Put Task and FileTask in the top level namespace"], ['--describe', '-D', GetoptLong::OPTIONAL_ARGUMENT, "Describe the tasks (matching optional PATTERN), then exit."], ['--rakefile', '-f', GetoptLong::OPTIONAL_ARGUMENT, "Use FILE as the rakefile."], ['--help', '-h', '-H', GetoptLong::NO_ARGUMENT, "Display this help message."], ['--libdir', '-I', GetoptLong::REQUIRED_ARGUMENT, "Include LIBDIR in the search path for required modules."], ['--dry-run', '-n', GetoptLong::NO_ARGUMENT, "Do a dry run without executing actions."], ['--nosearch', '-N', GetoptLong::NO_ARGUMENT, "Do not search parent directories for the Rakefile."], ['--prereqs', '-P', GetoptLong::NO_ARGUMENT, "Display the tasks and dependencies, then exit."], ['--quiet', '-q', GetoptLong::NO_ARGUMENT, "Do not log messages to standard output."], ['--require', '-r', GetoptLong::REQUIRED_ARGUMENT, "Require MODULE before executing rakefile."], ['--rakelibdir', '-R', GetoptLong::REQUIRED_ARGUMENT, "Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')"], ['--silent', '-s', GetoptLong::NO_ARGUMENT, "Like --quiet, but also suppresses the 'in directory' announcement."], ['--tasks', '-T', GetoptLong::OPTIONAL_ARGUMENT, "Display the tasks (matching optional PATTERN) with descriptions, then exit."], ['--trace', '-t', GetoptLong::NO_ARGUMENT, "Turn on invoke/execute tracing, enable full backtrace."], ['--verbose', '-v', GetoptLong::NO_ARGUMENT, "Log message to standard output (default)."], ['--version', '-V', GetoptLong::NO_ARGUMENT, "Display the program version."], ] |
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. |
top_level_tasks | [R] | List of the top level task names (task names from the command line). |
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.
True if one of the files in RAKEFILES is in the current directory. If a match is found, it is copied into @rakefile.
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. The define any tasks. Finally, call top_level to run your top level tasks.