neetodeploy 1.1.0 → 1.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: 8c161224698854e2f75b4befe191e37a59f6aad8149ec7a52d0c531fe73f1cd4
4
- data.tar.gz: a169636696ce3d36927d12bfa139f0e25fe4cc6377aa7ff16e20d94d078abbe5
3
+ metadata.gz: a03891d8e2bb57d65d109837071d4d416a09faecf35059872e9ea727a654c325
4
+ data.tar.gz: efa6c8a43607656b48c53e5412facee9d78473ecb49438ac9d4087fc7e5dd607
5
5
  SHA512:
6
- metadata.gz: ce56591c787b745570c5ea9bd8810cc88b9688ea1430523908a66fe81e97e358a9479b8810ef11fe36c74ca23de188e356db2fc58ef97e51db2db9f5e9b3af99
7
- data.tar.gz: 298de13cd65cfe66bf600857721fc7254d9752ab73acb89525697d983d520be238ff21c08b05f657e388743399199d26ee788908bd5dccd7326b1bd33c89395e
6
+ metadata.gz: fa4de530dd6a04af91879d23a6e1f1aa9142cf2beea23a2a14f0eff49b273f8e6a3f2b4bb23a16db06715c7cc0eefb4a87bd7978f6c813a9f9e92f629f659f2b
7
+ data.tar.gz: b574994b575a2480ad621318ffae3bc6619fc6c85409f97e17a7e30e693431104ea751a582c522c371ce7e93147d5eb9fb48a7fbe18ea26f86b5af7ffb7f6194
@@ -24,7 +24,7 @@ module NeetoDeploy
24
24
  puts "Opening console for #{app_name}"
25
25
 
26
26
  response = send_post_request(
27
- console_session_create_url, {
27
+ console_session_base_url, {
28
28
  # TODO refactor app_slug to app_name in dashboard app
29
29
  app_slug: app_name,
30
30
  }
@@ -38,9 +38,21 @@ module NeetoDeploy
38
38
 
39
39
  prompt = ''
40
40
 
41
+ delete_url = "#{console_session_base_url}/#{console_token}"
42
+ app_slug = app_name
43
+
44
+ send_delete_request = lambda do |url, body|
45
+ send_delete_request(url, body)
46
+ end
47
+
41
48
  ws.on :message do |msg|
42
49
  message = msg.data
43
50
  if message.to_s.eql?("{\"exitCode\":0,\"signal\":0}")
51
+ send_delete_request.call(
52
+ delete_url, {
53
+ app_slug:
54
+ }
55
+ )
44
56
  exit 0
45
57
  end
46
58
  cmd = message[0]
@@ -4,10 +4,10 @@ module NeetoDeploy
4
4
  class CLI
5
5
  module Exec
6
6
  module Constants
7
- NEETO_DEPLOY_CLI_API_CONSOLE_SESSION_CREATE_URL = "#{NEETO_DEPLOY_CLI_API_BASE_URL}/console_sessions".freeze
7
+ NEETO_DEPLOY_CLI_API_CONSOLE_SESSION_BASE_URL = "#{NEETO_DEPLOY_CLI_API_BASE_URL}/console_sessions".freeze
8
8
 
9
- def console_session_create_url
10
- NEETO_DEPLOY_CLI_API_CONSOLE_SESSION_CREATE_URL
9
+ def console_session_base_url
10
+ NEETO_DEPLOY_CLI_API_CONSOLE_SESSION_BASE_URL
11
11
  end
12
12
  end
13
13
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NeetoDeploy
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  CLI_API_VERSION = "v1"
6
6
  end
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.1.0
4
+ version: 1.1.1
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-08-31 00:00:00.000000000 Z
11
+ date: 2023-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv