Class: NeetoDeploy::CLI::Apps::Base
- Defined in:
- lib/neeto_deploy/cli/apps/base.rb
Constant Summary
Constants included from Session
Constants included from Constants
Constants::NEETO_DEPLOY_CLI_API_V2_APPS_URL, Constants::NEETO_DEPLOY_CLI_V2_API_BASE_URL
Instance Attribute Summary collapse
-
#app_slug ⇒ Object
readonly
Returns the value of attribute app_slug.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(app_slug) ⇒ Base
constructor
A new instance of Base.
- #process! ⇒ Object
Methods included from Session
#auth_headers, #console_executable_name, #json_auth_headers, #os, require_app_option, #send_delete_request, #send_get_request, #send_patch_request, #send_post_request
Methods included from Constants
Methods inherited from Base
Constructor Details
#initialize(app_slug) ⇒ Base
Returns a new instance of Base.
18 19 20 21 |
# File 'lib/neeto_deploy/cli/apps/base.rb', line 18 def initialize(app_slug) super() @app_slug = app_slug end |
Instance Attribute Details
#app_slug ⇒ Object (readonly)
Returns the value of attribute app_slug.
16 17 18 |
# File 'lib/neeto_deploy/cli/apps/base.rb', line 16 def app_slug @app_slug end |
Instance Method Details
#process! ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/neeto_deploy/cli/apps/base.rb', line 23 def process! ui.execute_with_loading("Fetching app details...") do @response = send_get_request(app_details_url(app_slug), {}) end ui.error(@response["error"] || @response.) and return unless @response.success? parsed_response = JSON.parse(@response.body) app_data = parsed_response["app"] || parsed_response ui.info(JSON.pretty_generate(app_data)) end |