-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Rakefile
58 lines (49 loc) · 983 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# frozen_string_literal: true
require "bundler/gem_tasks"
begin
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
desc("alias test task to spec")
task(test: :spec)
rescue LoadError
task(:spec) do
warn("rspec is disabled")
end
end
begin
require "reek/rake/task"
Reek::Rake::Task.new do |t|
t.fail_on_error = true
t.verbose = false
t.source_files = "lib/**/*.rb"
end
rescue LoadError
task(:reek) do
warn("reek is disabled")
end
end
begin
require "yard-junk/rake"
YardJunk::Rake.define_task
rescue LoadError
task("yard:junk") do
warn("yard:junk is disabled")
end
end
begin
require "yard"
YARD::Rake::YardocTask.new(:yard)
rescue LoadError
task(:yard) do
warn("yard is disabled")
end
end
begin
require "rubocop/lts"
Rubocop::Lts.install_tasks
rescue LoadError
task(:rubocop_gradual) do
warn("RuboCop (Gradual) is disabled")
end
end
task default: %i[spec rubocop_gradual yard yard:junk]