forked from roodi/roodi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
34 lines (28 loc) · 792 Bytes
/
Rakefile
File metadata and controls
34 lines (28 loc) · 792 Bytes
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.plugin :gemspec
Hoe.spec 'roodi' do
developer('Marty Andrews', 'marty@cogentconsulting.com.au')
extra_deps << 'ruby_parser'
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