ezmobius/redis-rb — pull request #191 by gorsuch (2012-03-13 16:17:50+00:00)
Title: pass connection objects the original uri so they have more context

(perhaps a better way of handling my troubles in issue #189)

Currently, `Redis::Client` establishes a connection by passing `host`, `port` and `timeout`.

This changeset passes in the original `uri` that may or may not have been passed to `Redis`.

The advantage here is that future `Redis::Connection` objects can have a little more context as to why they were called.

I have a multi-transport connection class that needs to be able to inspect the original url and determine whether it should be connecting with the standard method (`redis://`), SSL (`redis+ssl://`) or websockets ('redis+ws://`). We believe that more transport types are likely to follow as our experiments continue.

Unfortunately, since connections aren't given this context, we can't make this determination. Our preferred course of action is to only have to change a given environment variable to enable the connection, as well as have a single application be able to connection to multiple redis instances over different transport mechanisms.

The above change should enable all of that, plus make way for others to experiment in a similar fashion.