appium_lib 10.6.0 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,9 +60,9 @@ module Appium
60
60
  # uiautomator index doesn't support last
61
61
  # and it's 0 indexed
62
62
  button_index = tags(BUTTON).length
63
- button_index -= 1 if button_index > 0
63
+ button_index -= 1 if button_index.positive?
64
64
  image_button_index = tags(IMAGE_BUTTON).length
65
- image_button_index -= 1 if image_button_index > 0
65
+ image_button_index -= 1 if image_button_index.positive?
66
66
 
67
67
  find_element :uiautomator,
68
68
  _button_visible_selectors(button_index: button_index,
@@ -63,9 +63,9 @@ module Appium
63
63
  # uiautomator index doesn't support last
64
64
  # and it's 0 indexed
65
65
  button_index = tags(::Appium::Android::BUTTON).length
66
- button_index -= 1 if button_index > 0
66
+ button_index -= 1 if button_index.positive?
67
67
  image_button_index = tags(::Appium::Android::IMAGE_BUTTON).length
68
- image_button_index -= 1 if image_button_index > 0
68
+ image_button_index -= 1 if image_button_index.positive?
69
69
 
70
70
  _button_visible_selectors_xpath(button_index: button_index,
71
71
  image_button_index: image_button_index)
@@ -60,9 +60,9 @@ module Appium
60
60
  # uiautomator index doesn't support last
61
61
  # and it's 0 indexed
62
62
  button_index = tags(::Appium::Android::Button).length
63
- button_index -= 1 if button_index > 0
63
+ button_index -= 1 if button_index.positive?
64
64
  image_button_index = tags(::Appium::Android::ImageButton).length
65
- image_button_index -= 1 if image_button_index > 0
65
+ image_button_index -= 1 if image_button_index.positive?
66
66
 
67
67
  elements = find_elements :uiautomator,
68
68
  _button_visible_selectors(button_index: button_index,
@@ -163,9 +163,8 @@ module Appium
163
163
  global_driver = true # if global_driver is nil, then global_driver must be default value.
164
164
  end
165
165
 
166
- if global_driver
167
- $driver.driver_quit if $driver
168
- end
166
+ $driver&.driver_quit if global_driver
167
+
169
168
  raise 'opts must be a hash' unless opts.is_a? Hash
170
169
 
171
170
  @core = ::Appium::Core.for(opts)
@@ -76,7 +76,7 @@ module Appium
76
76
  source = get_source
77
77
 
78
78
  # current_context may be nil which breaks start_with
79
- if current_context && current_context.start_with?('WEBVIEW')
79
+ if current_context&.start_with?('WEBVIEW')
80
80
  parser = @android_html_parser ||= Nokogiri::HTML::SAX::Parser.new(Appium::Common::HTMLElements.new)
81
81
  parser.document.reset
82
82
  parser.document.filter = class_name
@@ -14,6 +14,6 @@
14
14
 
15
15
  module Appium
16
16
  # Version and Date are defined on the 'Appium' module, not 'Appium::Common'
17
- VERSION = '10.6.0' unless defined? ::Appium::VERSION
18
- DATE = '2020-04-03' unless defined? ::Appium::DATE
17
+ VERSION = '11.0.0' unless defined? ::Appium::VERSION
18
+ DATE = '2020-12-19' unless defined? ::Appium::DATE
19
19
  end
data/readme.md CHANGED
@@ -21,7 +21,7 @@ We can avoid the class driver with current `ruby_lib`, but if you'd like to impl
21
21
  # Setup
22
22
  ## Requirement
23
23
  - [Appium](https://github.com/appium/appium#requirements)
24
- - Ruby: 2.2+
24
+ - Ruby: 2.4+
25
25
 
26
26
  ### Ruby Lib and Appium
27
27
  - Ruby library version over `9.8.0` requires Appium over `1.8`
@@ -1,3 +1,10 @@
1
+ #### v11.0.0 2020-12-19
2
+
3
+ - [b4313b0](https://github.com/appium/ruby_lib/commit/b4313b09e62dd22bb95c2e0bc6edd296c7ece7b4) Release 11.0.0
4
+ - [42f01dd](https://github.com/appium/ruby_lib/commit/42f01dd3513e82f9a7ed25ac9055a65dfaa7d81f) feat: bump ruby version (#887)
5
+ - [dc228b3](https://github.com/appium/ruby_lib/commit/dc228b33487281d0428dcd20e92263d7132dd53e) ci: move to GitHub Actions (#882)
6
+
7
+
1
8
  #### v10.6.0 2020-04-03
2
9
 
3
10
  - [65f690f](https://github.com/appium/ruby_lib/commit/65f690f1fec62a5f8868270287b0099d8b22a2ac) Release 10.6.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.6.0
4
+ version: 11.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-03 00:00:00.000000000 Z
12
+ date: 2020-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appium_lib_core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.3'
20
+ version: '4.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '3.3'
27
+ version: '4.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: nokogiri
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -207,9 +207,9 @@ extra_rdoc_files: []
207
207
  files:
208
208
  - ".github/ISSUE_TEMPLATE.md"
209
209
  - ".github/PULL_REQUEST_TEMPLATE.md"
210
+ - ".github/workflows/rubocop.yml"
210
211
  - ".gitignore"
211
212
  - ".rubocop.yml"
212
- - ".travis.yml"
213
213
  - CHANGELOG.md
214
214
  - Gemfile
215
215
  - LICENSE-2.0.txt
@@ -297,14 +297,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
297
297
  requirements:
298
298
  - - ">="
299
299
  - !ruby/object:Gem::Version
300
- version: '2.2'
300
+ version: '2.4'
301
301
  required_rubygems_version: !ruby/object:Gem::Requirement
302
302
  requirements:
303
303
  - - ">="
304
304
  - !ruby/object:Gem::Version
305
305
  version: '0'
306
306
  requirements: []
307
- rubygems_version: 3.0.3
307
+ rubygems_version: 3.1.2
308
308
  signing_key:
309
309
  specification_version: 4
310
310
  summary: Ruby library for Appium
@@ -1,19 +0,0 @@
1
- sudo: false
2
- cache: bundler
3
- language: ruby
4
- rvm:
5
- - 2.2
6
- - 2.3
7
- - 2.4
8
- - 2.5
9
- - 2.6
10
- - 2.7
11
-
12
- install:
13
- - bundle install --retry=3
14
- script:
15
- - bundle exec rake rubocop
16
- notifications:
17
- email:
18
- on_success: never
19
- on_failure: never