Permalink
Browse files

Docs and style updates.

  • Loading branch information...
1 parent 52725b0 commit 3247c3a3d24c8990d84aaaafd67b482476b773e6 @seancribbs seancribbs committed Jan 19, 2010
Showing with 8 additions and 6 deletions.
  1. +1 −1 README.textile
  2. +2 −1 lib/riak/bucket.rb
  3. +1 −0 lib/riak/invalid_response.rb
  4. +1 −1 lib/riak/link.rb
  5. +1 −1 lib/riak/robject.rb
  6. +2 −2 spec/bucket_spec.rb
View
@@ -18,7 +18,7 @@ h2. Note on Patches/Pull Requests
* Write an RSpec example, set of examples, and/or Cucumber story that demonstrate the necessity and validity of your changes. *Patches without specs will most often be ignored. Just do it, you'll thank me later.*
* Make your feature addition or bug fix. Make your specs and stories pass (green).
* Run the suite using multiruby or rvm to ensure cross-version compatibility.
-* Commit, do not mess with Rakefile or VERSION. If related to an existing issue in the tracker, include "Closes #X" in the commit message (where X is the issue number).
+* Commit, do not mess with Rakefile or VERSION. If related to an existing issue in the "tracker":http://github.com/seancribbs/ripple/issues, include "Closes #X" in the commit message (where X is the issue number).
* Send me a pull request.
h2. License
View
@@ -56,7 +56,7 @@ def load(response={})
# results of the operation will not be retained in the local Bucket object.
# @param [Hash] options extra options
# @yield [Array<String>] a list of keys from the current chunk
- # @option options [true] :reload (nil) If present, will force reloading of the bucket's keys from Riak
+ # @option options [Boolean] :reload (false) If present, will force reloading of the bucket's keys from Riak
# @return [Array<String>] Keys in this bucket
def keys(options={})
if block_given?
@@ -94,6 +94,7 @@ def get(key, options={})
RObject.load(self, key, response)
end
+ # @return [String] a representation suitable for IRB and debugging output
def inspect
"#<Riak::Bucket #{client.http.path(name).to_s}>"
end
@@ -14,6 +14,7 @@
require 'riak'
module Riak
+ # Raised when Riak returns a response that is in an unexpected format
class InvalidResponse < StandardError
def initialize(expected, received, extra="")
expected = expected.inspect if Hash === expected
View
@@ -14,7 +14,7 @@
require 'riak'
module Riak
- # Represents a link between various things in Riak
+ # Represents a link from one object to another in Riak
class Link
# @return [String] the URL (relative or absolute) of the related resource
View
@@ -165,7 +165,7 @@ def deserialize(body)
body
end
- # @return [String] A representation suitable for IRB and debugging output.
+ # @return [String] A representation suitable for IRB and debugging output
def inspect
"#<#{self.class.name} #{@bucket.client.http.path(@bucket.name, @key).to_s} [#{@content_type}]:#{@data.inspect}>"
end
View
@@ -75,12 +75,12 @@ def do_load(overrides={})
end
it "should load the keys if not present" do
- @http.should_receive(:get).with(200, "foo", {:props=>false}, {}).and_return({:headers => {"content-type" => ["application/json"]}, :body => '{"keys":["bar"]}'})
+ @http.should_receive(:get).with(200, "foo", {:props => false}, {}).and_return({:headers => {"content-type" => ["application/json"]}, :body => '{"keys":["bar"]}'})
@bucket.keys.should == ["bar"]
end
it "should allow reloading of the keys" do
- @http.should_receive(:get).with(200, "foo", {:props=>false}, {}).and_return({:headers => {"content-type" => ["application/json"]}, :body => '{"keys":["bar"]}'})
+ @http.should_receive(:get).with(200, "foo", {:props => false}, {}).and_return({:headers => {"content-type" => ["application/json"]}, :body => '{"keys":["bar"]}'})
do_load # Ensures they're already loaded
@bucket.keys(:reload => true).should == ["bar"]
end

0 comments on commit 3247c3a

Please sign in to comment.