appium_lib_core 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07d7884585b175caa13e4ad33176a963a78737d57471ff32c7d6453782d3128d
4
- data.tar.gz: 59b0b7f2e2e37b6bfa4ea35cae2186cfa9bd94605e970139caba40f93ebcfa21
3
+ metadata.gz: 5328494c785b852424a9ba61e627ed78c54c4bca6baf2643f16a647f4edfcf22
4
+ data.tar.gz: 130869ab5ca0d2967f98b5beed348d3e31bb7c90eb5219da60f2d8f973e8a381
5
5
  SHA512:
6
- metadata.gz: 1e70907610689a1790bad3ddd1cbe651053d2752ee16ec4d6d67f7ca32c62d3445f0ed6a78ec70da1dad4c171ad66508e396b4d96afe5b015fa69ce713872aaa
7
- data.tar.gz: 8b86523f38bfd66efb73f4aade5863e22106621d18e40ba6e9e05f94af14ecf254bb51309ea1785f8c96687a4efee6c35b51ad570946ada0978f1c6bd82752f2
6
+ metadata.gz: 48aae8b8e934edac9f178cc365825605fc40c7ff63a36e8e7cfe7baf7c815ec89dfecf60350dff401dcfdac80f1e892c86022659b65fc7000c55f7e4fa3b0243
7
+ data.tar.gz: 4cc0a6c8eb8b1258a6e7df79666ed4dd21cf3f6cae8c613fd5e3a34a11f15f7614151f296931205bc55d2c817cef298d682e6eb6dc95fb3ee826a864d39350f2
@@ -11,7 +11,7 @@ jobs:
11
11
  strategy:
12
12
  fail-fast: false
13
13
  matrix:
14
- ruby: [2.4, 2.5, 2.6, 2.7]
14
+ ruby: [2.4, 2.5, 2.6, 2.7, 3.0]
15
15
 
16
16
  runs-on: ubuntu-latest
17
17
 
@@ -1,7 +1,15 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.4
3
- Metrics/LineLength:
3
+ Layout/LineLength:
4
4
  Max: 128
5
+ Layout/RescueEnsureAlignment:
6
+ Enabled: false
7
+ Layout/EmptyLinesAroundAttributeAccessor:
8
+ Enabled: false
9
+ Layout/EmptyLineBetweenDefs:
10
+ Enabled: false
11
+ Layout/HashAlignment:
12
+ Enabled: false
5
13
  Metrics/MethodLength:
6
14
  Enabled: false
7
15
  Metrics/ModuleLength:
@@ -26,8 +34,6 @@ Style/CommentedKeyword:
26
34
  Enabled: false
27
35
  Style/PercentLiteralDelimiters:
28
36
  Enabled: false
29
- Style/BracesAroundHashParameters:
30
- Enabled: false
31
37
  Style/SymbolArray:
32
38
  Enabled: false
33
39
  Style/UnpackFirst:
@@ -40,5 +46,13 @@ Naming/MemoizedInstanceVariableName:
40
46
  - test/**/*
41
47
  Naming/RescuedExceptionsVariableName:
42
48
  Enabled: false
43
- Layout/RescueEnsureAlignment:
49
+ Style/CaseLikeIf:
50
+ Enabled: false
51
+ Style/RedundantRegexpEscape:
52
+ Enabled: false
53
+ Style/OptionalBooleanParameter:
54
+ Enabled: false
55
+ Style/ExplicitBlockArgument:
56
+ Enabled: false
57
+ Style/KeywordParametersOrder:
44
58
  Enabled: false
@@ -5,6 +5,16 @@ Read `release_notes.md` for commit level details.
5
5
  ## [Unreleased]
6
6
 
7
7
  ### Enhancements
8
+ - Ruby 3.0 support
9
+
10
+ ### Bug fixes
11
+
12
+ ### Deprecations
13
+
14
+ ## [4.1.0] - 2020-12-25
15
+
16
+ ### Enhancements
17
+ - Ruby 3.0 support
8
18
 
