Module: Rake::Multilogs
- Defined in:
- lib/rake/multilogs.rb,
lib/rake/multilogs/fork.rb,
lib/rake/multilogs/task.rb,
lib/rake/multilogs/forks.rb,
lib/rake/multilogs/version.rb
Overview
Rake::Multilogs
groups multitask output by task, displaying it when all tasks have completed, rather than the default behavior of displaying output immediately (which means that output from different tasks becomes confusingly interleaved).
This requires Process.fork
, so is not supported on JRuby or Windows.
Defined Under Namespace
Modules: Task
Constant Summary collapse
- VERSION =
Current version of the rake-multilogs gem.
"0.3.0"
Class Method Summary collapse
-
.after_fork(&block) ⇒ void
Register a block to be called before executing a task.
-
.before_fork(&block) ⇒ void
Register a block to be called from the multitask before running its prerequisites.
Class Method Details
.after_fork(&block) ⇒ void
This method returns an undefined value.
Register a block to be called before executing a task. This is called from the child processes after forking, and from the parent process after the prerequisites have completed and the child processes have exited. In each case it will receive the task that is about to execute as a parameter.
46 47 48 |
# File 'lib/rake/multilogs.rb', line 46 def after_fork(&block) @after_fork = block end |
.before_fork(&block) ⇒ void
This method returns an undefined value.
Register a block to be called from the multitask before running its prerequisites. This is called from the parent process before forking, and will receive the multitask as a parameter.
29 30 31 |
# File 'lib/rake/multilogs.rb', line 29 def before_fork(&block) @before_fork = block end |