newrelic/centurion — pull request #28 by tdooner (2014-08-09 23:03:11+00:00)
Title: Handle Docker registry API inconsistency

I just opened [an issue here][1], but since this is a bug biting people now, I figure it's worth a fix here too.

The symptom is an error message like this:
```bash
» bundle exec centurion -p [project] -e [env] -a list
** Invoke environment:staging (first_time)
** Invoke environment:common (first_time)
** Execute environment:common
** Execute environment:staging
** Invoke list (first_time)
** Execute list
** Invoke list:tags (first_time)
** Execute list:tags
GET: https://registry.hub.docker.com//v1/repositories/centos/tags
E, [2014-08-09T15:59:45.695148 #18183] ERROR -- : Couldn't communicate with Registry: undefined method `[]' for nil:NilClass
```

This is caused because if the user is using the official Docker registry to host their images, the API response for /v1/repositories/:repo/tags is quite different than the current [open-source registry][2]'s response.

This commit / PR adds a standardization based on the URL of the registry. It's not perfect, but it seems likely to work for most folks.

[1]: https://github.com/docker/docker-registry/issues/517
[2]: https://github.com/docker/docker-registry