Repository navigation
Expand file tree
/
Copy pathRakefile
More file actions
50 lines (41 loc) · 1.37 KB
/
Copy pathRakefile
File metadata and controls
50 lines (41 loc) · 1.37 KB
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
41
42
43
44
45
46
47
48
49
50
# frozen_string_literal: true
require "rake/testtask"
Rake::TestTask.new(:test) do |task|
task.libs << "lib" << "test"
task.test_files = FileList["test/*_test.rb"]
end
# Rails in a process of its own: its core extensions would otherwise change the Ruby the other tests run on.
Rake::TestTask.new("test:rails") do |task|
task.libs << "lib" << "test"
task.test_files = FileList["test/rails/*_test.rb"]
end
task test: "test:rails"
task default: :test
namespace :corpus do
desc "Download the sources pinned in corpus/manifest.yml into corpus/cache"
task :fetch do
ruby "script/corpus_fetch.rb"
end
end
desc "Compare Gamba with Prawn on bench/documents, one native block on bench/mixed, and Gamba's own API untagged and tagged on bench/native, into docs/benchmarks.json"
task :bench do
ruby "bench/compare.rb"
end
namespace :docs do
desc "Highlight the code blocks of docs/*.html with Rouge"
task :highlight do
ruby "script/highlight_docs.rb"
end
desc "Fail if a code block of docs/*.html is not highlighted"
task "highlight:check" do
ruby "script/highlight_docs.rb", "--check"
end
desc "Write docs/llms.txt and docs/llms-full.txt from docs/*.html and the README"
task :llms do
ruby "script/llms_docs.rb"
end
desc "Fail if docs/llms.txt or docs/llms-full.txt is out of date"
task "llms:check" do
ruby "script/llms_docs.rb", "--check"
end
end