mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
aaac999c6d
* 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>
24 lines
524 B
Ruby
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"]
|