1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/Rakefile
Jean byroot Boussier aaac999c6d
Add a compatibility layer for redis-client (#5298)
* Add a compatibility layer for `redis-client`

As discussed in https://github.com/mperham/sidekiq/pull/5253

Switching entirely to redis-client is deemed risky, so instead
we can support both.

All is needed is a small translation layer, and some very minimal
adjustments in the callers.

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Co-authored-by: Mike Perham <mperham@gmail.com>
2022-05-10 12:25:04 -07:00

24 lines
524 B
Ruby

require "bundler/gem_tasks"
require "rake/testtask"
require "standard/rake"
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"]