Sha256: 2432ef44b0c8cac12d65a9c60d9eedc1cdbb4cb56211738cf2d5dd68d9347389
Contents?: true
Size: 751 Bytes
Versions: 15
Compression:
Stored size: 751 Bytes
Contents
module Jets::Command class ProjectsCommand < Base # :nodoc: desc "projects", "List deployed projects" long_desc Help.text(:projects) paging_options.call def perform no_token_exit! resp = Jets::Api::Project.list(paging_params) check_for_error_message!(resp) data = resp["data"] if data.empty? $stderr.puts "No projects deployed yet." else show_items(data) end rescue Jets::Api::RequestError => e puts "WARNING: Unable to list projects. #{e.class}: #{e.message}" end private def show_items(items) presenter = CliFormat::Presenter.new presenter.header = ["Name"] items.each do |item| puts item["name"] end end end end
Version data entries
15 entries across 15 versions & 1 rubygems