The duplication's tiny but probably the more import thing thing to address.

I agree about the formatting, it's fine untested. It's the "not set" in the
else portion of the ternary that looks like it might be significant and
might warrant a spec that expresses why it's needed.

Being unfamiliar with this part of the code, I'd find this spec useful
if/when I'd have to change it.

Thanks.

On Friday, August 30, 2013, Dr Nic Williams wrote:

> In bosh_cli_plugin_micro/lib/bosh/cli/commands/micro.rb:
>
> > @@ -98,6 +99,17 @@ def status
> >        say("Target".ljust(15) + target_name)
> >      end
> >
> > +    usage "micro ssh"
> > +    desc "Open SSH terminal or run a command via SSH upon micro BOSH instance"
> > +    def micro_ssh(*args)
> > +      username = "vcap"
> > +      host = URI.parse(target).host
> > +      target_name = config.target_name ? config.target_name.make_green : "not set".make_red
>
> Its just formatting. I can take out the red/green if you don't like it. I
> thought it looked pretty. I'm not testing the stdout at all. Is anyone else
> testing stdout?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cloudfoundry/bosh/pull/405/files#r6098960>
> .
>