fastlane-plugin-browserstack 0.3.2 → 0.3.4

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: 256736837075ee78b9c415aa6a607ec0e3d35e28d83c6dfba19f9f5e3509ae5b
4
- data.tar.gz: bbe56add4e10fc050c69cc388cd81785ec83c534279b0dc755c31724363d86e7
3
+ metadata.gz: bdb6f9272dff106c7f97236e2b849ecd5797e9cbb631e73dd02986cd7970db3b
4
+ data.tar.gz: 6b0bf8dd962791b2b73ff047ff7b879ec52e3638e61cede8c6bf837e938c4867
5
5
  SHA512:
6
- metadata.gz: 4c8836c085d4f690e6c5614ac983209ebff4ca0af524447f5a2e9a52e1a43887476beb6b79479680e406e5f81a99c297a7293ce32e87af0701bc6fde157209a4
7
- data.tar.gz: eaade27872a65c70cb26e60ca1406fed8be1acea5e862dda72890a5da37f261bbc12b0ca2e81fdb0e6de0e4137bf5d53b0a0a4e84e395e2e1e123b24d687e0f7
6
+ metadata.gz: fcad7f694e78b719b18214401f4ae1074161e28dea83c6402755f501fc10d27f51144e75577172a1efbfe0c66a80859f5e9c7d203809655d26aea5f538d1692f
7
+ data.tar.gz: 44684bb146c226dcebb53870eecedb5fe16b161633a44a78da4f3838d57a2781b4f194bc8638fdcb7e53e2bdbdf16560ac2eb1533a65df75650b42a2d834025f
@@ -16,12 +16,14 @@ module Fastlane
16
16
  browserstack_access_key = params[:browserstack_access_key] # Required
17
17
  custom_id = params[:custom_id]
18
18
  file_path = params[:file_path].to_s # Required
19
+ ios_keychain_support = params[:ios_keychain_support]
19
20
 
20
21
  validate_file_path(file_path)
22
+ validate_ios_keychain_support(ios_keychain_support) unless ios_keychain_support.nil?
21
23
 
22
24
  UI.message("Uploading app to BrowserStack AppAutomate...")
23
25
 
24
- browserstack_app_id = Helper::BrowserstackHelper.upload_file(browserstack_username, browserstack_access_key, file_path, UPLOAD_API_ENDPOINT, custom_id)
26
+ browserstack_app_id = Helper::BrowserstackHelper.upload_file(browserstack_username, browserstack_access_key, file_path, UPLOAD_API_ENDPOINT, custom_id, ios_keychain_support)
25
27
 
26
28
  # Set 'BROWSERSTACK_APP_ID' environment variable, if app upload was successful.
27
29
  ENV['BROWSERSTACK_APP_ID'] = browserstack_app_id
@@ -45,6 +47,19 @@ module Fastlane
45
47
  end
46
48
  end
47
49
 
50
+ # Validate ios_keychain_support
51
+ def self.validate_ios_keychain_support(ios_keychain_support)
52
+ platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
53
+ if !platform.nil? && platform != :ios
54
+ # Check if platform is specified and not ios
55
+ # If so, then raise error.
56
+ UI.user_error!("ios_keychain_support param can only be used with platform ios")
57
+ end
58
+ unless ['true', 'false'].include?(ios_keychain_support.to_s)
59
+ UI.user_error!("ios_keychain_support should be either 'true' or 'false'.")
60
+ end
61
+ end
62
+
48
63
  def self.description
49
64
  "Uploads IPA and APK files to BrowserStack AppAutomate for running automated tests."
50
65
  end
@@ -69,8 +84,15 @@ module Fastlane
69
84
  # Shared value for ipa path if it was generated by gym https://docs.fastlane.tools/actions/gym/.
70
85
  return Actions.lane_context[Actions::SharedValues::IPA_OUTPUT_PATH]
71
86
  else
