diff options
author | Jamis Buck <jamis@37signals.com> | 2005-09-05 15:39:20 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-09-05 15:39:20 +0000 |
commit | b70e2db64af856b46571c66877762837a0f3a95a (patch) | |
tree | 6f96009e39b0cf482dfc4d57a98fbf2bd27819da /railties/lib/tasks | |
parent | 9eef247339c1cc08de7be3d9f7ac9048cb62adcc (diff) | |
download | rails-b70e2db64af856b46571c66877762837a0f3a95a.tar.gz rails-b70e2db64af856b46571c66877762837a0f3a95a.tar.bz2 rails-b70e2db64af856b46571c66877762837a0f3a95a.zip |
Make the default stats task extendable by modifying the STATS_DIRECTORIES constant
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2135 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r-- | railties/lib/tasks/statistics.rake | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/railties/lib/tasks/statistics.rake b/railties/lib/tasks/statistics.rake index 66b654725b..fccb71b311 100644 --- a/railties/lib/tasks/statistics.rake +++ b/railties/lib/tasks/statistics.rake @@ -1,13 +1,15 @@ +STATS_DIRECTORIES = [ + %w(Helpers app/helpers), + %w(Controllers app/controllers), + %w(APIs app/apis), + %w(Components components), + %w(Functionals test/functional), + %w(Models app/models), + %w(Units test/unit) +] + desc "Report code statistics (KLOCs, etc) from the application" task :stats do require 'code_statistics' - CodeStatistics.new( - ["Helpers", "app/helpers"], - ["Controllers", "app/controllers"], - ["APIs", "app/apis"], - ["Components", "components"], - ["Functionals", "test/functional"], - ["Models", "app/models"], - ["Units", "test/unit"] - ).to_s + CodeStatistics.new(*STATS_DIRECTORIES).to_s end |