diff --git a/CHANGES.md b/CHANGES.md index 81595d6..e5a2867 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - Drop Sidekiq < 7 support +- Remove deprecated `Sidekiq::Throttled.setup!` ## [1.4.0] - 2024-04-07 diff --git a/lib/sidekiq/throttled.rb b/lib/sidekiq/throttled.rb index 51cc6fd..6cefcdb 100644 --- a/lib/sidekiq/throttled.rb +++ b/lib/sidekiq/throttled.rb @@ -87,18 +87,6 @@ def throttled?(message) rescue StandardError false end - - # @deprecated Will be removed in 2.0.0 - def setup! - warn "Sidekiq::Throttled.setup! was deprecated" - - Sidekiq.configure_server do |config| - config.server_middleware do |chain| - chain.remove(Sidekiq::Throttled::Middlewares::Server) - chain.add(Sidekiq::Throttled::Middlewares::Server) - end - end - end end end diff --git a/spec/lib/sidekiq/throttled_spec.rb b/spec/lib/sidekiq/throttled_spec.rb index a341351..b8f6ad9 100644 --- a/spec/lib/sidekiq/throttled_spec.rb +++ b/spec/lib/sidekiq/throttled_spec.rb @@ -19,12 +19,6 @@ expect(Sidekiq::BasicFetch).to include(Sidekiq::Throttled::Patches::BasicFetch) end - describe ".setup!" do - it "shows deprecation warning" do - expect { described_class.setup! }.to output(%r{deprecated}).to_stderr - end - end - describe ".throttled?" do it "tolerates invalid JSON message" do expect(described_class.throttled?("][")).to be false