Skip to content

Commit

Permalink
Merge pull request #156 from YOU54F/deps/rackup_2_3
Browse files Browse the repository at this point in the history
fix: rack 2.x dont load Rack::Handler::WEBrick class to avoid warnings
  • Loading branch information
YOU54F authored Aug 6, 2024
2 parents 828727e + c5e2311 commit 5457575
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions lib/pact/mock_service/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,7 @@ def version

def require_common_dependencies
require 'webrick/https'
begin
require 'rack/handler/webrick'
rescue LoadError
require 'rackup/handler/webrick'
end
require 'rack/handler/webbrick'
require 'fileutils'
require 'pact/mock_service/server/wait_for_server_up'
require 'pact/mock_service/cli/pidfile'
Expand Down
6 changes: 1 addition & 5 deletions lib/pact/stub_service/cli.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
require 'pact/mock_service/cli/custom_thor'
require 'webrick/https'
begin
require 'rack/handler/webrick'
rescue LoadError
require 'rackup/handler/webrick'
end
require 'rack/handler/webbrick'
require 'fileutils'
require 'pact/mock_service/server/wait_for_server_up'
require 'pact/mock_service/cli/pidfile'
Expand Down
1 change: 0 additions & 1 deletion lib/rack/handler/webbrick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module Rack
module Handler
begin
require 'rack/handler/webrick'
WEBrick = Class.new(Rack::Handler::WEBrick)
rescue LoadError
require 'rackup/handler/webrick'
WEBrick = Class.new(Rackup::Handler::WEBrick)
Expand Down

0 comments on commit 5457575

Please sign in to comment.