neetodeploy 1.1.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c161224698854e2f75b4befe191e37a59f6aad8149ec7a52d0c531fe73f1cd4
4
- data.tar.gz: a169636696ce3d36927d12bfa139f0e25fe4cc6377aa7ff16e20d94d078abbe5
3
+ metadata.gz: c89f6daf95ba95dadcfcbfdf897ff3b9642003da42240d53a566549ab7c80039
4
+ data.tar.gz: 890eb532d959f1807b315d8fde953bbbe0590bca1b13abfd3f743a77d238b768
5
5
  SHA512:
6
- metadata.gz: ce56591c787b745570c5ea9bd8810cc88b9688ea1430523908a66fe81e97e358a9479b8810ef11fe36c74ca23de188e356db2fc58ef97e51db2db9f5e9b3af99
7
- data.tar.gz: 298de13cd65cfe66bf600857721fc7254d9752ab73acb89525697d983d520be238ff21c08b05f657e388743399199d26ee788908bd5dccd7326b1bd33c89395e
6
+ metadata.gz: c492b22e65f9e9f4eeccee4f0720346e94a42885efda1086bad9644414a216aea06dec6881b6764ed011867bb76a1132065c6fd77772e70d001c82e0950de4ac
7
+ data.tar.gz: ef3ca43ae3235150ca96ebbd5685ec744774ececa07bc8cf9c35f1267f641200de666f2afae80a28f291afcd214cec21979a158186de519c13ed141fdf405491
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neetodeploy (1.0.10)
4
+ neetodeploy (1.1.1)
5
5
  dotenv (~> 2.8.1)
6
6
  httparty (~> 0.21.0)
7
7
  launchy (~> 2.5.0)
@@ -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
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "thor"
4
4
  require_relative "./set"
5
+ require_relative "./get"
5
6
 
6
7
  module NeetoDeploy
7
8
  class CLI
@@ -15,6 +16,13 @@ module NeetoDeploy
15
16
  def set
16
17
  Set.new(options).run
17
18
  end
19
+
20
+ desc "get", "Get redis config"
21
+ option :addon_name, type: :string, aliases: "-n", required: true, desc: "Addon name"
22
+ option :key, type: :string, aliases: "-k", required: true, desc: "CONFIG name"
23
+ def get
24
+ Get.new(options).run
25
+ end
18
26
  end
19
27
  end
20
28
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "thor"
4
+ require_relative "../session"
5
+ require_relative "./constants"
6
+
7
+ module NeetoDeploy
8
+ class CLI
9
+ module Redis
10
+ class Get < CLI::Base
11
+ include Constants
12
+ include Session
13
+
14
+ attr_reader :addon_name, :key
15
+
16
+ def initialize(options)
17
+ super()
18
+ @addon_name = options[:addon_name]
19
+ @key = options[:key]
20
+ end
21
+
22
+ def run
23
+ response = send_patch_request(
24
+ config_vars_url, {
25
+ addon_name:,
26
+ command: "CONFIG get #{key}"
27
+ }
28
+ )
29
+
30
+ ui.error(response) and return unless response.success?
31
+
32
+ ui.success(response["message"])
33
+ end
34
+ end
35
+ end
36
+ end
37
+ 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.2"
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.2
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-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -121,6 +121,7 @@ files:
121
121
  - lib/neeto_deploy/cli/logs/base.rb
122
122
  - lib/neeto_deploy/cli/redis/commands.rb
123
123
  - lib/neeto_deploy/cli/redis/constants.rb
124
+ - lib/neeto_deploy/cli/redis/get.rb
124
125
  - lib/neeto_deploy/cli/redis/set.rb
125
126
  - lib/neeto_deploy/cli/session.rb
126
127
  - lib/neeto_deploy/cli/ui.rb