On 25/09/2005, at 2:28 AM, Manuel Holtgrewe wrote:
> Does anyone of you have an idea of how to tweak the "stats" task
in
> project''s Rakefile to include correct statistics about components?
>
> In its current state, it only displays contents of "/components/"
> as source code but that directory could also contain tests.
>
Have you tried to modify the rake task? It''s a fairly straight-
forward method.
Here''s a simple modification:
task :component_stats => [ :environment ] do
dirs = []
Dir["components/*"].each do |f|
dirs << [f, f] if File.directory?(f)
end
require ''code_statistics''
CodeStatistics.new(*dirs).to_s
end
-- tim lucas