Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 77 lines (55 sloc) 3.183 kb
913de877 » seancribbs
2010-01-14 Update README and regenerate docs.
1 h1. ripple
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
2
913de877 » seancribbs
2010-01-14 Update README and regenerate docs.
3 ripple is a Ruby client/wrapper for Riak, Basho's distributed database.
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
4
5 h2. Dependencies
6
7ac6b1dc » seancribbs
2010-01-20 Update the readme with an example and some more dependency detail.
7 ripple requires ActiveSupport >=2.3. We highly recommend the "curb":http://curb.rubyforge.org/ gem for better HTTP client performance.
8
9 In development, you will also need these gems:
10
11 * jeweler
12 * rspec >= 1.2.9
13 * fakeweb >= 1.2
14 * curb >= 0.6
15 * rack >= 1.0
16 * yard >= 0.5.2
17
18 h2. Basic Example
19
20 <notextile><pre>require 'riak'
21
22 # Create a client interface
23 client = Riak::Client.new
24
25 # Retrieve a bucket
26 bucket = client.bucket("doc") # a Riak::Bucket
27
28 # Get an object from the bucket
29 object = bucket.get("index.html") # a Riak::RObject
30
31 # Change the object's data and save
32 object.data = "<html><body>Hello, world!</body></html>"
33 object.store
34
35 # Reload an object you already have
36 object.reload # Works if you have the key and vclock
37 object.reload :force => true # Reloads whether you have the vclock or not
38
39 # Access more like a hash, client[bucket][key]
40 client['doc']['index.html'] # the Riak::RObject</pre></notextile>
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
41
84b49f8a » seancribbs
2010-01-21 Change wording, add link to Readme.
42 h2. How to Contribute
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
43
84b49f8a » seancribbs
2010-01-21 Change wording, add link to Readme.
44 * Fork the project on "Github":http://github.com/seancribbs/ripple. If you have already forked, use @git pull --rebase@ to reapply your changes on top of the mainline. Example:
cb8bf690 » seancribbs
2010-01-20 More readme updates.
45 <notextile><pre>$ git checkout master
46 $ git pull --rebase seancribbs master</pre></notextile>
9f15657f » seancribbs
2010-01-15 Add more specs for storing an object.
47 * Create a topic branch. If you've already created a topic branch, rebase it on top of changes from the mainline "master" branch. Examples:
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
48 ** New branch:
49 <pre>$ git checkout -b topic</pre>
50 ** Existing branch:
51 <pre>$ git rebase master</pre>
9f15657f » seancribbs
2010-01-15 Add more specs for storing an object.
52 * 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.*
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
53 * Make your feature addition or bug fix. Make your specs and stories pass (green).
54 * Run the suite using multiruby or rvm to ensure cross-version compatibility.
3247c3a3 » seancribbs
2010-01-19 Docs and style updates.
55 * 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).
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
56 * Send me a pull request.
57
cb8bf690 » seancribbs
2010-01-20 More readme updates.
58 h2. License & Copyright
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
59
91ef92c5 » seancribbs
2010-01-23 Add license for the picture.
60 Copyright &copy;2010 Sean Cribbs, Sonian Inc., and Basho Technologies, Inc.
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
61
cb8bf690 » seancribbs
2010-01-20 More readme updates.
62 Licensed under the Apache License, Version 2.0 (the "License");
63 you may not use this file except in compliance with the License.
64 You may obtain a copy of the License at
785e7ac9 » seancribbs
2010-01-13 Help YARD with our redefinition of Object, update README.
65
cb8bf690 » seancribbs
2010-01-20 More readme updates.
66 "http://www.apache.org/licenses/LICENSE-2.0":http://www.apache.org/licenses/LICENSE-2.0
67
68 Unless required by applicable law or agreed to in writing, software
69 distributed under the License is distributed on an "AS IS" BASIS,
70 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71 See the License for the specific language governing permissions and
72 limitations under the License.
91ef92c5 » seancribbs
2010-01-23 Add license for the picture.
73
74 h2. Auxillary License
75
76 The included photo (spec/fixtures/cat.jpg) is Copyright &copy;2009 "Sean Cribbs":http://seancribbs.com/, and is
77 licensed under the "Creative Commons Attribution Non-Commercial 3.0":http://creativecommons.org/licenses/by-nc/3.0 license. !http://i.creativecommons.org/l/by-nc/3.0/88x31.png!
Something went wrong with that request. Please try again.