neetodeploy 1.1.26 → 1.1.27

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: 47ad21898f81d64148aa108316a77f64b143fe49f3d3c922a1e77ce6c2c22293
4
- data.tar.gz: 9edf8e55e2594f7e0ff41df9919b38d9df2d8023316e5d3156b889efbe4e6e60
3
+ metadata.gz: 9d867b65e0d1fb328960f3d9c0bb78ab71373c360a6bd76159d83245fb5f21d8
4
+ data.tar.gz: 72109ffde32c0cd529f40346bab655445edc5b4463c0f94471782652f71a28ad
5
5
  SHA512:
6
- metadata.gz: 1be748f7bae2c04057b42f971caa1b2d7a4b2ae945263d5709a183faf5cc51089be6ab78e9d7bb97682651ef81453d5d28d92f9b58381e680ec706c41974f977
7
- data.tar.gz: 84a68d7b3cc97a14698a7433d227a51e7bffbb7a3f2fb5a08a6e056d3d86e1ec9d653a9d6deb65f70dd1adc7a11b8f3348813b5286a3575a152f308c0a5431eb
6
+ metadata.gz: d9113ac07cf733b98b639963a092b38937b27adf96a52a7c3eb7c70b0e3af64df5550fe3fb8a0af525a77095b9ce6e3025bf7c2edd7375dc0a5598a136315ab8
7
+ data.tar.gz: dfdae9fac4d8a99a6387cdbee1f09358f055419bfbc8be6acb86c5de63f2278e60b23d3efd709b5c16fc6c0c3fe5d3b6d36b35600caf757f13e1b414240d06bb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neetodeploy (1.1.25)
4
+ neetodeploy (1.1.27)
5
5
  base64
6
6
  bigdecimal
7
7
  colorize
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "thor"
4
+ require "json"
5
+
6
+ require_relative "../session"
7
+ require_relative "./constants"
8
+
9
+ module NeetoDeploy
10
+ class CLI
11
+ module Apps
12
+ class Base < CLI::Base
13
+ include Constants
14
+ include Session
15
+
16
+ attr_reader :app_slug
17
+
18
+ def initialize(app_slug)
19
+ super()
20
+ @app_slug = app_slug
21
+ end
22
+
23
+ def process!
24
+ ui.execute_with_loading("Fetching app details...") do
25
+ @response = send_get_request(app_details_url(app_slug), {})
26
+ end
27
+
28
+ ui.error(@response["error"] || @response.message) and return unless @response.success?
29
+
30
+ parsed_response = JSON.parse(@response.body)
31
+ app_data = parsed_response["app"] || parsed_response
32
+ ui.info(JSON.pretty_generate(app_data))
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module NeetoDeploy
4
+ class CLI
5
+ module Apps
6
+ module Constants
7
+ NEETO_DEPLOY_CLI_V2_API_BASE_URL = "#{NEETO_DEPLOY_HOST}/api/cli/v2".freeze
8
+ NEETO_DEPLOY_CLI_API_V2_APPS_URL = "#{NEETO_DEPLOY_CLI_V2_API_BASE_URL}/apps".freeze
9
+
10
+ def app_details_url(app_slug)
11
+ "#{NEETO_DEPLOY_CLI_API_V2_APPS_URL}/#{app_slug}"
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -11,6 +11,7 @@ module NeetoDeploy
11
11
  require_relative "cli/login/base"
12
12
  require_relative "cli/exec/base"
13
13
  require_relative "cli/logs/base"
14
+ require_relative "cli/apps/base"
14
15
  require_relative "cli/env/commands"
15
16
  require_relative "cli/redis/commands"
16
17
  require_relative "cli/pg/commands"
@@ -50,6 +51,12 @@ module NeetoDeploy
50
51
  CLI::Logs::Base.new(options[:app], options[:process_type]).process!
51
52
  end
52
53
 
54
+ desc "apps", "Show app details"
55
+ option :app, type: :string, aliases: "-a", required: true, desc: "App slug"
56
+ def apps
57
+ CLI::Apps::Base.new(options[:app]).process!
58
+ end
59
+
53
60
  desc "redis", "Manage redis addons"
54
61
  subcommand "redis", Redis::Commands
55
62
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NeetoDeploy
4
- VERSION = "1.1.26"
4
+ VERSION = "1.1.27"
5
5
  CLI_API_VERSION = "v1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neetodeploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.26
4
+ version: 1.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subin Siby
@@ -228,6 +228,8 @@ files:
228
228
  - lib/neeto_deploy/cli/addon/constants.rb
229
229
  - lib/neeto_deploy/cli/addon/info.rb
230
230
  - lib/neeto_deploy/cli/addon/scheduled_exports_settings.rb
231
+ - lib/neeto_deploy/cli/apps/base.rb
232
+ - lib/neeto_deploy/cli/apps/constants.rb
231
233
  - lib/neeto_deploy/cli/autoscaling_config/commands.rb
232
234
  - lib/neeto_deploy/cli/autoscaling_config/constants.rb
233
235
  - lib/neeto_deploy/cli/autoscaling_config/list.rb