9
19
  ### Bug fixes
10
20
 
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency 'minitest', '~> 5.0'
32
32
  spec.add_development_dependency 'minitest-reporters', '~> 1.1'
33
33
  spec.add_development_dependency 'webmock', '~> 3.11.0'
34
- spec.add_development_dependency 'rubocop', '0.68.1'
34
+ spec.add_development_dependency 'rubocop', '1.7.0'
35
35
  spec.add_development_dependency 'appium_thor', '~> 1.0'
36
36
  spec.add_development_dependency 'pry'
37
37
  spec.add_development_dependency 'pry-byebug'
@@ -11,7 +11,7 @@ steps:
11
11
  displayName: Installed node dependencies
12
12
  - task: UseRubyVersion@0
13
13
  inputs:
14
- versionSpec: '2.4' # so far, bundler does not work over 2.5 since it raises openssl error
14
+ versionSpec: '2.7'
15
15
  - script: |
16
16
  mkdir -p test/report
17
17
  nohup appium --relaxed-security --log-timestamp --log-no-colors > test/report/appium.out 2>&1 &
@@ -34,11 +34,11 @@ module Appium
34
34
 
35
35
  hash.each_with_object({}) do |pair, acc|
36
36
  key = begin
37
- pair[0].to_sym
38
- rescue StandardError => e
39
- ::Appium::Logger.warn(e.message)
40
- pair[0]
41
- end
37
+ pair[0].to_sym
38
+ rescue StandardError => e
39
+ ::Appium::Logger.warn(e.message)
40
+ pair[0]
41
+ end
42
42
 
43
43
  value = pair[1]
44
44
  acc[key] = value.is_a?(Hash) ? symbolize_keys(value) : value
@@ -25,7 +25,7 @@ module Appium
25
25
  module Device
26
26
  extend Forwardable
27
27
 
28
- # rubocop:disable Metrics/LineLength
28
+ # rubocop:disable Layout/LineLength
29
29
 
30
30
  # @!method open_notifications
31
31
  # Open Android notifications
@@ -307,7 +307,7 @@ module Appium
307
307
  ## class << self
308
308
  ####
309
309
 
310
- # rubocop:enable Metrics/LineLength
310
+ # rubocop:enable Layout/LineLength
311
311
 
312
312
  class << self
313
313
  def extended(_mod)
@@ -415,7 +415,7 @@ module Appium
415
415
  # SeleniumWebdriver could already define this method
416
416
  return if method_defined? :execute_cdp
417
417
 
418
- def execute_cdp(cmd, **params)
418
+ def execute_cdp(cmd, params = {})
419
419
  execute :chrome_send_command, {}, { cmd: cmd, params: params }
420
420
  end
421
421
  end
@@ -311,6 +311,7 @@ module Appium
311
311
 
312
312
  # Perform a block within the given context, then switch back to the starting context.
313
313
  # @param [String] context The context to switch to for the duration of the block.
314
+ # @param [Proc] block The block to involve within the context
314
315
  #
315
316
  # @example
316
317
  #
@@ -318,8 +319,8 @@ module Appium
318
319
  # @driver.find_element :tag, "button"
319
320
  # end # The result of 'find_element :tag, "button"'
320
321
  #
321
- def within_context(context)
322
- block_given? ? @bridge.within_context(context, &Proc.new) : @bridge.within_context(context)
322
+ def within_context(context, &block)
323
+ block_given? ? @bridge.within_context(context, &block) : @bridge.within_context(context)
323
324
  end
324
325
 
325
326
  # Change to the default context. This is equivalent to +set_context nil+.
@@ -36,7 +36,8 @@ module Appium
36
36
 
37
37
  attr_reader :additional_headers
38
38
 
