/
Rakefile
49 lines (40 loc) · 1.03 KB
/
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
44
45
46
47
48
49
# frozen_string_literal: true
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task test: :spec
task default: :spec
desc 'Rebuild Circle CI configuration based on the build matrix template .circleci/config.yml.erb'
task :circleci do
require 'erb'
template_path = File.expand_path('.circleci/config.yml.erb', __dir__)
config_path = File.expand_path('.circleci/config.yml', __dir__)
File.write config_path, ERB.new(File.read(template_path)).result
end
module SteepRunner
def self.run(*command)
require "steep"
require "steep/cli"
Steep::CLI.new(argv: command, stdout: $stdout, stderr: $stderr, stdin: $stdin).run
end
end
task :steep do
SteepRunner.run("check")
end
namespace :steep do
task :stats do
SteepRunner.run("stats", "--log-level=fatal")
end
end
namespace :rbs do
task :spec do
exec(
{
'RBS_TEST_TARGET' => 'MetaTags::*',
'RUBYOPT' => '-rrbs/test/setup',
},
'bundle exec rspec',
)
end
end