~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/railties/lib/tasks/statistics.rake

  • Committer: Richard Lee (Canonical)
  • Date: 2010-10-15 15:17:58 UTC
  • mfrom: (190.1.3 use-case-mapper)
  • Revision ID: richard.lee@canonical.com-20101015151758-wcvmfxrexsongf9d
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
STATS_DIRECTORIES = [
2
 
  %w(Controllers        app/controllers),
3
 
  %w(Helpers            app/helpers), 
4
 
  %w(Models             app/models),
5
 
  %w(Libraries          lib/),
6
 
  %w(APIs               app/apis),
7
 
  %w(Integration\ tests test/integration),
8
 
  %w(Functional\ tests  test/functional),
9
 
  %w(Unit\ tests        test/unit)
10
 
 
11
 
].collect { |name, dir| [ name, "#{RAILS_ROOT}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
12
 
 
13
 
desc "Report code statistics (KLOCs, etc) from the application"
14
 
task :stats do
15
 
  require 'code_statistics'
16
 
  CodeStatistics.new(*STATS_DIRECTORIES).to_s
17
 
end