Forum: Ruby on Rails Script to count lines of code in Rails app?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F2d3287043f963f539d90d5d1ed25c5b?d=identicon&s=25 Chris Jennings (cpher)
on 2006-03-09 22:17
I'm in the process of porting an ASP.NET project over to RoR and I'd
like to create some basic metrics with which to demonstrate to managers
how RoR is easier to maintain than an equivalent ASP.NET app.

So, I was thinking of counting lines of code (separated by models,
views, controllers) and outputting to a text file. Has anyone already
done this, and if so, would you be willing to share your script?

Are there any other metrics you've used when pitching your prototypes to
managers? I'm thinking of more than simply tracking time spent
developing. Performance benchmarks aren't as helpful to me because my
prototype is running on Webrick.

Thanks in advance!
-Chris
8c7a98649cdbbdf39eeed17ca9bdbbd3?d=identicon&s=25 Josh Charles (Guest)
on 2006-03-09 22:28
(Received via mailing list)
rake stats

type that in at the command line in the root directory of your
applications.

Josh
F639e0cdf2fa098b535d6ec766b2aee1?d=identicon&s=25 Szymon Nowak (g0nzo)
on 2006-03-09 22:30
> So, I was thinking of counting lines of code (separated by models,
> views, controllers)

Sorry if this is obvious for you, but have you tried 'rake stats'?
F2d3287043f963f539d90d5d1ed25c5b?d=identicon&s=25 Chris Jennings (cpher)
on 2006-03-10 00:05
szymek  wrote:
>> So, I was thinking of counting lines of code (separated by models,
>> views, controllers)
>
> Sorry if this is obvious for you, but have you tried 'rake stats'?

Well, now I feel like a dork. That's exactly what I was looking for. My
experience with rake is limited to uploading fixtures, so I had no idea
to even look there. Thanks!
I heart rails.
This topic is locked and can not be replied to.