README.md in redis-3.0.6 vs README.md in redis-3.0.7

- old
+ new

@@ -36,16 +36,32 @@ This assumes Redis was started with a default configuration, and is listening on `localhost`, port 6379. If you need to connect to a remote server or a different port, try: ```ruby -redis = Redis.new(:host => "10.0.1.1", :port => 6380) +redis = Redis.new(:host => "10.0.1.1", :port => 6380, :db => 15) ``` +You can also specify connection options as an URL: + +```ruby +redis = Redis.new(:url => "redis://:p4ssw0rd@10.0.1.1:6380/15") +``` + +By default, the client will try to read the `REDIS_URL` environment variable +and use that as URL to connect to. The above statement is therefore equivalent +to setting this environment variable and calling `Redis.new` without arguments. + To connect to Redis listening on a Unix socket, try: ```ruby redis = Redis.new(:path => "/tmp/redis.sock") +``` + +To connect to a password protected Redis instance, use: + +```ruby +redis = Redis.new(:password => "mysecret") ``` The Redis class exports methods that are named identical to the commands they execute. The arguments these methods accept are often identical to the arguments specified on the [Redis website][redis-commands]. For