fastlane-plugin-lambdatest 0.1.4 → 0.1.6

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: c0820213456b0a834ee874c54bdad4b98758ff5ae52943bf82dd14ad3fb86d83
4
- data.tar.gz: 8b788abac827cfb8c488e66bf34acc183ec9ff60dde6c41dec0b3bd936b4bfab
3
+ metadata.gz: a4161c59c27837cca67ca80599a10b40f40b9b4082767e9a84e97ffd98fdfb45
4
+ data.tar.gz: 1578b038a477b2dc96be21fe3e7e013aa77eed11055aa4859e79e133cff95643
5
5
  SHA512:
6
- metadata.gz: ee73db67bb89db27f4573d3b553335eac53d93231468e6538c0fbe2e1b24bc55f1e5337f587883d290c78225ae710bcc6f0c23d6420c5cbcbca6ba3e4a0d2d09
7
- data.tar.gz: 2733158773c44769f062dd6d6175c8c5c94733ec1fc4380c4da252ba1c756f22bef3b478090c19bba3dffc726cc98aceefa4c5c2226bac2f39f977ce2ff0cb95
6
+ metadata.gz: 79288b6688fd2162065dd9c74b8a0b900b847bb6523417537ed88006177581c371b9ecf6c3669f9851a9c417ee73990002117f8f70712126b8d335455588b0d2
7
+ data.tar.gz: 5cc8128429576c44a1ffc0434e0412eaa043e25d3cd7d76a451fff93e65bb9bdd143fb4c00e43bdda8854d8fe0431db3760a58a6cb6c676b34fac6139b0e443a
data/README.md CHANGED
@@ -22,15 +22,18 @@ upload_to_lambdatest(
22
22
  file_path: "app_file_path"
23
23
  )
24
24
  ```
25
- OR you can also use custom_id
26
- ```
27
- upload_to_lambdatest(
28
- lt_username: ENV["LT_USERNAME"],
29
- lt_access_key: ENV["LT_ACCESS_KEY"],
30
- file_path: "app_file_path",
31
- custom_id:"984792"
32
- )
33
- ```
25
+
26
+ ### Options
27
+
28
+ | Option | Description | Required | Default Value |
29
+ |---------------------|------------------------------------|----------|----------------
30
+ | `lt_username` | LambdaTest username (from ENV) | ✅ Yes | N/A |
31
+ | `lt_access_key` | LambdaTest access key (from ENV) | ✅ Yes | N/A |
32
+ | `file_path` | Path to the app file | ✅ Yes | N/A |
33
+ | `app_name` | App Name | ❌ No | "app" |
34
+ | `visibility` | Visibility | ❌ No | "individual" |
35
+ | `is_real_device` | Real Device or Virual Device | ❌ No | true |
36
+
34
37
 
35
38
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
36
39
 
@@ -9,7 +9,6 @@ module Fastlane
9
9
  end
10
10
  class UploadToLambdatestAction < Action
11
11
 
12
- API_ENDPOINT = "https://manual-api.lambdatest.com/app/upload/realDevice"
13
12
  SUPPORTED_EXTENSIONS = ["apk", "ipa", "aab"]
14
13
 
15
14
  def self.run(params)
@@ -19,12 +18,16 @@ module Fastlane
19
18
  custom_id = params[:custom_id] # Optional
20
19
  app_name = params[:app_name] #Optional
21
20
  visibility = params[:visibility] #Optional
21
+ is_real_device = params[:is_real_device] #Optional
22
+ ios_keychain_enabled = params[:ios_keychain_enabled] # Optional
22
23
 
23
- validate_file_path(file_path)
24
+ api_endpoint = self.get_api_endpoint(is_real_device)
25
+
26
+ self.validate_file_path(file_path)
24
27
 
25
28
  UI.message("Started Uploading app to Lambdatest...")
26
29
 
27
- lt_app_url = Helper::LambdatestHelper.upload_file(lt_username, lt_access_key, file_path, API_ENDPOINT, custom_id, app_name, visibility)
30
+ lt_app_url = Helper::LambdatestHelper.upload_file(lt_username, lt_access_key, file_path, api_endpoint, custom_id, app_name, visibility, ios_keychain_enabled)
28
31
 
29
32
  # Set 'APP_URL' environment variable, if app upload was successful.
30
33
  ENV['APP_URL'] = lt_app_url
@@ -38,6 +41,14 @@ module Fastlane
38
41
  Actions.lane_context[SharedValues::APP_URL] = lt_app_url
39
42
  end
40
43
 
44
+ def self.get_api_endpoint(is_real_device)
45
+ if is_real_device
46
+ "https://manual-api.lambdatest.com/app/upload/realDevice"
47
+ else
48
+ "https://manual-api.lambdatest.com/app/upload/virtualDevice"
49
+ end
50
+ end
51
+
41
52
  # Validating file_path and extension.
42
53
  def self.validate_file_path(file_path)
43
54
  UI.user_error!("file not found at '#{file_path}' ❌ .") unless File.exist?(file_path)
@@ -105,7 +116,19 @@ module Fastlane
105
116
  description: "Visibility",
106
117
  optional: true,
107
118
  is_string: true,
108
- default_value: "individual")
119
+ default_value: "individual"),
120
+ FastlaneCore::ConfigItem.new(key: :is_real_device,
121
+ description: "Real Device or Virtual Device",
122
+ optional: true,
123
+ is_string: false,
124
+ default_value: true,
125
+ type: Boolean),
126
+ FastlaneCore::ConfigItem.new(key: :ios_keychain_enabled,
127
+ description: "Enable iOS Keychain",
128
+ optional: true,
129
+ is_string: false,
130
+ default_value: nil,
131
+ type: Boolean)
109
132
  ]
110
133
  end
111
134
 
@@ -134,6 +157,7 @@ module Fastlane
134
157
  file_path: "path_to_app_file",
135
158
  app_name: "android_app",
136
159
  visibility: "team",
160
+ is_real_device: true
137
161
  )'
138
162
  ]
139
163
  end
@@ -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+:: Lambdatest's app upload endpoint.
23
- def self.upload_file(lt_username, lt_access_key, file_path, url, custom_id,app_name, visibility)
23
+ def self.upload_file(lt_username, lt_access_key, file_path, url, custom_id,app_name, visibility, ios_keychain_enabled)
24
24
  payload = {
25
25
  name: app_name,
26
26
  appFile: File.new(file_path, 'rb'),
@@ -31,6 +31,10 @@ module Fastlane
31
31
  payload[:custom_id] = custom_id
32
32
  end
33
33
 
34
+ unless ios_keychain_enabled.nil?
35
+ payload[:ios_keychain_enabled] = ios_keychain_enabled
36
+ end
37
+
34
38
  headers = {
35
39
  "User-Agent" => "fastlane_plugin_lambdatest"
36
40
  }
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Lambdatest
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-lambdatest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - LambdaTest
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-14 00:00:00.000000000 Z
11
+ date: 2025-07-14 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@lambdatest.com
161
161
  executables: []
162
162
  extensions: []
@@ -172,7 +172,7 @@ homepage: https://github.com/LambdaTest/lambdatest-fastlane-plugin
172
172
  licenses:
173
173
  - MIT
174
174
  metadata: {}
175
- post_install_message:
175
+ post_install_message:
176
176
  rdoc_options: []
177
177
  require_paths:
178
178
  - lib
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  version: '0'
189
189
  requirements: []
190
190
  rubygems_version: 3.1.2
191
- signing_key:
191
+ signing_key:
192
192
  specification_version: 4
193
193
  summary: fastlane plugin to upload app to lambdatest
194
194
  test_files: []