-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
29 lines (23 loc) · 937 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'rake'
require 'rdoc/task'
require 'rspec/core'
require 'rspec/core/rake_task'
require './config/environment'
# task :default => :spec
Dir["#{Gem::Specification.find_by_name('integration').full_gem_path}/lib/tasks/*.rake"].each { |ext| load ext } if defined?(Rake)
Dir["#{File.dirname(__FILE__)}/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
desc "Run all specs in spec directory (excluding plugin specs)"
RSpec::Core::RakeTask.new(:spec)
desc "Report code statistics"
task :stats do
require './vendor/code_statistics'
STATS_DIRECTORIES = [
%w(Controllers app/controllers),
%w(Helpers app/helpers),
%w(Models app/),
%w(Libraries lib/),
%w(Migrations db/migrations),
%w(Views app/views)
].collect { |name, dir| [ name, "./#{dir}" ] }.select { |name, dir| File.directory?(dir) }
CodeStatistics.new(*STATS_DIRECTORIES).to_s
end