neetodeploy 1.1.25 → 1.1.26

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: a0396bbc473e87998286bdc95905c601721c24787da18a64e7ab67a9cd42ddfa
4
- data.tar.gz: 8d002597268fcca2205aa42a5fcdeb371f2a9edcbdfeb14ff80bff449407b7e0
3
+ metadata.gz: 47ad21898f81d64148aa108316a77f64b143fe49f3d3c922a1e77ce6c2c22293
4
+ data.tar.gz: 9edf8e55e2594f7e0ff41df9919b38d9df2d8023316e5d3156b889efbe4e6e60
5
5
  SHA512:
6
- metadata.gz: 0f07f591022176db4bd74ab0b6a5c3839634c728f5db28cef1cd504d2ff728fcec857fe84d85a9c02ba9b01a99a56d1086d41c023a318d789b5f3b26ddcd32b0
7
- data.tar.gz: d7bc9e789cf2174cca1beb3fc37b816ceeb7d554fab45be4d50e46d24d0f4cec7d4f1d094b78f5b22847f46c59bf65c125317fa7180c307cfb202a07d8e5286b
6
+ metadata.gz: 1be748f7bae2c04057b42f971caa1b2d7a4b2ae945263d5709a183faf5cc51089be6ab78e9d7bb97682651ef81453d5d28d92f9b58381e680ec706c41974f977
7
+ data.tar.gz: 84a68d7b3cc97a14698a7433d227a51e7bffbb7a3f2fb5a08a6e056d3d86e1ec9d653a9d6deb65f70dd1adc7a11b8f3348813b5286a3575a152f308c0a5431eb
@@ -28,6 +28,7 @@ module NeetoDeploy
28
28
 
29
29
  def process!
30
30
  start_spinner
31
+ print_github_repo_name
31
32
  response = fetch_logs
32
33
  @spinner.stop
33
34
 
@@ -65,6 +66,17 @@ module NeetoDeploy
65
66
  send_get_request(logs_v2_url, params)
66
67
  end
67
68
 
69
+ def print_github_repo_name
70
+ response = send_get_request(app_details_url(app_slug), {})
71
+ return unless response.success?
72
+
73
+ data = JSON.parse(response.body)
74
+ repo_name = data.dig("app", "github_repo_name").to_s
75
+ ui.info("GitHub repository: #{repo_name}") if repo_name.strip != ""
76
+ rescue StandardError
77
+ nil
78
+ end
79
+
68
80
  def poll_for_logs
69
81
  loop do
70
82
  response = fetch_logs(after_timestamp_ms: @last_timestamp_ms)
@@ -5,11 +5,16 @@ module NeetoDeploy
5
5
  module Logs
6
6
  module Constants
7
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
8
9
  NEETO_DEPLOY_CLI_API_V2_LOGS_URL = "#{NEETO_DEPLOY_CLI_V2_API_BASE_URL}/logs".freeze
9
10
 
10
11
  def logs_v2_url
11
12
  NEETO_DEPLOY_CLI_API_V2_LOGS_URL
12
13
  end
14
+
15
+ def app_details_url(app_slug)
16
+ "#{NEETO_DEPLOY_CLI_API_V2_APPS_URL}/#{app_slug}"
17
+ end
13
18
  end
14
19
  end
15
20
  end
@@ -19,7 +19,7 @@ module NeetoDeploy
19
19
  end
20
20
 
21
21
  def send_get_request(url, body)
22
- HTTParty.get(url, { body: common_body.merge(body), format: :json })
22
+ HTTParty.get(url, { query: common_body.merge(body), format: :json })
23
23
  end
24
24
 
25
25
  def send_post_request(url, body)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NeetoDeploy
4
- VERSION = "1.1.25"
4
+ VERSION = "1.1.26"
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.25
4
+ version: 1.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subin Siby
@@ -283,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
283
  - !ruby/object:Gem::Version
284
284
  version: '0'
285
285
  requirements: []
286
- rubygems_version: 3.4.19
286
+ rubygems_version: 3.5.10
287
287
  signing_key:
288
288
  specification_version: 4
289
289
  summary: CLI for neetoDeploy