-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathRakefile
40 lines (28 loc) · 979 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
# frozen_string_literal: true
require 'html-proofer'
require 'rspec/core/rake_task'
desc 'Run specs'
RSpec::Core::RakeTask.new do |t|
t.pattern = 'spec/**/*_spec.rb'
t.rspec_opts = ['--order', 'rand', '--color']
end
task :test do
sh 'bundle exec jekyll build'
Rake::Task['spec'].invoke
HTMLProofer.check_directory('./_site',
check_html: true,
validation: { ignore_script_embeds: true },
url_swap: { %r{https://chooseadocument.com} => '' },
check_img_http: true).run
end
task :approved_documents do
require './spec/spec_helper_doc'
approved = approved_documents
approved.select! { |l| spdx_ids.include?(l) }
puts "#{approved.count} approved documents:"
puts approved.join(', ')
puts "\n"
potential = approved - (documents.map { |l| l['id'] })
puts "#{potential.count} potential additions:"
puts potential.join(', ')
end