-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
35 lines (28 loc) · 864 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
# frozen_string_literal: true
require "bundler/gem_tasks"
require "reek/rake/task"
require "rspec/core/rake_task"
require "rubocop/rake_task"
RSpec::Core::RakeTask.new(:specs)
task default: :specs
desc "Run all test and lint tasks"
task :spec do
Rake::Task["specs"].invoke
Rake::Task["rubocop"].invoke
Rake::Task["spec_docs"].invoke
end
desc "Run RuboCop on the lib/specs directory"
RuboCop::RakeTask.new(:rubocop) { |task|
task.requires << "rubocop-rspec"
task.requires << "rubocop-rake"
task.requires << "rubocop-performance"
task.patterns = ["lib/**/*.rb", "spec/**/*.rb"]
}
desc "Run Reek on the lib/specs directory"
Reek::Rake::Task.new(:reek) { |task|
task.source_files = FileList["lib/**/*.rb", "spec/**/*.rb"]
}
desc "Ensure that the plugin passes `danger plugins lint`"
task :spec_docs do
sh "bundle exec danger plugins lint"
end