Skip to content

Commit

Permalink
Fix deprecation warning for Rack::Handler
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Jan 31, 2024
1 parent 65c9130 commit c16d9f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/sidekiq_alive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require "singleton"

require "rack"
require "rackup"
require "sidekiq"
require "sidekiq/api"

Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq_alive/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module SidekiqAlive
class Server
class << self
def run!
handler = Rack::Handler.get(server)
handler = Rackup::Handler.get(server)

Signal.trap("TERM") { handler.shutdown }

Expand Down
2 changes: 1 addition & 1 deletion spec/sidekiq_alive/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
describe "#run!" do
subject { app.run! }

before { allow(Rack::Handler).to(receive(:get).with("webrick").and_return(fake_webrick)) }
before { allow(Rackup::Handler).to(receive(:get).with("webrick").and_return(fake_webrick)) }

let(:fake_webrick) { double }

Expand Down

0 comments on commit c16d9f8

Please sign in to comment.