forked from rom-rb/rom
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
43 lines (34 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
41
42
43
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new("spec:rom") do |t|
t.pattern = ["spec/suite/rom/**/*_spec.rb"]
end
RSpec::Core::RakeTask.new("spec:compat") do |t|
t.pattern = ["spec/suite/compat/**/*_spec.rb"]
end
desc "Run all spec examples from all groups"
task spec: ["spec:rom", "spec:compat"]
task default: :spec
desc "Run benchmarks (tweak count via COUNT envvar)"
task :benchmark do
FileList["benchmarks/**/*_bench.rb"].each do |bench|
sh "ruby #{bench}"
end
end
namespace :benchmark do
desc "Verify benchmarks"
task :verify do
ENV["VERIFY"] = "true"
ENV["COUNT"] = "1"
Rake::Task[:benchmark].invoke
end
end
# rubocop:disable Lint/SuppressedException
begin
require "yard-junk/rake"
YardJunk::Rake.define_task(:text)
rescue LoadError
end
# rubocop:enable Lint/SuppressedException