Browse files

Merge Statistics cleanup to release branch

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2227a17 commit 746cfb3ded90493888e5ff4f6957606dc158c2d8 @NZKoz NZKoz committed Oct 27, 2006
Showing with 9 additions and 6 deletions.
  1. +2 −0 railties/CHANGELOG
  2. +1 −1 railties/lib/code_statistics.rb
  3. +6 −5 railties/lib/tasks/statistics.rake
View
2 railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Clean up the output of rake stats, de-emphasise components and apis, and remove the indents for tests [Koz]
+
* Added option to script/process/spawner of specifying the binding address #5133 [zsombor]
* Update environment.rb comments to include config.autoload_paths. Closes #6478 [caio]
View
2 railties/lib/code_statistics.rb
@@ -83,7 +83,7 @@ def print_line(name, statistics)
loc_over_m = (statistics["codelines"] / statistics["methods"]) - 2 rescue loc_over_m = 0
start = if TEST_TYPES.include? name
- "| #{name.ljust(18)} "
+ "| #{name.ljust(20)} "
else
"| #{name.ljust(20)} "
end
View
11 railties/lib/tasks/statistics.rake
@@ -1,13 +1,14 @@
STATS_DIRECTORIES = [
+ %w(Controllers app/controllers),
%w(Helpers app/helpers),
- %w(Controllers app/controllers),
+ %w(Models app/models),
+ %w(Libraries lib/),
%w(APIs app/apis),
%w(Components components),
+ %w(Integration\ tests test/integration),
%w(Functional\ tests test/functional),
- %w(Models app/models),
- %w(Unit\ tests test/unit),
- %w(Libraries lib/),
- %w(Integration\ tests test/integration)
+ %w(Unit\ tests test/unit)
+
].collect { |name, dir| [ name, "#{RAILS_ROOT}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
desc "Report code statistics (KLOCs, etc) from the application"

0 comments on commit 746cfb3

Please sign in to comment.