lib/contexto/contextualize.rb in contexto-0.3.0 vs lib/contexto/contextualize.rb in contexto-0.3.1
- old
+ new
@@ -42,11 +42,11 @@
if !container
show_tasks
return
elsif container
puts "\n"
- show_tasks(container)
+ show_tasks
end
end
def connect
task = describe_tasks
@@ -112,13 +112,13 @@
@display.create_display(title, headings, rows)
rescue Aws::ECS::Errors::ServiceNotFoundException
puts 'Service not found'
end
- def show_tasks(container = '')
+ def show_tasks
task = describe_tasks
if container
- containers = task[:containers].select { |c| container == c[:name] }
+ containers = task[:containers].select { |c| c[:name] == container }
else
containers = task[:containers]
end
ec2_instance_id = describe_container_instance(task[:container_instance_arn])
title = 'Containers'