aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/code_statistics.rb2
-rw-r--r--railties/lib/tasks/statistics.rake11
3 files changed, 9 insertions, 6 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 801c7bb98e..6e029db550 100644
--- a/railties/CHANGELOG
+++ b/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]
diff --git a/railties/lib/code_statistics.rb b/railties/lib/code_statistics.rb
index e99d876e44..740d8a1767 100644
--- a/railties/lib/code_statistics.rb
+++ b/railties/lib/code_statistics.rb
@@ -83,7 +83,7 @@ class CodeStatistics #:nodoc:
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
diff --git a/railties/lib/tasks/statistics.rake b/railties/lib/tasks/statistics.rake
index 87b89e5198..dbd0773194 100644
--- a/railties/lib/tasks/statistics.rake
+++ b/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"