appium_lib_core 5.0.2 → 5.0.3

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: e643028012001727a3587bf56c533a58f3156cb54a33ce6ae76344032b6eba2b
4
- data.tar.gz: e267c16743d9ae2054c82aaf2af36743eadcf11405cda1bc65d0988e2a0b019d
3
+ metadata.gz: 768ad5928203c9268387eb20883faad159028c468d19e9ec7bf71feaa54bb5ed
4
+ data.tar.gz: 3cd338540cadeb66f809b3f58a27c3b20831cebf252fbc2333bc59af08ce1942
5
5
  SHA512:
6
- metadata.gz: 2e433f4df5d820edd9a8625b0e53e3d16eb498310e3d7891ae4f5002bae518488a4595398a294b3f2a7a7a81d84dce0ded6ede87289d5a47f6a5a6f9a4ca0656
7
- data.tar.gz: 07ccc1ce6007394bb72328cfd0f2f7ed292f0456177baef9dc9aec999ba511565dcd9635f10c5ce7e43383a115801d5d3c728a52a08c20a254558d4752ddc863
6
+ metadata.gz: 2e355b1a2e682da136efd316739854c53394feda4a374df7c9e013ae8d9a9d3aca20b7bfc6a16523f7ea0aac175fb7413847494e3ced07ae11dfccbb67853b12
7
+ data.tar.gz: 331bd0140602b5ca769ce78f2eb65cbd969be4ea1482911a60a206e11e1453a1fc3b88b66131eca1285720818f95bb752422002b0ff6ce20d41aa01a807db516
data/CHANGELOG.md CHANGED
@@ -10,6 +10,15 @@ Read `release_notes.md` for commit level details.
10
10
 
11
11
  ### Deprecations
12
12
 
13
+ ## [5.0.3] - 2021-12-13
14
+
15
+ ### Enhancements
16
+ - Can add more arguments in `install_app`
17
+ - e.g. Add `timeoutMs` for XCUITest driver as `@driver.install_app("/path/to/test.ipa", timeoutMs: 20000)`
18
+
19
+ ### Bug fixes
20
+ - (internal) Allow to access to `bridge` attribute in `driver` instance for appium_flutter_finder
21
+
13
22
  ## [5.0.2] - 2021-12-01
14
23
 
15
24
  ### Bug fixes
@@ -41,12 +41,12 @@ module Appium
41
41
 
42
42
  include ::Appium::Core::Waitable
43
43
 
44
- private
45
-
46
44
  # Private API.
47
45
  # Do not use this for general use. Used by flutter driver to get bridge for creating a new element
48
46
  attr_reader :bridge
49
47
 
48
+ private
49
+
50
50
  def initialize(bridge: nil, listener: nil, **opts)
51
51
  # For ::Appium::Core::Waitable
52
52
  @wait_timeout = opts.delete(:wait_timeout)
@@ -609,7 +609,9 @@ module Appium
609
609
  @bridge.background_app(duration)
610
610
  end
611
611
 
612
- # Install the given app onto the device
612
+ # Install the given app onto the device.
613
+ # Each options can be snake-case or camel-case. Snake-cases will be converted to camel-case
614
+ # as options value.
613
615
  #
614
616
  # @param [String] path The absolute local path or remote http URL to an .ipa or .apk file,
615
617
  # or a .zip containing one of these.
@@ -623,26 +625,26 @@ module Appium
623
625
  # @param [Boolean] grant_permissions Only for Android. whether to automatically grant application permissions
624
626
  # on Android 6+ after the installation completes. +false+ by default
625
627
  #
628
+ # Other parameters such as https://github.com/appium/appium-xcuitest-driver#mobile-installapp also can be set.
629
+ # Then, arguments in snake case will be camel case as its request parameters.
630
+ #
626
631
  # @example
627
632
  #
628
633
  # @driver.install_app("/path/to/test.apk")
629
634
  # @driver.install_app("/path/to/test.apk", replace: true, timeout: 20000, allow_test_packages: true,
630
635
  # use_sdcard: false, grant_permissions: false)
636
+ # @driver.install_app("/path/to/test.ipa", timeoutMs: 20000)
631
637
  #
632
- def install_app(path,
633
- replace: nil,
634
- timeout: nil,
635
- allow_test_packages: nil,
636
- use_sdcard: nil,
637
- grant_permissions: nil)
638
- @bridge.install_app(path,
639
- replace: replace,
640
- timeout: timeout,
641
- allow_test_packages: allow_test_packages,
642
- use_sdcard: use_sdcard,
643
- grant_permissions: grant_permissions)
638
+ def install_app(path, **options)
639
+ options = options.transform_keys { |key| key.to_s.gsub(/_./) { |v| v[1].upcase } } unless options.nil?
640
+ @bridge.install_app(path, options)
644
641
  end
645
642
 
643
+ # def capitalize(s)
644
+ # chars =
645
+ # chars[1:].map(&:capitalize).join
646
+ # end
647
+
646
648
  # @param [Strong] app_id BundleId for iOS or package name for Android
647
649
  # @param [Boolean] keep_data Only for Android. Whether to keep application data and caches after it is uninstalled.
648
650
  # +false+ by default
@@ -39,21 +39,9 @@ module Appium
39
39
  raise NotImplementedError
40
40
  end
41
41
 
42
- def install_app(path,
43
- replace: nil,
44
- timeout: nil,
45
- allow_test_packages: nil,
46
- use_sdcard: nil,
47
- grant_permissions: nil)
42
+ def install_app(path, options = {})
48
43
  args = { appPath: path }
49
-
50
- args[:options] = {} if options?(replace, timeout, allow_test_packages, use_sdcard, grant_permissions)
51
-
52
- args[:options][:replace] = replace unless replace.nil?
53
- args[:options][:timeout] = timeout unless timeout.nil?
54
- args[:options][:allowTestPackages] = allow_test_packages unless allow_test_packages.nil?
55
- args[:options][:useSdcard] = use_sdcard unless use_sdcard.nil?
56
- args[:options][:grantPermissions] = grant_permissions unless grant_permissions.nil?
44
+ args[:options] = options unless options.empty?
57
45
 
58
46
  execute :install_app, {}, args
59
47
  end
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '5.0.2' unless defined? ::Appium::Core::VERSION
18
- DATE = '2021-12-01' unless defined? ::Appium::Core::DATE
17
+ VERSION = '5.0.3' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2021-12-13' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
data/release_notes.md CHANGED
@@ -1,3 +1,11 @@
1
+ #### v5.0.3 2021-12-13
2
+
3
+ - [7cee1b3](https://github.com/appium/ruby_lib_core/commit/7cee1b31647c453a546c450c35c37649462eed05) Release 5.0.3
4
+ - [21bd5a5](https://github.com/appium/ruby_lib_core/commit/21bd5a5186dc25a9523ad8e7ec6275edbc79988e) fix: make bridge attribute non-private for flutter finder (#362)
5
+ - [78e432e](https://github.com/appium/ruby_lib_core/commit/78e432e92571adfd80fe3ad4405010825e766fc5) chore: add changelog
6
+ - [0b3c45c](https://github.com/appium/ruby_lib_core/commit/0b3c45cd6a059fd493bfcbd55ebe437291cbcdab) feat: do not restrict options in install_app (#361)
7
+
8
+
1
9
  #### v5.0.2 2021-12-01
2
10
 
3
11
  - [3cc0fb1](https://github.com/appium/ruby_lib_core/commit/3cc0fb129a0ec74367c716941adefae75fe6a6d6) Release 5.0.2
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: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-02 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver