-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mauricio Fernandez wrote:
> On Tue, Sep 05, 2006 at 03:00:07AM +0900, Suraj N. Kurapati wrote:
>> RCOV_ARGV = ['--html', '--no-color', '--save', 'coverage.html']
>> require 'rcov/runner'
> 
> What about something like this?
> 
> require 'rcov/runner'
> # if nothing else is done, it generates a plain text report, no HTML
> 
> # Rcov::Runner.generate formatter [, options]  is used to specify which
> # reports are to be generated. The possible options will be explained in the
> # RDoc documentation.
> Rcov::Runner.generate Rcov::HTMLCoverage, :color => false
> Rcov::Runner.generate Rcov::TextCoverageDiff, :coverage_diff_mode => :record,
>                       :coverage_diff_file => "coverage.data"

This is good. Please proceed with this approach.

> Passing options with an ARGV feels clunky to me (I never liked that part of
> RDoc's API).

Good point. I thought that maybe it would reduce the amount of work
for you by reusing the existing ARGV handling code. Nevertheless, as
you've shown, it is cleaner to use the Rcov API directly.

>>> Dumping a textual report like the above one seems to make sense as it is akin
>>> to Test::Unit's output.
>> This is sufficient, but I would like to see the more detailed HTML
>> report as well, so I can know where coverage needs improvement.
> 
> I think I'll either move xx (currently embedded in bin/rcov) to a separate
> file or rewrite the XHTML generation code using erb (since everybody's got
> it). XHTML reports could then be created as shown above.

As long as the interaction with xx is contained within 'rcov/runner'
there shouldn't be any problem from the user's perspective.

I'm looking forward to the next release. :-)

Thanks for your support.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFE/Mb4mV9O7RYnKMcRAq7sAKC0ZQ48VyyvWcrKdAc5+NbWLE3I4QCdE5yT
vBvTIFi/8fJhdmUG9/EFBZE=
=RhG2
-----END PGP SIGNATURE-----