forked from savonrb/savon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
40 lines (33 loc) · 955 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
30
31
32
33
34
35
36
37
38
39
40
require "rake"
begin
require "yard"
YARD::Rake::YardocTask.new do |t|
t.files = ["README.md", "lib/**/*.rb"]
end
rescue LoadError
desc message = %{"gem install yard" to generate documentation}
task("yard") { abort message }
end
begin
require "metric_fu"
MetricFu::Configuration.run do |c|
c.metrics = [:churn, :flog, :flay, :reek, :roodi, :saikuro] # :rcov seems to be broken
c.graphs = [:flog, :flay, :reek, :roodi]
c.flay = { :dirs_to_flay => ["lib"], :minimum_score => 20 }
c.rcov[:rcov_opts] << "-Ilib -Ispec"
end
rescue LoadError
desc message = %{"gem install metric_fu" to generate metrics}
task("metrics:all") { abort message }
end
begin
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new do |t|
t.rspec_opts = %w(-fd -c)
end
rescue LoadError
desc message = %{"gem install rspec --pre" to run the specs}
task(:spec) { abort message }
end
task :default => :spec
task :test => :spec