mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
e808315725
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5369 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
18 lines
625 B
Ruby
18 lines
625 B
Ruby
STATS_DIRECTORIES = [
|
|
%w(Controllers app/controllers),
|
|
%w(Helpers app/helpers),
|
|
%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(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"
|
|
task :stats do
|
|
require 'code_statistics'
|
|
CodeStatistics.new(*STATS_DIRECTORIES).to_s
|
|
end
|