72
- # Shared value for apk if it was generated by gradle.
73
- return Actions.lane_context[Actions::SharedValues::GRADLE_APK_OUTPUT_PATH]
87
+ # Shared value for apk/aab if it was generated by gradle.
88
+ apk_path = Actions.lane_context[Actions::SharedValues::GRADLE_APK_OUTPUT_PATH]
89
+ aab_path = Actions.lane_context[Actions::SharedValues::GRADLE_AAB_OUTPUT_PATH]
90
+
91
+ if !apk_path.nil?
92
+ return apk_path
93
+ else
94
+ return aab_path
95
+ end
74
96
  end
75
97
  end
76
98
 
@@ -98,7 +120,11 @@ module Fastlane
98
120
  description: "Path to the app file",
99
121
  optional: true,
100
122
  is_string: true,
101
- default_value: default_file_path)
123
+ default_value: default_file_path),
124
+ FastlaneCore::ConfigItem.new(key: :ios_keychain_support,
125
+ description: "Enable/disable support for iOS keychain",
126
+ optional: true,
127
+ is_string: true)
102
128
  ]
103
129
  end
104
130
 
@@ -68,8 +68,15 @@ module Fastlane
68
68
  # Shared value for ipa path if it was generated by gym https://docs.fastlane.tools/actions/gym/.
69
69
  return Actions.lane_context[Actions::SharedValues::IPA_OUTPUT_PATH]
70
70
  else
71
- # Shared value for apk if it was generated by gradle.
72
- return Actions.lane_context[Actions::SharedValues::GRADLE_APK_OUTPUT_PATH]
71
+ # Shared value for apk/aab if it was generated by gradle.
72
+ apk_path = Actions.lane_context[Actions::SharedValues::GRADLE_APK_OUTPUT_PATH]
73
+ aab_path = Actions.lane_context[Actions::SharedValues::GRADLE_AAB_OUTPUT_PATH]
74
+
75
+ if !apk_path.nil?
76
+ return apk_path
77
+ else
78
+ return aab_path
79
+ end
73
80
  end
74
81
  end
75
82
 
@@ -20,7 +20,7 @@ module Fastlane
20
20
  # +custom_id+:: Custom id for app upload.
21
21
  # +file_path+:: Path to the file to be uploaded.
22
22
  # +url+:: BrowserStack's app upload endpoint.
23
- def self.upload_file(browserstack_username, browserstack_access_key, file_path, url, custom_id = nil)
23
+ def self.upload_file(browserstack_username, browserstack_access_key, file_path, url, custom_id = nil, ios_keychain_support = nil)
24
24
  payload = {
25
25
  multipart: true,
26
26
  file: File.new(file_path, 'rb')
@@ -30,6 +30,10 @@ module Fastlane
30
30
  payload[:data] = '{ "custom_id": "' + custom_id + '" }'
31
31
  end
32
32
 
33
+ unless ios_keychain_support.nil?
34
+ payload[:ios_keychain_support] = ios_keychain_support
35
+ end
36
+
33
37
  headers = {
34
38
  "User-Agent" => "browserstack_fastlane_plugin"
35
39
  }
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Browserstack
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-browserstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - BrowserStack
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-22 00:00:00.000000000 Z
11
+ date: 2025-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -156,7 +156,7 @@ dependencies:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
158
  version: 2.96.1
159
- description:
159
+ description:
160
160
  email: support@browserstack.com
161
161
  executables: []
162
162
  extensions: []
@@ -173,7 +173,7 @@ homepage: https://github.com/browserstack/browserstack-fastlane-plugin
173
173
  licenses:
174
174
  - MIT
175
175
  metadata: {}
176
- post_install_message:
176
+ post_install_message:
177
177
  rdoc_options: []
178
178
  require_paths:
179
179
  - lib
@@ -188,9 +188,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.7.6
193
- signing_key:
191
+ rubygems_version: 3.4.10
192
+ signing_key:
194
193
  specification_version: 4
195
194
  summary: Uploads IPA and APK files to BrowserStack for automation and manual testing.
196
195
  test_files: []