Class: Superbot::CLI::Cloud::Test::ListCommand
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Superbot::CLI::Cloud::Test::ListCommand
- Includes:
- Superbot::Cloud::Validations
- Defined in:
- lib/superbot/cloud/cli/cloud/test/list_command.rb
Instance Method Summary collapse
Methods included from Superbot::Cloud::Validations
Instance Method Details
#execute ⇒ Object
12 13 14 15 |
# File 'lib/superbot/cloud/cli/cloud/test/list_command.rb', line 12 def execute require_login list_tests end |
#list_tests ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/superbot/cloud/cli/cloud/test/list_command.rb', line 17 def list_tests api_response = Superbot::Cloud::Api.request(:test_list, params: { organization_name: organization }) abort api_response[:errors] if api_response[:errors] puts "Organization: #{api_response[:organization]}" puts "Tests:" api_response[:tests].each do |test| puts(test[:name], test[:files].map { |f| "- #{f[:filename]}" }) end end |