soffes/hue — pull request #14 by asellitt (2014-06-13 13:22:05+00:00)
Title: Follow Redirects

http://www.meethue.com/api/nupnp now redirects to https://www.meethue.com/api/nupnp.

the bridge finder endpoint now redirects to a https version of itself.
There is no built in way to follow redirects using ruby libraries so i
implemented redirection based heavily on
http://ruby-doc.org/stdlib-2.1.2/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-Following+Redirection

essentially, this change will hit the http endpoint, and then follow it
to the https endpoint to resolve the bridge's local ip on the network.

This could have much more easily been implemented with:
```MultiJson.load(`curl -Ls http://www.meethue.com/api/nupnp`)``` but i
didn’t want to rely on the local environment having curl available.

Im really keen on getting this (or a fix for this issue) in, so please let me know what you think.