Skip to content

Commit 74fbe83

Browse files
committed
Use Rack::Files for Rack 3+ compatibility
Rack has renamed `Rack::File` to `Rack::Files` starting with Rack 2.1.0 [[1]]. Rack 3+ drops the old `Rack::File` class and therefore there are bunch of errors such as: ~~~ 334) Selenium::WebDriver::VirtualAuthenticator#user_verified= can not obtain credential requiring verification when set to false Failure/Error: @static = Rack::File.new(file_root) NameError: uninitialized constant Rack::File # ./spec/integration/selenium/webdriver/spec_support/rack_server.rb:103:in 'Selenium::WebDriver::SpecSupport::RackServer::TestApp#initialize' # ./spec/integration/selenium/webdriver/spec_support/rack_server.rb:30:in 'Class#new' # ./spec/integration/selenium/webdriver/spec_support/rack_server.rb:30:in 'Selenium::WebDriver::SpecSupport::RackServer#initialize' # ./spec/integration/selenium/webdriver/spec_support/test_environment.rb:87:in 'Class#new' # ./spec/integration/selenium/webdriver/spec_support/test_environment.rb:87:in 'Selenium::WebDriver::SpecSupport::TestEnvironment#app_server' # ./spec/integration/selenium/webdriver/spec_support/test_environment.rb:162:in 'Selenium::WebDriver::SpecSupport::TestEnvironment#url_for' # ./spec/integration/selenium/webdriver/spec_support/helpers.rb:41:in 'Selenium::WebDriver::SpecSupport::Helpers#url_for' # ./spec/integration/selenium/webdriver/virtual_authenticator_spec.rb:55:in 'block (2 levels) in <module:WebDriver>' ~~~ [1]: rack/rack@626272b
1 parent 68ebd5f commit 74fbe83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rb/spec/integration/selenium/webdriver/spec_support/rack_server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class TestApp
100100
BASIC_AUTH_CREDENTIALS = %w[test test].freeze
101101

102102
def initialize(file_root)
103-
@static = Rack::File.new(file_root)
103+
@static = Rack::Files.new(file_root)
104104
end
105105

106106
def call(env)

0 commit comments

Comments
 (0)