generated from rubocop-lts/rubocop-ruby2_3
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
46 lines (37 loc) · 953 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
# frozen_string_literal: true
require "bundler/gem_tasks"
defaults = []
begin
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
defaults << :spec
rescue LoadError
desc("spec task stub")
task(:spec) do
warn("NOTE: rspec isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
end
end
desc "alias test task to spec"
task test: :spec
begin
require "yard"
YARD::Rake::YardocTask.new do |t|
t.files = [
# Splats (alphabetical)
"lib/**/*.rb",
]
end
defaults << :yard
rescue LoadError
task(:yard) do
warn("NOTE: yard isn't installed, or is disabled for #{RUBY_VERSION} in the current environment")
end
end
# Internally this works
# load "lib/rubocop/ruby2_2/tasks.rake"
# But ...
# externally it won't, so in other internal projects' Rakefiles we:
require "rubocop/ruby2_2"
Rubocop::Ruby22.install_tasks
defaults << :rubocop_gradual
task default: defaults