Skip to content

Commit

Permalink
Remove deprecated :service_log_path driver initialization argument
Browse files Browse the repository at this point in the history
It has been deprecated since 3.3.0.
Use driver_opts: {log_path: ''} instead.
  • Loading branch information
p0deje committed Nov 30, 2017
1 parent d59fe65 commit 31cbb0d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
5 changes: 0 additions & 5 deletions rb/lib/selenium/webdriver/chrome/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions rb/spec/unit/selenium/webdriver/chrome/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 31cbb0d

Please sign in to comment.