-
Notifications
You must be signed in to change notification settings - Fork 27
/
Rakefile
40 lines (33 loc) · 917 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 'rubygems'
require 'bundler'
Bundler.setup
require 'rake'
require 'yard'
require 'stringio'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
require 'rubocop/rake_task'
Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new(:spec) { |_spec| nil }
Cucumber::Rake::Task.new(:cucumber, 'Run all cucumber features') do |t|
t.fork = false
t.cucumber_opts = %w[--publish-quiet]
end
RuboCop::RakeTask.new
YARD::Rake::YardocTask.new { |_t| nil }
namespace :yard do
desc 'Validate yard coverage'
task :validate do
log = StringIO.new
YARD::Logger.instance(log)
doc = YARD::CLI::Yardoc.new
doc.use_document_file = false
doc.use_yardopts_file = false
doc.generate = false
doc.run('stats --list-undoc')
output = log.string
puts output
exit(1) unless output.include?('100.00% documented')
end
end
task default: %i[rubocop yard:validate spec cucumber]