basho/riak-ruby-client — Issue #3: RObject#url doesn't know about load-balancing
Author: seancribbs
Created: 2012-01-12 21:02:10+00:00
State: open
Labels: bug

Moved from https://github.com/seancribbs/ripple/issues/249 by @johnae:

Below method in RObject to get the url doesn't know about load-balancing.

# Generates a URL representing the object according to the client, bucket and key.
# If the key is blank, the bucket URL will be returned (where the object will be
# submitted to when stored).
def url
segments = [ @bucket.client.http_paths[:prefix], escape(@bucket.name)]
segments << escape(@key) if @key
@bucket.client.http.path(*segments).to_s
end