39
- def initialize(open_timeout: nil, read_timeout: nil)
39
+ # override
40
+ def initialize(open_timeout: nil, read_timeout: nil) # rubocop:disable Lint/MissingSuper
40
41
  @open_timeout = open_timeout
41
42
  @read_timeout = read_timeout
42
43
  @additional_headers = {}
@@ -18,7 +18,6 @@ module Appium
18
18
  module SearchContext
19
19
  # referenced: ::Selenium::WebDriver::SearchContext
20
20
 
21
- # rubocop:disable Layout/AlignHash
22
21
  FINDERS = ::Selenium::WebDriver::SearchContext::FINDERS.merge(
23
22
  accessibility_id: 'accessibility id',
24
23
  image: '-image',
@@ -37,9 +36,8 @@ module Appium
37
36
  # Tizen with Tizen prefix
38
37
  tizen_uiautomation: '-tizen uiautomation'
39
38
  )
40
- # rubocop:enable Layout/AlignHash
41
39
 
42
- # rubocop:disable Metrics/LineLength
40
+ # rubocop:disable Layout/LineLength
43
41
  #
44
42
  # Find the first element matching the given arguments
45
43
  #
@@ -129,7 +127,7 @@ module Appium
129
127
  # # For Tizen
130
128
  # @driver.find_elements :tizen_uiautomation, '....'
131
129
  #
132
- # rubocop:enable Metrics/LineLength
130
+ # rubocop:enable Layout/LineLength
133
131
  def find_element(*args)
134
132
  how, what = extract_args(args)
135
133
  by = _set_by_from_finders(how)
@@ -12,7 +12,6 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- # rubocop:disable Layout/AlignHash
16
15
  module Appium
17
16
  module Core
18
17
  # ref: https://github.com/appium/appium-base-driver/blob/master/lib/mjsonwp/routes.js
@@ -109,4 +108,3 @@ module Appium
109
108
  end # module Commands
110
109
  end # module Core
111
110
  end # module Appium
112
- # rubocop:enable Layout/AlignHash
@@ -12,7 +12,6 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- # rubocop:disable Layout/AlignHash
16
15
  module Appium
17
16
  module Core
18
17
  module Commands
@@ -27,4 +26,3 @@ module Appium
27
26
  end # module Commands
28
27
  end # module Core
29
28
  end # Appium
30
- # rubocop:enable Layout/AlignHash
@@ -12,7 +12,6 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- # rubocop:disable Layout/AlignHash
16
15
  module Appium
17
16
  module Core
18
17
  module Commands
@@ -55,4 +54,3 @@ module Appium
55
54
  end # module Commands
56
55
  end # module Core
57
56
  end # module Appium
58
- # rubocop:enable Layout/AlignHash
@@ -34,7 +34,7 @@ module Appium
34
34
  execute :app_strings, {}, opts
35
35
  end
36
36
 
37
- def background_app(duration = 0) # rubocop:disable Lint/UnusedMethodArgument
37
+ def background_app(duration = 0)
38
38
  # Should override in each driver
39
39
  raise NotImplementedError
40
40
  end
@@ -53,7 +53,7 @@ module Appium
53
53
  return yield(object)
54
54
  rescue ::Errno::ECONNREFUSED => e
55
55
  raise e
56
- rescue *ignored => last_error # rubocop:disable Lint/HandleExceptions
56
+ rescue *ignored => last_error
57
57
  # swallowed
58
58
  end
59
59
  sleep interval
@@ -98,7 +98,7 @@ module Appium
98
98
  return result if result
99
99
  rescue ::Errno::ECONNREFUSED => e
100
100
  raise e
101
- rescue *ignored => last_error # rubocop:disable Lint/HandleExceptions
101
+ rescue *ignored => last_error
102
102
  # swallowed
103
103
  end
104
104
  sleep interval
@@ -23,7 +23,7 @@ module Appium
23
23
  module Device
24
24
  extend Forwardable
25
25
 
