fastlane-plugin-nativesting 0.1.2

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c228f7b138844b92c2ee1835be7a39425bcd611c96a132a9058c9395e62368fd
4
+ data.tar.gz: 9c0a3ebe081256c8c3f535207f82734ff0c7e82f56b84c4c4bb198e7f9e362c1
5
+ SHA512:
6
+ metadata.gz: 808d90273a51bd250ca0c2936af60fa8ebe0798e07ea363d698d0698c44a8e00f4a668eca4fb29bdd4146f8757e6f99346e8d9aff07d725dd883bfd7d25e14d8
7
+ data.tar.gz: 04fee60fe1d6e4080590350fa5d4aeb00be190077e42efadfa24613f235e83981d938f501da64d8899ca04a1f7f0fcdcbd4beeaf25d55d5dcea49d8d29d226cc
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Nativesging <info@nativesting.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # nativesting plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-nativesting)
4
+
5
+ ## Getting Started
6
+
7
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-nativesting`, add it to your project by running:
8
+
9
+ ```bash
10
+ fastlane add_plugin nativesting
11
+ ```
12
+
13
+ ## About nativesting
14
+
15
+ Seamlessly integration with nativesting.com
16
+
17
+ **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
18
+
19
+ ## Example
20
+
21
+ 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`.
22
+
23
+ **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
+
25
+ ## Run tests for this plugin
26
+
27
+ To run both the tests, and code style validation, run
28
+
29
+ ```
30
+ rake
31
+ ```
32
+
33
+ To automatically fix many of the styling issues, use
34
+ ```
35
+ rubocop -a
36
+ ```
37
+
38
+ ## Issues and Feedback
39
+
40
+ For any other issues and feedback about this plugin, please submit it to this repository.
41
+
42
+ ## Troubleshooting
43
+
44
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
45
+
46
+ ## Using _fastlane_ Plugins
47
+
48
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
49
+
50
+ ## About _fastlane_
51
+
52
+ _fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,86 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/nativesting_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class NativestingAction < Action
7
+ def self.run(params)
8
+ # Extract parameters
9
+ token = params[:token]
10
+ suite_case_id = params[:suite_case_id]
11
+ platform = params[:platform]
12
+ output_path = params[:output_path]
13
+
14
+ # Construct the URL
15
+ url = URI("https://api.nativesting.com/ci/download/#{suite_case_id}/#{platform}/#{token}")
16
+
17
+ # Create the output path directory if it doesn't exist
18
+ FileUtils.mkdir_p(output_path) unless File.directory?(output_path)
19
+
20
+ # Set the output file name and path
21
+ file_name = "nativesting_#{suite_case_id}_#{platform}.zip"
22
+ file_path = File.join(output_path, file_name)
23
+
24
+ # Download the file
25
+ download_file(url, file_path)
26
+
27
+ UI.success("File successfully downloaded to #{file_path}")
28
+ end
29
+
30
+ def self.download_file(url, file_path)
31
+ # Use Net::HTTP to download the file
32
+ Net::HTTP.start(url.host, url.port, use_ssl: url.scheme == 'https') do |http|
33
+ request = Net::HTTP::Get.new(url)
34
+
35
+ http.request(request) do |response|
36
+ open(file_path, 'wb') do |io|
37
+ response.read_body { |chunk| io.write(chunk) }
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ def self.description
44
+ "Seamlessly integration with nativesting.com"
45
+ end
46
+
47
+ def self.authors
48
+ ["Nativesting"]
49
+ end
50
+
51
+ def self.return_value
52
+ # If your method provides a return value, you can describe here what it does
53
+ end
54
+
55
+ def self.details
56
+ # Optional:
57
+ "Seamlessly integration with nativesting.com allowing you to generate and download test cases directly from the Nativesting platform."
58
+ end
59
+
60
+ def self.available_options
61
+ [
62
+ FastlaneCore::ConfigItem.new(key: :token,
63
+ description: "API Token for authentication",
64
+ optional: false,
65
+ type: String),
66
+ FastlaneCore::ConfigItem.new(key: :suite_case_id,
67
+ description: "Suite Case ID",
68
+ optional: false,
69
+ type: String),
70
+ FastlaneCore::ConfigItem.new(key: :platform,
71
+ description: "Platform (iOS or Android)",
72
+ optional: false,
73
+ type: String),
74
+ FastlaneCore::ConfigItem.new(key: :output_path,
75
+ description: "Output directory path",
76
+ optional: false,
77
+ type: String)
78
+ ]
79
+ end
80
+
81
+ def self.is_supported?(platform)
82
+ [:ios, :android].include?(platform)
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?(:UI)
5
+
6
+ module Helper
7
+ class NativestingHelper
8
+ # class methods that you define here become available in your action
9
+ # as `Helper::NativestingHelper.your_method`
10
+ #
11
+ def self.show_message
12
+ UI.message("Hello from the nativesting plugin helper!")
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module Nativesting
3
+ VERSION = "0.1.2"
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/nativesting/version'
2
+
3
+ module Fastlane
4
+ module Nativesting
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::Nativesting.all_classes.each do |current|
15
+ require current
16
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-nativesting
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Nativesting
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-09-09 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: info@nativesting.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - LICENSE
20
+ - README.md
21
+ - lib/fastlane/plugin/nativesting.rb
22
+ - lib/fastlane/plugin/nativesting/actions/nativesting_action.rb
23
+ - lib/fastlane/plugin/nativesting/helper/nativesting_helper.rb
24
+ - lib/fastlane/plugin/nativesting/version.rb
25
+ homepage: https://github.com/nativesting/fastlane-plugin-nativesting
26
+ licenses:
27
+ - MIT
28
+ metadata:
29
+ rubygems_mfa_required: 'true'
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '2.6'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubygems_version: 3.5.9
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: Seamlessly integration with nativesting.com
49
+ test_files: []