Skip to content

Commit 82f6020

Browse files
committed
rb: Remove Service.default_service method
1 parent 5e7041c commit 82f6020

File tree

7 files changed

+4
-19
lines changed

7 files changed

+4
-19
lines changed

rb/lib/selenium/webdriver/chrome/bridge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def initialize(opts = {})
3030
if opts.has_key?(:url)
3131
url = opts.delete(:url)
3232
else
33-
@service = Service.default_service(*extract_service_args(opts))
33+
@service = Service.new(Chrome.driver_path, Service::DEFAULT_PORT, *extract_service_args(opts))
3434
@service.start
3535

3636
url = @service.uri

rb/lib/selenium/webdriver/chrome/service.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ module Chrome
2828
class Service < WebDriver::Service
2929
DEFAULT_PORT = 9515
3030

31-
def self.default_service(*extra_args)
32-
new Chrome.driver_path, DEFAULT_PORT, *extra_args
33-
end
34-
3531
private
3632

3733
def start_process

rb/lib/selenium/webdriver/edge/service.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ module Edge
2828
class Service
2929
DEFAULT_PORT = 17556
3030

31-
def self.default_service(*extra_args)
32-
new Edge.driver_path, DEFAULT_PORT, *extra_args
33-
end
34-
3531
private
3632

3733
def stop_server

rb/lib/selenium/webdriver/firefox/service.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ module Firefox
2828
class Service < WebDriver::Service
2929
DEFAULT_PORT = 4444
3030

31-
def self.default_service(*extra_args)
32-
new Firefox.driver_path, DEFAULT_PORT, *extra_args
33-
end
34-
3531
private
3632

3733
def start_process

rb/lib/selenium/webdriver/firefox/w3c_bridge.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ def initialize(opts = {})
2828
caps = opts[:desired_capabilities] ||= Remote::W3CCapabilities.firefox
2929
Binary.path = caps[:firefox_binary] if caps[:firefox_binary]
3030

31-
@service = Service.default_service(*extract_service_args(opts))
31+
@service = Service.new(Firefox.driver_path, Service::DEFAULT_PORT, *extract_service_args(opts))
3232
@service.start
33+
3334
opts[:url] = @service.uri
3435

3536
super

rb/lib/selenium/webdriver/phantomjs/bridge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def initialize(opts = {})
3636
else
3737
args = opts.delete(:args) || caps['phantomjs.cli.args']
3838

39-
@service = Service.default_service(*args)
39+
@service = Service.new(PhantomJS.path, Service::DEFAULT_PORT, *args)
4040
@service.start
4141

4242
url = @service.uri

rb/lib/selenium/webdriver/phantomjs/service.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ module PhantomJS
2828
class Service < WebDriver::Service
2929
DEFAULT_PORT = 8910
3030

31-
def self.default_service(*extra_args)
32-
new PhantomJS.path, DEFAULT_PORT, *extra_args
33-
end
34-
3531
private
3632

3733
def start_process

0 commit comments

Comments
 (0)