Skip to content

Commit

Permalink
chore: Remove deprecated setup! method
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Jun 15, 2024
1 parent f50baab commit 2bc1bb4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 0 additions & 12 deletions lib/sidekiq/throttled.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions spec/lib/sidekiq/throttled_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2bc1bb4

Please sign in to comment.