Maybe it's one of those code 18,
but when I run rake -T on my Rakefile, the long descriptions of my tasks are always cut. Is there any way to display the full description without having to make the desc shorter?
Thanks
Rake is a software task management and build automation tool created by Jim Weirich. It allows the user to specify tasks and describe dependencies as well as to group tasks in a namespace. It is similar in to SCons and Make.
Rake is a popular task runner for Ruby and Rails applications. For example, Rails provides the predefined Rake tasks for creating databases, running migrations, and performing tests. You can also create custom tasks to automate specific actions - run code analysis tools, backup databases, and so on.
Go to Websites & Domains and click Ruby. After gems installation you can try to run a Rake task by clicking Run rake task. In the opened dialog, you can provide some parameters and click OK - this will be equivalent to running the rake utility with the specified parameters in the command line.
The format is slightly different (description starts on the next line instead of as a comment on the current line), but this will give you the full descriptions:
rake -D
Also, if you really want the other format, you can pipe the output to cat
instead:
rake -T | cat
-D, --describe [PATTERN] Describe the tasks (matching optional PATTERN), then exit.
rake -D
Three solutions:
1) You may define your own '-T'
task :longT do
app = Rake.application
app.tasks.each{|task|
puts "%-20s # %s" % [task.name, task.comment] if task.comment
}
end
2) fool, there is no tty:
Rake.application.tty_output= false
3) Modify a rake command
module Rake
class Application
def truncate_output?
#tty_output? || ENV['RAKE_COLUMNS']
false
end
end
end
I would recommend version 2)
(Tested with rake-0.8.7)
There's an environment variable you can set:
export RAKE_COLUMNS=200
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With