civo / cli-rubygem

Command line interface for interacting with Civo's cloud API
https://www.civo.com
MIT License
15 stars 4 forks source link

Implement check to see whether user multiple clusters #40

Closed kaihoffman closed 4 years ago

kaihoffman commented 4 years ago

If a user does not specify a cluster to install a kubernetes app to, checks if the user has multiple clusters. If only one cluster is found, installs specified app to that cluster. If multiple clusters found, lets user know. Closes #38 when merged

andyjeffries commented 4 years ago

I'd be tempted to just make Finder.detect_cluster(cluster) return the only cluster if cluster.blank? and there is only one cluster. Rather than have this logic in the level above Finder. Feels like it should be an internal feature of that method.

kaihoffman commented 4 years ago

I knew there was a more logical way to do it - sorry, clearly still cold-addled!

andyjeffries commented 4 years ago

No worries mate, we all sometimes need a second pair of eyes to spot something that would have jumped out to us on another day.

kaihoffman commented 4 years ago

I've done that and it's looking much simpler now :)