From 31cbb0dceb80a92b6af290050fbde8bc72df499d Mon Sep 17 00:00:00 2001 From: Alex Rodionov Date: Thu, 30 Nov 2017 09:09:54 +0600 Subject: [PATCH] Remove deprecated :service_log_path driver initialization argument It has been deprecated since 3.3.0. Use driver_opts: {log_path: ''} instead. --- rb/lib/selenium/webdriver/chrome/driver.rb | 5 ----- rb/spec/unit/selenium/webdriver/chrome/service_spec.rb | 8 -------- 2 files changed, 13 deletions(-) diff --git a/rb/lib/selenium/webdriver/chrome/driver.rb b/rb/lib/selenium/webdriver/chrome/driver.rb index 407c386270972..520baee8e63e4 100644 --- a/rb/lib/selenium/webdriver/chrome/driver.rb +++ b/rb/lib/selenium/webdriver/chrome/driver.rb @@ -37,11 +37,6 @@ def initialize(opts = {}) driver_opts = opts.delete(:driver_opts) || {} port = opts.delete(:port) || Service::DEFAULT_PORT - if opts.key? :service_log_path - WebDriver.logger.deprecate ':service_log_path', "driver_opts: {log_path: '#{opts[:service_log_path]}'}" - driver_opts[:log_path] = opts.delete :service_log_path - end - @service = Service.new(driver_path, port, driver_opts) @service.start opts[:url] = @service.uri diff --git a/rb/spec/unit/selenium/webdriver/chrome/service_spec.rb b/rb/spec/unit/selenium/webdriver/chrome/service_spec.rb index 569a19659ee65..6e8ddb54dcaa5 100644 --- a/rb/spec/unit/selenium/webdriver/chrome/service_spec.rb +++ b/rb/spec/unit/selenium/webdriver/chrome/service_spec.rb @@ -67,14 +67,6 @@ module Chrome driver = Driver.new(http_client: http, driver_opts: driver_opts) expect(driver.instance_variable_get("@service").instance_variable_get("@extra_args")).to eq args end - - it 'deprecates `service_log_path`' do - message = %r{\[DEPRECATION\] `:service_log_path` is deprecated. Use `driver_opts: {log_path: \/path\/to\/log}`} - - expect(WebDriver.logger).to receive(:deprecate).with(':service_log_path', "driver_opts: {log_path: '/path/to/log'}") - @driver = Driver.new(http_client: http, service_log_path: "/path/to/log") - expect(@driver.instance_variable_get("@service").instance_variable_get("@extra_args")).to eq ["--log-path=/path/to/log"] - end end end # Chrome end # WebDriver