fastlane-plugin-lambdatest 0.1.0 → 0.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 603520ec324583e3ea5588648f364c60c3ac34d05bebc5b369e86d6c8f7c7333
|
4
|
+
data.tar.gz: bbb4f99203e78d0f93c92e96d8d7da4966cfd3cb81460601db6995dcbf9904f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69ee3af8c53a29ca2ecca3500f5b91957be29b3ac19bde0e462d5d614075722eef4a9c38d1890adc66ba7a16f06ce294d39b4e18bba8deb1faaf1ff45cfc9a64
|
7
|
+
data.tar.gz: 71f9007d3e2f51044e0dc6e13953db9ad99f499011a4adb8e967d280d62127ea26d2ee78e56a5d740a95f49e27d7b180d598ffb00a60079fa97f0c557166e627
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2023 lambdatest <
|
3
|
+
Copyright (c) 2023 lambdatest <support@lambdatest.com>
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
![LambdaTest Logo](https://www.lambdatest.com/resources/images/logos/logo.svg)
|
2
|
+
|
1
3
|
# lambdatest plugin
|
2
4
|
|
3
5
|
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-lambdatest)
|
@@ -9,19 +9,20 @@ module Fastlane
|
|
9
9
|
end
|
10
10
|
class UploadToLambdatestAction < Action
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
API_ENDPOINT = "https://manual-api.lambdatest.com/app/upload/realDevice"
|
13
|
+
SUPPORTED_EXTENSIONS = ["apk", "ipa", "aab"]
|
14
14
|
|
15
15
|
def self.run(params)
|
16
16
|
lt_username = params[:lt_username] # Required
|
17
17
|
lt_access_key = params[:lt_access_key] # Required
|
18
18
|
file_path = params[:file_path].to_s # Required
|
19
|
+
custom_id = params[:custom_id] # Optional
|
19
20
|
|
20
21
|
validate_file_path(file_path)
|
21
22
|
|
22
23
|
UI.message("Started Uploading app to Lambdatest...")
|
23
24
|
|
24
|
-
lt_app_url = Helper::LambdatestHelper.upload_file(lt_username, lt_access_key, file_path,
|
25
|
+
lt_app_url = Helper::LambdatestHelper.upload_file(lt_username, lt_access_key, file_path, API_ENDPOINT,custom_id)
|
25
26
|
|
26
27
|
# Set 'APP_URL' environment variable, if app upload was successful.
|
27
28
|
ENV['APP_URL'] = lt_app_url
|
@@ -35,14 +36,12 @@ module Fastlane
|
|
35
36
|
Actions.lane_context[SharedValues::APP_URL] = lt_app_url
|
36
37
|
end
|
37
38
|
|
38
|
-
#
|
39
|
+
# Validating file_path and extension.
|
39
40
|
def self.validate_file_path(file_path)
|
40
41
|
UI.user_error!("file not found at '#{file_path}' ❌ .") unless File.exist?(file_path)
|
41
|
-
|
42
|
-
# Validate file extension.
|
43
42
|
file_path_parts = file_path.split(".")
|
44
|
-
unless file_path_parts.length > 1 &&
|
45
|
-
UI.user_error!("Invalid file extension, only files with extensions " +
|
43
|
+
unless file_path_parts.length > 1 && SUPPORTED_EXTENSIONS.include?(file_path_parts.last)
|
44
|
+
UI.user_error!("Invalid file extension, only files with extensions " + SUPPORTED_EXTENSIONS.to_s + " are allowed to be uploaded.")
|
46
45
|
end
|
47
46
|
end
|
48
47
|
|
@@ -89,7 +88,11 @@ module Fastlane
|
|
89
88
|
description: "app file path",
|
90
89
|
optional: true,
|
91
90
|
is_string: true,
|
92
|
-
default_value: default_file_path)
|
91
|
+
default_value: default_file_path),
|
92
|
+
FastlaneCore::ConfigItem.new(key: :custom_id,
|
93
|
+
description: "Custom ID",
|
94
|
+
optional: true,
|
95
|
+
is_string: false)
|
93
96
|
]
|
94
97
|
end
|
95
98
|
|
@@ -22,12 +22,12 @@ module Fastlane
|
|
22
22
|
# +url+:: Lambdatest's app upload endpoint.
|
23
23
|
def self.upload_file(lt_username, lt_access_key, file_path, url, custom_id = nil)
|
24
24
|
payload = {
|
25
|
-
name: "
|
25
|
+
name: "app",
|
26
26
|
appFile: File.new(file_path, 'rb')
|
27
27
|
}
|
28
28
|
|
29
29
|
unless custom_id.nil?
|
30
|
-
payload[:
|
30
|
+
payload[:custom_id] = custom_id
|
31
31
|
end
|
32
32
|
|
33
33
|
headers = {
|
@@ -44,9 +44,7 @@ module Fastlane
|
|
44
44
|
)
|
45
45
|
response_json = JSON.parse(response.to_s)
|
46
46
|
|
47
|
-
if !response_json["
|
48
|
-
return response_json["custom_id"]
|
49
|
-
else
|
47
|
+
if !response_json["app_url"].nil?
|
50
48
|
return response_json["app_url"]
|
51
49
|
end
|
52
50
|
rescue RestClient::ExceptionWithResponse => err
|
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
|
+
version: 0.1.1
|
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-05-
|
11
|
+
date: 2023-05-16 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
|
@@ -187,8 +187,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
|
-
rubygems_version: 3.0.1
|
191
|
-
signing_key:
|
190
|
+
rubygems_version: 3.0.3.1
|
191
|
+
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: fastlane plugin to upload app to lambdatest
|
194
194
|
test_files: []
|