-
-
Notifications
You must be signed in to change notification settings - Fork 360
/
Rakefile
40 lines (35 loc) · 785 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
# frozen_string_literal: true
require "bundler"
require "bundler/setup"
Bundler::GemHelper.install_tasks
require "rake/testtask"
Rake::TestTask.new(:test) do |t|
t.libs << "lib"
t.libs << "test"
t.test_files = FileList["test/**/*_test.rb"]
t.verbose = true
t.warning = false
end
require "rubocop/rake_task"
desc "Run rubocop"
task :rubocop do
RuboCop::RakeTask.new do |t|
t.options += %w[
--display-style-guide
--display-cop-names
--extra-details
--auto-correct
]
end
end
desc "Run specs against all gemfiles"
task "test:all" do
%w[
Gemfile
gemfiles/rails4.gemfile
].each do |gemfile|
puts "=> Running with Gemfile: #{gemfile}"
system "BUNDLE_GEMFILE=#{gemfile} rake test"
end
end
task default: %i[test rubocop]