-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (29 loc) · 1.02 KB
/
Copy pathRakefile
File metadata and controls
36 lines (29 loc) · 1.02 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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rb_sys/extensiontask"
GEMSPEC = Gem::Specification.load("microsandbox-rb.gemspec")
RbSys::ExtensionTask.new("microsandbox_rb", GEMSPEC) do |ext|
ext.lib_dir = "lib/microsandbox"
end
begin
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec) do |t|
# Unit specs by default; integration specs require a real runtime and are
# opt-in via MICROSANDBOX_INTEGRATION=1 (see spec/spec_helper.rb).
t.pattern = "spec/unit/**/*_spec.rb"
end
RSpec::Core::RakeTask.new("spec:all") do |t|
t.pattern = "spec/**/*_spec.rb"
end
rescue LoadError
# rspec not installed (e.g. production install); skip test tasks.
end
begin
require "standard/rake"
# Adds `rake standard` (lint) and `rake standard:fix` (autocorrect) for the
# Ruby layer (lib/, spec/). Rust formatting/linting stays with cargo fmt/clippy.
rescue LoadError
# standard not installed (e.g. production install); skip lint task.
end
task spec: :compile
task default: %i[compile spec]