appium_flutter_finder 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a69fae955f831189490f16ccf8d3e82ad35468332e6a6c67875dbc59c42b2bd
4
- data.tar.gz: 4700479a6b705f1c53ed92c1d2e39c4d15f9cc0997a9b6b2eb283165e18e86cf
3
+ metadata.gz: 0ff9a91751c78978f33a09c5734e4f22f93c64667a5d87847ae3cdca42b455bb
4
+ data.tar.gz: 22f640a6c69274806eae50376bfe3cdc965d6aa6633b66897917365630525cb5
5
5
  SHA512:
6
- metadata.gz: a602317dfe8f6148e4d38d444b5694521c6f21855f509213b92d34571e8840c6acbd28ff00ed7a0c654611513f3bcd9c64be689af7ec808829d02d1faad97272
7
- data.tar.gz: 07c0301cc8300a7009d55d5c4665c372278b19676ce3db651fae75c9b17d67eede1793ec9ad9c38190f7af204f6d158e564643a16eb0a60eb464f3092a12a2b5
6
+ metadata.gz: 8cde568efa150332e17bc35be932e898778962f4a233b789e21c1ef5e086679cd7b96c505183e06ff77d2bc2b988a1cda9c95f5ea706ebb28b7e4c06f656efe0
7
+ data.tar.gz: 4fe38fe95a264b7d76b27d1fb707debe38eb50cc3ed653b8d483350cb25c51fb667a8743a65ba6f78955108b6161461386d3d11f56f4a2a0b533e33911d8bc0e
data/README.md CHANGED
@@ -42,6 +42,17 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
42
42
 
43
43
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
44
 
45
+ ## Changelog
46
+ - 0.4.0
47
+ - Bump appium_lib_core version to v5+
48
+ - 0.3, 0.3.1
49
+ - Add `first_match_only` option in `by_ancestor` and `by_descendant`
50
+ - 0.2.1
51
+ - Fix `by_ancestor` and `by_descendant`
52
+ - https://github.com/truongsinh/appium-flutter-driver/pull/165#issuecomment-877928553
53
+ - 0.2.0
54
+ - Bump ruby_lib_core version to 4+
55
+
45
56
  ## Contributing
46
57
 
47
58
  Bug reports and pull requests are welcome on GitHub at https://github.com/truongsinh/appium-flutter-driver/tree/master/finder/ruby .
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'appium_flutter_finder/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.required_ruby_version = '>= 2.4'
6
+ spec.required_ruby_version = '>= 2.6'
7
7
 
8
8
  spec.name = 'appium_flutter_finder'
9
9
  spec.version = Appium::Flutter::Finder::VERSION
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.add_runtime_dependency 'appium_lib_core', '~> 4.0'
26
+ spec.add_runtime_dependency 'appium_lib_core', '~> 5.0'
27
27
 
28
28
  spec.add_development_dependency 'bundler', '>= 1.17'
29
29
  spec.add_development_dependency 'minitest', '~> 5.0'
@@ -1,7 +1,7 @@
1
1
  module Appium
2
2
  module Flutter
3
3
  module Finder
4
- VERSION = '0.2.0'.freeze
4
+ VERSION = '0.4.0'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -17,21 +17,23 @@ module Appium
17
17
 
18
18
  # Get find element context for flutter driver
19
19
  module Finder
20
- def by_ancestor(serialized_finder:, matching:, match_root: false)
20
+ def by_ancestor(serialized_finder:, matching:, match_root: false, first_match_only: false)
21
21
  by_ancestor_or_descendant(
22
22
  type: 'Ancestor',
23
23
  serialized_finder: serialized_finder,
24
24
  matching: matching,
25
- match_root: match_root
25
+ match_root: match_root,
26
+ first_match_only: first_match_only
26
27
  )
27
28
  end
28
29
 
29
- def by_descendant(serialized_finder:, matching:, match_root: false)
30
+ def by_descendant(serialized_finder:, matching:, match_root: false, first_match_only: false)
30
31
  by_ancestor_or_descendant(
31
32
  type: 'Descendant',
32
33
  serialized_finder: serialized_finder,
33
34
  matching: matching,
34
- match_root: match_root
35
+ match_root: match_root,
36
+ first_match_only: first_match_only
35
37
  )
36
38
  end
37
39
 
@@ -85,8 +87,8 @@ module Appium
85
87
  Base64.strict_encode64(hash.to_json)
86
88
  end
87
89
 
88
- def by_ancestor_or_descendant(type:, serialized_finder:, matching:, match_root: false)
89
- param = { finderType: type, matchRoot: match_root }
90
+ def by_ancestor_or_descendant(type:, serialized_finder:, matching:, match_root: false, first_match_only: false)
91
+ param = { finderType: type, matchRoot: match_root, firstMatchOnly: first_match_only}
90
92
 
91
93
  finder = begin
92
94
  JSON.parse(Base64.decode64(serialized_finder))
@@ -94,18 +96,23 @@ module Appium
94
96
  {}
95
97
  end
96
98
 
99
+ of_param = {}
97
100
  finder.each_key do |key|
98
- param["of_#{key}"] = finder[key]
101
+ of_param[key] = finder[key]
99
102
  end
103
+ param['of'] = of_param.to_json
100
104
 
101
105
  matching = begin
102
106
  JSON.parse(Base64.decode64(matching))
103
107
  rescue JSONError
104
108
  {}
105
109
  end
110
+
111
+ matching_param = {}
106
112
  matching.each_key do |key|
107
- param["matching_#{key}"] = matching[key]
113
+ matching_param[key] = matching[key]
108
114
  end
115
+ param['matching'] = matching_param.to_json
109
116
 
110
117
  serialize param
111
118
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_flutter_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki Matsuo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appium_lib_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '5.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ files:
84
84
  homepage: https://github.com/truongsinh/appium-flutter-driver
85
85
  licenses: []
86
86
  metadata: {}
87
- post_install_message:
87
+ post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths:
90
90
  - lib
@@ -92,15 +92,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: '2.4'
95
+ version: '2.6'
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.1.2
103
- signing_key:
102
+ rubygems_version: 3.2.15
103
+ signing_key:
104
104
  specification_version: 4
105
105
  summary: Finder for appium-flutter-driver
106
106
  test_files: []