forked from collectiveidea/delayed_job_active_record
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
37 lines (27 loc) · 729 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
require "bundler/gem_helper"
Bundler::GemHelper.install_tasks
require "rspec/core/rake_task"
ADAPTERS = %w(mysql2 postgresql sqlite3)
ADAPTERS.each do |adapter|
desc "Run RSpec code examples for #{adapter} adapter"
RSpec::Core::RakeTask.new(adapter => "#{adapter}:adapter")
namespace adapter do
task :adapter do
ENV["ADAPTER"] = adapter
end
end
end
task :coverage do
ENV["COVERAGE"] = "true"
end
task :adapter do
ENV["ADAPTER"] = nil
end
Rake::Task[:spec].enhance do
require "simplecov"
require "coveralls"
Coveralls::SimpleCov::Formatter.new.format(SimpleCov.result)
end
require "rubocop/rake_task"
RuboCop::RakeTask.new
task default: ([:coverage] + ADAPTERS + [:adapter] + [:rubocop])