public
Description: Ruby Object Oriented Design Inferometer
Homepage:
Clone URL: git://github.com/martinjandrews/roodi.git
roodi / Rakefile
100644 34 lines (27 sloc) 0.799 kb
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
30
31
32
33
34
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
 
require 'rubygems'
require 'hoe'
require 'rake'
require 'spec/rake/spectask'
require 'roodi'
 
Hoe.new('roodi', Roodi::VERSION) do |p|
  p.developer('Marty Andrews', 'marty@cogentconsulting.com.au')
  p.extra_deps = ['ruby_parser']
  p.remote_rdoc_dir = ''
end
 
def roodi(ruby_files)
  roodi = Roodi::Core::Runner.new
  ruby_files.each { |file| roodi.check_file(file) }
  roodi.errors.each {|error| puts error}
  puts "\nFound #{roodi.errors.size} errors."
end
 
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
  t.spec_files = FileList['spec/**/*spec.rb']
end
 
desc "Run Roodi against all source files"
task :roodi do
  pattern = File.join(File.dirname(__FILE__), "**", "*.rb")
  roodi(Dir.glob(pattern))
end
 
task :default => :spec