-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
36 lines (32 loc) · 720 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
require 'bundler/gem_tasks'
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError
puts "Couldn't find RSpec core Rake task"
end
begin
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.options = ['--verbose']
t.files = ['lib/**/*.rb', 'doc/**/*.md']
t.stats_options = ['--list-undoc']
end
rescue LoadError
puts "Couldn't find YARD"
end
begin
require 'yard-doctest'
YARD::Doctest::RakeTask.new do |task|
task.doctest_opts = %w[]
task.pattern = 'lib/**/*.rb'
end
rescue LoadError
puts "Couldn't find yard-doctest"
end
task :default =>
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
[:spec]
else
[:spec, 'yard:doctest']
end