README.md in sidekiq-unique-jobs-4.0.18 vs README.md in sidekiq-unique-jobs-5.0.0

- old
+ new

@@ -121,11 +121,11 @@ ### Usage with ActiveJob ```ruby Sidekiq.default_worker_options = { unique: :until_executing, - unique_args: ->(args) { args.first.except('job_id') } + unique_args: ->(args) { [ args.first.except('job_id') ] } } ``` ### Finer Control over Uniqueness @@ -137,11 +137,11 @@ The method or the proc can return a modified version of args without the transient arguments included, as shown below: ```ruby class UniqueJobWithFilterMethod include Sidekiq::Worker - sidekiq_options unique: :until_and_during_execution, + sidekiq_options unique: :until_and_while_execution, unique_args: :unique_args def self.unique_args(name, id, options) [ name, options[:type] ] end @@ -219,9 +219,23 @@ To enable the testing for `sidekiq-unique-jobs`, add `require 'sidekiq_unique_jobs/testing'` to your testing helper. You can if you want use `gem 'mock_redis'` to prevent sidekiq unique jobs using redis. See https://github.com/mhenrixon/sidekiq-unique-jobs/tree/master/rails_example/spec/controllers/work_controller_spec.rb for an example of how to configure sidekiq and unique jobs without redis. + +If you really don't care about testing uniquness and trust we get that stuff right you can (in newer sidekiq versions) remove the client middleware. + +```ruby +describe "Some test" do + before(:each) do + Sidekiq.configure_client do |config| + config.client_middleware do |chain| + chain.remove SidekiqUniqueJobs::Client::Middleware + end + end + end +end +``` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)