1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/tasks/statistics.rake
David Heinemeier Hansson 0f8a3a31a7 Only include dirs that exists in the stats
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-13 18:43:23 +00:00

15 lines
502 B
Ruby

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)
].collect { |name, dir| [ name, "#{RAILS_ROOT}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
desc "Report code statistics (KLOCs, etc) from the application"
task :stats do
require 'code_statistics'
CodeStatistics.new(*STATS_DIRECTORIES).to_s
end