Skip to content

Commit af27d01

Browse files
authored
remove deprecation or unnecessary code (#839)
1 parent 3781ae2 commit af27d01

File tree

3 files changed

+2
-25
lines changed

3 files changed

+2
-25
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Release tags are https://github.com/appium/ruby_lib/releases .
99
### 2. Bug fixes
1010

1111
### 3. Deprecations
12+
- `:offset_x` and `:offset_y` in `TouchAction#swipe` is deprecated in favor of `:end_x` and `:end_y`
13+
- [internal] Remove `check_server_version_xcuitest`
1214

1315
## v9.16.1
1416
### 1. Enhancements

lib/appium_lib/common/touch_actions.rb

-9
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ def swipe(opts)
5656
end_y = opts.fetch :end_y, 0
5757
duration = opts.fetch :duration, 200
5858

59-
if opts[:offset_x]
60-
::Appium::Logger.warn('[DEPRECATED] :offset_x was renamed to :end_x to indicate as an absolute point.')
61-
end_x = opts.fetch :offset_x, 0
62-
end
63-
if opts[:offset_y]
64-
::Appium::Logger.warn('[DEPRECATED] :offset_y was renamed to :end_y to indicate as an absolute point.')
65-
end_y = opts.fetch :offset_y, 0
66-
end
67-
6859
super(start_x: start_x, start_y: start_y, end_x: end_x, end_y: end_y, duration: duration)
6960
end
7061
end # class TouchAction

lib/appium_lib/driver.rb

-16
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class Test < Result
2525
require 'uri'
2626

2727
module Appium
28-
REQUIRED_VERSION_XCUITEST = '1.6.0'.freeze
29-
3028
class Driver
3129
# attr readers are promoted to global scope. To avoid clobbering, they're
3230
# made available via the driver_attributes method
@@ -325,19 +323,6 @@ def dialect
325323
@driver.dialect
326324
end
327325

328-
# Return true if the target Appium server is over REQUIRED_VERSION_XCUITEST.
329-
# If the Appium server is under REQUIRED_VERSION_XCUITEST, then error is raised.
330-
# @return [Boolean]
331-
def check_server_version_xcuitest
332-
if automation_name_is_xcuitest? &&
333-
!@appium_server_status.empty? &&
334-
(Gem::Version.new(@appium_server_status['build']['version']) < Gem::Version.new(REQUIRED_VERSION_XCUITEST))
335-
336-
Appium::Logger.warn("XCUITest requires Appium version >= #{REQUIRED_VERSION_XCUITEST}")
337-
end
338-
true
339-
end
340-
341326
# Returns the server's version info
342327
#
343328
# @example
@@ -515,7 +500,6 @@ def start_driver(http_client_ops =
515500
extend_for(device: @core.device, automation_name: @core.automation_name) if automation_name.nil?
516501

517502
@appium_server_status = appium_server_version
518-
check_server_version_xcuitest
519503

520504
@driver
521505
end

0 commit comments

Comments
 (0)