26
- # rubocop:disable Metrics/LineLength
26
+ # rubocop:disable Layout/LineLength
27
27
 
28
28
  # @!method hide_keyboard(close_key = nil, strategy = nil)
29
29
  # Hide the onscreen keyboard
@@ -171,7 +171,7 @@ module Appium
171
171
  # @driver.battery_info #=> { state: :full, level: 0.7 }
172
172
  #
173
173
 
174
- # rubocop:enable Metrics/LineLength
174
+ # rubocop:enable Layout/LineLength
175
175
 
176
176
  ####
177
177
  ## class << self
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '4.0.0' unless defined? ::Appium::Core::VERSION
18
- DATE = '2020-12-19' unless defined? ::Appium::Core::DATE
17
+ VERSION = '4.1.0' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2020-12-25' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
@@ -20,7 +20,7 @@ module Appium
20
20
  module Device
21
21
  extend Forwardable
22
22
 
23
- # rubocop:disable Metrics/LineLength
23
+ # rubocop:disable Layout/LineLength
24
24
 
25
25
  # @since Appium 1.18.0
26
26
  # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil, time_limit: nil, fps: nil, preset: nil, video_filter: nil, capture_clicks: nil, capture_cursor: nil, audio_input: nil)
@@ -69,7 +69,7 @@ module Appium
69
69
  # @driver.start_recording_screen capture_cursor: true, capture_clicks: true, time_limit: '260'
70
70
  #
71
71
 
72
- # rubocop:enable Metrics/LineLength
72
+ # rubocop:enable Layout/LineLength
73
73
 
74
74
  ####
75
75
  ## class << self
@@ -1,3 +1,11 @@
1
+ #### v4.1.0 2020-12-25
2
+
3
+ - [89110a9](https://github.com/appium/ruby_lib_core/commit/89110a995b869471a134f8c45ebe8dfbaabfba63) Release 4.1.0
4
+ - [c833315](https://github.com/appium/ruby_lib_core/commit/c83331560738c0a656509516fc5f610855d5dfed) chore(deps-dev): update rubocop requirement from = 1.6.1 to = 1.7.0 (#294)
5
+ - [83d57aa](https://github.com/appium/ruby_lib_core/commit/83d57aa3ad7fd100c081ecc21ab0d5c5d40bf95f) feat: support Ruby 3 (#295)
6
+ - [e13c58f](https://github.com/appium/ruby_lib_core/commit/e13c58fe4355dcb2631f0a42248d991165f428f7) feat: bump rubocop (#293)
7
+
8
+
1
9
  #### v4.0.0 2020-12-19
2
10
 
3
11
  - [66e2306](https://github.com/appium/ruby_lib_core/commit/66e23069722d5ccd9ca10f5a1bdf2733cb249a2c) Release 4.0.0
@@ -17,9 +17,9 @@ require './lib/appium_lib_core'
17
17
 
18
18
  module Script
19
19
  class CommandsChecker
20
- attr_reader :spec_commands
21
- attr_reader :implemented_mjsonwp_commands, :implemented_w3c_commands, :implemented_core_commands
22
- attr_reader :webdriver_oss_commands, :webdriver_w3c_commands
20
+ attr_reader :spec_commands,
21
+ :implemented_mjsonwp_commands, :implemented_w3c_commands, :implemented_core_commands,
22
+ :webdriver_oss_commands, :webdriver_w3c_commands
23
23
 
24
24
  # Set commands implemented in this core library.
25
25
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-19 00:00:00.000000000 Z
11
+ date: 2020-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -134,14 +134,14 @@ dependencies:
134
134
  requirements:
135
135
  - - '='
136
136
  - !ruby/object:Gem::Version
137
- version: 0.68.1
137
+ version: 1.7.0
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - '='
143
143
  - !ruby/object:Gem::Version
144
- version: 0.68.1
144
+ version: 1.7.0
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: appium_thor
147
147
  requirement: !ruby/object:Gem::Requirement