1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Jamis Buck 2005-09-05 15:39:20 +00:00
parent 9eef247339
commit b70e2db64a
2 changed files with 13 additions and 9 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Make the default stats task extendable by modifying the STATS_DIRECTORIES constant
* Allow the selected environment to define RAILS_DEFAULT_LOGGER, and have Rails::Initializer use it if it exists.
* Moved all the shared tasks from Rakefile into Rails, so that the Rakefile is empty and doesn't require updating.

View file

@ -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