neetodeploy 1.0.6 → 1.0.7
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 57fdd1e09457ce272efda43c36489b14a986c28541901a1f2663a69e8252d89f
|
|
4
|
+
data.tar.gz: 1f7db1e2c215d6b169cf93833972f510b349e27a55a137bac87b22441c70bbb2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7101aaa85fc0971619183648796c7e32f6df52f3a801c8fd6da8fcc61c9b6c1a36870113098287af5eb378cd44b7626a0a223006e0dbe4f009758df93a1c389
|
|
7
|
+
data.tar.gz: 312db594539b397fb47b89068707d8bdb6b9f1731aa23c61feff362564a68af1016241d4169f3bb6943e1ed04037387d0759136cfa3fe4a3ab89b0f131dbd718
|
|
@@ -5,7 +5,7 @@ require_relative "../version"
|
|
|
5
5
|
|
|
6
6
|
module NeetoDeploy
|
|
7
7
|
class CLI
|
|
8
|
-
NEETO_DEPLOY_HOST = ENV["NEETO_DEPLOY_HOST"] || "https://
|
|
8
|
+
NEETO_DEPLOY_HOST = ENV["NEETO_DEPLOY_HOST"] || "https://app.neetodeploy.net"
|
|
9
9
|
NEETO_DEPLOY_CLI_API_BASE_URL = "#{NEETO_DEPLOY_HOST}/api/cli/#{CLI_API_VERSION}"
|
|
10
10
|
|
|
11
11
|
CLI_CONFIG_DIR = "~/.config/neetodeploy".freeze
|
|
@@ -12,10 +12,11 @@ module NeetoDeploy
|
|
|
12
12
|
class Base < CLI::Base
|
|
13
13
|
include Constants
|
|
14
14
|
|
|
15
|
-
attr_accessor :login_token
|
|
15
|
+
attr_accessor :login_token, :org_subdomain
|
|
16
16
|
|
|
17
17
|
def process!
|
|
18
18
|
init_session
|
|
19
|
+
ask_for_org_subdomain
|
|
19
20
|
show_login_link_and_open_in_browser
|
|
20
21
|
wait_until_user_authenticates!
|
|
21
22
|
end
|
|
@@ -27,14 +28,27 @@ module NeetoDeploy
|
|
|
27
28
|
self.login_token = response["login_token"]
|
|
28
29
|
end
|
|
29
30
|
|
|
31
|
+
def ask_for_org_subdomain
|
|
32
|
+
ui.say(
|
|
33
|
+
<<~EOF
|
|
34
|
+
Welcome to neetoDeploy CLI. To get started, we need your organization's subdomain.
|
|
35
|
+
|
|
36
|
+
If your organization URL is "myorg.neetodeploy.com", your organization subdomain is "myorg".
|
|
37
|
+
More information: https://help.neetodeploy.com/articles/neetodeploy-cli
|
|
38
|
+
|
|
39
|
+
EOF
|
|
40
|
+
)
|
|
41
|
+
self.org_subdomain = ui.ask("Please enter the subdomain of your organization:")
|
|
42
|
+
end
|
|
43
|
+
|
|
30
44
|
def show_login_link_and_open_in_browser
|
|
31
45
|
ui.say(
|
|
32
46
|
<<~EOF
|
|
33
|
-
|
|
34
|
-
#{session_login_url}
|
|
47
|
+
The login page will be opened in your browser. If it didn't, please open this URL in your browser:
|
|
48
|
+
#{session_login_url(org_subdomain)}
|
|
35
49
|
EOF
|
|
36
50
|
)
|
|
37
|
-
Launchy.open(session_login_url)
|
|
51
|
+
Launchy.open(session_login_url(org_subdomain))
|
|
38
52
|
end
|
|
39
53
|
|
|
40
54
|
def wait_until_user_authenticates!
|
|
@@ -11,8 +11,9 @@ module NeetoDeploy
|
|
|
11
11
|
NEETO_DEPLOY_CLI_API_SESSIONS_URL
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def session_login_url
|
|
15
|
-
"#{
|
|
14
|
+
def session_login_url(org_subdomain)
|
|
15
|
+
org_url = NEETO_DEPLOY_HOST.sub("app.", "#{org_subdomain}.")
|
|
16
|
+
"#{org_url}/cli/login?token=#{login_token}"
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
def session_login_status_url
|
data/lib/neeto_deploy/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: neetodeploy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Subin Siby
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
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: dotenv
|