-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
34 lines (29 loc) · 808 Bytes
/
Rakefile
File metadata and controls
34 lines (29 loc) · 808 Bytes
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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rake/testtask"
Rake::TestTask.new("test:lib:uncompressed") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
t.warning = false
end
Rake::TestTask.new("test:lib:compressed") do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb", "test/test_compressed.rb"]
t.warning = false
end
task "test" => "test:lib:compressed"
task "test" => "test:lib:uncompressed"
task :default
RUBOCOP_REQUIRED = (ENV["RUBOCOP"] == "1")
USE_RUBOCOP = (ENV["RUBOCOP"] != "0")
if USE_RUBOCOP
begin
require "rubocop/rake_task"
RuboCop::RakeTask.new
task "test" => "rubocop"
rescue LoadError
raise if RUBOCOP_REQUIRED
end
end