Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Seperate CodeStatistics Rendering from Calculation

#6278

CodeStatistics is wonky. It's to_s actually just fires a bunch of puts, and there's no good way to get at the data if you want to present it differently. This patch separates CodeStatistics from the printing. I needed this to render a code stats in a web page for https://github.com/dhh/conductor, so I've merged this back in.

Also, this should make it easier to test #2299 Improve class counts for 'rake stats' and the spec bit in #4164 Add rake task to compute statistics in rails.

Includes patch and test.

Reported by Joseph Holsten · January 11th, 2011 @ 03:59 PM

State: new
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Dan Pickett
    Dan Pickett

    I dig the approach, and it applies cleanly to edge.

    But, isn't the correlating test a bit brittle in the sense that any changes to the test application will cause your test to fail? I'm not sure I can suggest a better alternative, but I can see this as a potential annoyance when making significant changes to railties.

    March 12th, 2011 @ 04:11 PM