Rakefile in howitzer-2.0.3 vs Rakefile in howitzer-2.1.0
- old
+ new
@@ -13,10 +13,26 @@
Cucumber::Rake::Task.new(:cucumber, 'Run all cucumber features') do |t|
t.fork = false
end
+RuboCop::RakeTask.new
+
YARD::Rake::YardocTask.new { |_t| }
-RuboCop::RakeTask.new
+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('--list-undoc')
+ output = log.string
+ puts output
+ exit(1) unless output.include?('100.00% documented')
+ end
+end
-task default: %i[rubocop spec cucumber]
+task default: %i[rubocop yard:validate spec cucumber]