forked from sidekiq/sidekiq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
30 lines (26 loc) · 824 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
require "bundler/gem_tasks"
require "rake/testtask"
require "standard/rake"
# If you want to generate API docs:
# gem install yard && yard && open doc/index.html
# YARD readme: https://rubydoc.info/gems/yard/file/README.md
# YARD tags: https://www.rubydoc.info/gems/yard/file/docs/Tags.md
# YARD cheatsheet: https://gist.github.com/phansch/db18a595d2f5f1ef16646af72fe1fb0e
Rake::TestTask.new(:test) do |test|
test.warning = true
test.pattern = "test/**/test_*.rb"
end
namespace :test do
task :redis_client do
previous = ENV["SIDEKIQ_REDIS_CLIENT"]
ENV["SIDEKIQ_REDIS_CLIENT"] = "1"
Rake::Task[:test].execute
ensure
if previous
ENV["SIDEKIQ_REDIS_CLIENT"] = previous
else
ENV.delete("SIDEKIQ_REDIS_CLIENT")
end
end
end
task default: [:standard, :test, "test:redis_client"]