fastlane-plugin-nowsecure 0.1.0 → 0.2.0

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: f810f888ddba9dab34d903684aa775b4f27b531bd42c2b7cbd770d9b628f61af
4
- data.tar.gz: 4602a91dd8f3c931d392df7d4fa04c845cc00e054717a10c504a955f6b5e2c5b
3
+ metadata.gz: 35c40adfc3db0ea29a93cde874e102c144ad8a17d574d665422623b20e33ce84
4
+ data.tar.gz: 1afd0803ded55f264daed358b5e2829494cbf39ae2e56ba91f45bad85b2d8cd6
5
5
  SHA512:
6
- metadata.gz: 9ec7d6efcdd031b872df57a502122605411d06d6e51afcc9fbacc4bc2b7e14e67361185b7af7abe916b0f282d4e93810538b70514dce091e6f0a4e39ce581d19
7
- data.tar.gz: 8edb25006903053883859231798d03388acd6b6a78561153fbf5d0bf71aa63ae90564314e9879e5e90132ea5e8e5399a8c8a20d01c926fc145a70926d9448273
6
+ metadata.gz: ad39fe220daa274365aed96df8ca37a33371b5655ee042cc0ad431ca41828f5a888b50f9390590fdaab7569900f7bad6337a20222911afc7af6802918f6a3ecc
7
+ data.tar.gz: 61173f53712c9d774480dd65e2d36cd085bb0fc4aa3ebbddcf0a92d6ca8662fd525f334b5d8d8137d4f223e357bcd4ec2eca94fe13a650351d2f8508b3f847a4
data/README.md CHANGED
@@ -30,6 +30,7 @@ Key | Environment Variable Equivalent | Description | Required?
30
30
  `nowsecure_token` | `NOWSECURE_TOKEN` | The API token for your NowSecure account | YES
31
31
  `nowsecure_group_id` | `NOWSECURE_GROUP_ID` | The Group ID for your NowSecure account | YES
32
32
  `nowsecure_app_path` | `NOWSECURE_APP_PATH` | File path of app to upload to NowSecure` | YES
33
+ `nowsecure_endpoint` | `NOWSECURE_ENDPOINT` | NowSecure Tenant Endpoint` | NO
33
34
 
34
35
  ## Example
35
36
 
@@ -23,11 +23,13 @@ module Fastlane
23
23
  nowsecure_group_id = params[:nowsecure_group_id]
24
24
  # File path of app to upload to NowSecure
25
25
  nowsecure_app_path = params[:nowsecure_app_path]
26
+ # the tenant endpoint for NowSecure
27
+ nowsecure_endpoint = params[:nowsecure_endpoint]
26
28
 
27
29
  UI.success("Uploading app to NowSecure")
28
30
  UI.success("This might take a few minutes. Please don't interrupt.")
29
31
  cmd = "curl --request POST \
30
- --url \"https://lab-api.nowsecure.com/build/?group=#{nowsecure_group_id}\" \
32
+ --url \"#{nowsecure_endpoint}/build/?group=#{nowsecure_group_id}\" \
31
33
  --header \"Authorization: Bearer #{nowsecure_token}\" \
32
34
  --header \"Content-Type: application/binary\" \
33
35
  --header \"Cache-Control: no-cache\" \
@@ -37,9 +39,9 @@ module Fastlane
37
39
  `#{cmd}`
38
40
  # Check exit code
39
41
  if $?.exitstatus != 0
40
- UI.shell_error!("NowSecure upload failed. Curl exit code #{$?.exitstatus}. See URL for meaning: https://everything.curl.dev/usingcurl/returns#available-exit-codes")
42
+ UI.shell_error!("🚫 NowSecure upload failed. Curl exit code #{$?.exitstatus}. See URL for meaning: https://everything.curl.dev/usingcurl/returns#available-exit-codes")
41
43
  end
42
- UI.success("Successfully uploaded app to NowSecure")
44
+ UI.success("Successfully uploaded app to NowSecure")
43
45
  end
44
46
 
45
47
  #####################################################
@@ -72,7 +74,13 @@ module Fastlane
72
74
  optional: false,
73
75
  verify_block: proc do |value|
74
76
  UI.user_error!("Could not find a file at '#{value}'") unless File.exist?(value)
75
- end)
77
+ end),
78
+ FastlaneCore::ConfigItem.new(key: :nowsecure_endpoint,
79
+ env_name: "NOWSECURE_ENDPOINT",
80
+ description: "NowSecure Tenant Endpoint",
81
+ optional: true,
82
+ default_value: "https://lab-api.nowsecure.com",
83
+ type: String)
76
84
  ]
77
85
  end
78
86
 
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Fastlane
5
5
  module Nowsecure
6
- VERSION = "0.1.0"
6
+ VERSION = "0.2.0"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-nowsecure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Obusek
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-06-30 00:00:00.000000000 Z
12
+ date: 2024-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler