On Sun, Dec 18, 2005 at 09:41:39PM +0100, Steve Ross
wrote:> Watching the test results scroll by, it occurred to me that there must
> be an easier way than either letting it go or capturing it to a log file
> to mess with in TextMate.
>
> Here''s my first stab at an HTMLifier for test output. Just
download,
> unzip, chmod +x, and you can:
>
> rake | ./prake.rb
>
> Which, if you are on a Mac, should bring up a Safari window with a
> summary of the problems at the top linked to the details below.
>
> Download from my humble website:
>
> http://www.calicowebdev.com
>
> Comments appreciated.
Here are a few comments:
If you find yourself using backslashes within double quoted strings to escape
embedded double quotes, replace the surrounding double quotes with %()
delimiters.
"<a href=\"example.org\">example</a>"
%(<a href="example.org">example</a>)
You a number of different characters other than () as the delimiter if you
wish.
START_BROWSER_COMMAND = "open /Applications/Safari.app %s"
The open command takes a ''-a'' option which allows you to
specify which
application to use. So the above constant could be ''open -a Safari
%s''.
if l.rstrip.length == 0
This can be more directly expressed as ''l.rstrip.empty?''.
You can bind this functionality to some key combo in textmate and have it
open up its own window (in other words, skipping the Safari step).
More info here:
http://macromates.com/blog/archives/2005/09/28/html-output-for-commands/
I''d give a bit of padding in the boxes that hold the test results.
Thanks for sharing!
marcel
--
Marcel Molina Jr. <marcel-WRrfy3IlpWYdnm+yROfE0A@public.gmane.org>