shawn42 / free-radicals

Free Radicals is a Gamebox game that uses Rubygame, written for RubyWeekend #3 "A tiny world"

free-radicals / Rakefile
100755 22 lines (18 sloc) 0.611 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
libdir = File.dirname(__FILE__)+"/lib"
$: << libdir
confdir = File.dirname(__FILE__)+"/config"
$: << confdir
 
require 'environment'
require 'gamebox/tasks/gamebox_tasks'
STATS_DIRECTORIES = [
  %w(Source src/),
  %w(Config config/),
  %w(Maps maps/),
  %w(Unit\ tests specs/),
  %w(Libraries lib/),
].collect { |name, dir| [ name, "#{APP_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