better-ripple 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/LICENSE +17 -0
  2. data/README.md +182 -0
  3. data/RELEASE_NOTES.md +284 -0
  4. data/better-ripple.gemspec +55 -0
  5. data/lib/rails/generators/ripple/configuration/configuration_generator.rb +13 -0
  6. data/lib/rails/generators/ripple/configuration/templates/ripple.yml +25 -0
  7. data/lib/rails/generators/ripple/js/js_generator.rb +13 -0
  8. data/lib/rails/generators/ripple/js/templates/js/contrib.js +63 -0
  9. data/lib/rails/generators/ripple/js/templates/js/iso8601.js +76 -0
  10. data/lib/rails/generators/ripple/js/templates/js/ripple.js +132 -0
  11. data/lib/rails/generators/ripple/model/model_generator.rb +20 -0
  12. data/lib/rails/generators/ripple/model/templates/model.rb.erb +10 -0
  13. data/lib/rails/generators/ripple/observer/observer_generator.rb +16 -0
  14. data/lib/rails/generators/ripple/observer/templates/observer.rb.erb +2 -0
  15. data/lib/rails/generators/ripple/test/templates/cucumber.rb.erb +7 -0
  16. data/lib/rails/generators/ripple/test/test_generator.rb +44 -0
  17. data/lib/rails/generators/ripple_generator.rb +79 -0
  18. data/lib/ripple.rb +86 -0
  19. data/lib/ripple/associations.rb +380 -0
  20. data/lib/ripple/associations/embedded.rb +35 -0
  21. data/lib/ripple/associations/instantiators.rb +26 -0
  22. data/lib/ripple/associations/linked.rb +65 -0
  23. data/lib/ripple/associations/many.rb +38 -0
  24. data/lib/ripple/associations/many_embedded_proxy.rb +39 -0
  25. data/lib/ripple/associations/many_linked_proxy.rb +66 -0
  26. data/lib/ripple/associations/many_reference_proxy.rb +95 -0
  27. data/lib/ripple/associations/many_stored_key_proxy.rb +76 -0
  28. data/lib/ripple/associations/one.rb +20 -0
  29. data/lib/ripple/associations/one_embedded_proxy.rb +35 -0
  30. data/lib/ripple/associations/one_key_proxy.rb +58 -0
  31. data/lib/ripple/associations/one_linked_proxy.rb +26 -0
  32. data/lib/ripple/associations/one_stored_key_proxy.rb +43 -0
  33. data/lib/ripple/associations/proxy.rb +118 -0
  34. data/lib/ripple/attribute_methods.rb +132 -0
  35. data/lib/ripple/attribute_methods/dirty.rb +59 -0
  36. data/lib/ripple/attribute_methods/query.rb +34 -0
  37. data/lib/ripple/attribute_methods/read.rb +28 -0
  38. data/lib/ripple/attribute_methods/write.rb +25 -0
  39. data/lib/ripple/callbacks.rb +71 -0
  40. data/lib/ripple/conflict/basic_resolver.rb +86 -0
  41. data/lib/ripple/conflict/document_hooks.rb +46 -0
  42. data/lib/ripple/conflict/resolver.rb +79 -0
  43. data/lib/ripple/conflict/test_helper.rb +34 -0
  44. data/lib/ripple/conversion.rb +29 -0
  45. data/lib/ripple/core_ext.rb +3 -0
  46. data/lib/ripple/core_ext/casting.rb +151 -0
  47. data/lib/ripple/core_ext/indexes.rb +89 -0
  48. data/lib/ripple/core_ext/object.rb +8 -0
  49. data/lib/ripple/document.rb +105 -0
  50. data/lib/ripple/document/bucket_access.rb +25 -0
  51. data/lib/ripple/document/finders.rb +131 -0
  52. data/lib/ripple/document/key.rb +35 -0
  53. data/lib/ripple/document/link.rb +30 -0
  54. data/lib/ripple/document/persistence.rb +130 -0
  55. data/lib/ripple/embedded_document.rb +63 -0
  56. data/lib/ripple/embedded_document/around_callbacks.rb +18 -0
  57. data/lib/ripple/embedded_document/finders.rb +26 -0
  58. data/lib/ripple/embedded_document/persistence.rb +75 -0
  59. data/lib/ripple/i18n.rb +5 -0
  60. data/lib/ripple/indexes.rb +151 -0
  61. data/lib/ripple/inspection.rb +32 -0
  62. data/lib/ripple/locale/en.yml +26 -0
  63. data/lib/ripple/locale/fr.yml +24 -0
  64. data/lib/ripple/nested_attributes.rb +275 -0
  65. data/lib/ripple/observable.rb +28 -0
  66. data/lib/ripple/properties.rb +74 -0
  67. data/lib/ripple/property_type_mismatch.rb +12 -0
  68. data/lib/ripple/railtie.rb +26 -0
  69. data/lib/ripple/railties/ripple.rake +103 -0
  70. data/lib/ripple/serialization.rb +82 -0
  71. data/lib/ripple/test_server.rb +35 -0
  72. data/lib/ripple/timestamps.rb +25 -0
  73. data/lib/ripple/translation.rb +18 -0
  74. data/lib/ripple/validations.rb +65 -0
  75. data/lib/ripple/validations/associated_validator.rb +43 -0
  76. data/lib/ripple/version.rb +3 -0
  77. metadata +310 -0
data/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ Copyright 2010-2011 Sean Cribbs and Basho Technologies, Inc.
2
+ Improvements Copyright ©2012 Cloudability Inc.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ All of the files in this project are under the project-wide license
17
+ unless they are otherwise marked.
data/README.md ADDED
@@ -0,0 +1,182 @@
1
+ # `better-ripple`: Riak Document Models
2
+
3
+ `better-ripple` is an improved version of `ripple`, the rich Ruby modeling
4
+ layer for Riak, Basho's distributed database that contains an ActiveModel-based
5
+ document abstraction which is inspired by ActiveRecord, DataMapper, and
6
+ MongoMapper.
7
+
8
+
9
+ ## Improvements vs. ripple
10
+
11
+ To date, the improvements include:
12
+
13
+ * Use `better-riak-client` instead of `riak-client`.
14
+ * Better handling of gemspec generation (fixed Redstorm compatibility).
15
+
16
+ We will be tracking upstream changes, and including them as appropriate.
17
+
18
+ Release 1.0.0 corresponds to `ripple` v.1.0.0.beta2, plus changes on
19
+ `master` as of 2012-10-09. See `RELEASE_NOTES.md` for details.
20
+
21
+
22
+ ## Dependencies
23
+
24
+ `better-ripple` requires Ruby 1.8.7 or later and versions 3 or above of
25
+ ActiveModel and ActiveSupport (and their dependencies, including
26
+ i18n). Naturally, it also depends on the `better-riak-client` gem to connect
27
+ to Riak.
28
+
29
+ Development dependencies are handled with bundler. Install bundler
30
+ (`gem install bundler`) and run this command in each sub-project to
31
+ get started:
32
+
33
+ ``` bash
34
+ $ bundle install
35
+ ```
36
+
37
+ Run the RSpec suite using `bundle exec`:
38
+
39
+ ``` bash
40
+ $ bundle exec rake spec
41
+ ```
42
+
43
+ ## Document Model Examples
44
+
45
+ ``` ruby
46
+ require 'ripple'
47
+
48
+ # Documents are stored as JSON objects in Riak but have rich
49
+ # semantics, including validations and associations.
50
+ class Email
51
+ include Ripple::Document
52
+ property :from, String, :presence => true
53
+ property :to, String, :presence => true
54
+ property :sent, Time, :default => proc { Time.now }
55
+ property :body, String
56
+ end
57
+
58
+ email = Email.find("37458abc752f8413e") # GET /riak/emails/37458abc752f8413e
59
+ email.from = "someone@nowhere.net"
60
+ email.save # PUT /riak/emails/37458abc752f8413e
61
+
62
+ reply = Email.new
63
+ reply.from = "justin@bashoooo.com"
64
+ reply.to = "sean@geeemail.com"
65
+ reply.body = "Riak is a good fit for scalable Ruby apps."
66
+ reply.save # POST /riak/emails (Riak-assigned key)
67
+
68
+ # Documents can contain embedded documents, and link to other standalone documents
69
+ # via associations using the many and one class methods.
70
+ class Person
71
+ include Ripple::Document
72
+ property :name, String
73
+ many :addresses
74
+ many :friends, :class_name => "Person"
75
+ one :account
76
+ end
77
+
78
+ # Account and Address are embeddable documents
79
+ class Account
80
+ include Ripple::EmbeddedDocument
81
+ property :paid_until, Time
82
+ embedded_in :person # Adds "person" method to get parent document
83
+ end
84
+
85
+ class Address
86
+ include Ripple::EmbeddedDocument
87
+ property :street, String
88
+ property :city, String
89
+ property :state, String
90
+ property :zip, String
91
+ end
92
+
93
+ person = Person.find("adamhunter")
94
+ person.friends << Person.find("seancribbs") # Links to people/seancribbs with tag "friend"
95
+ person.addresses << Address.new(:street => "100 Main Street") # Adds an embedded address
96
+ person.account.paid_until = 3.months.from_now
97
+ ```
98
+
99
+
100
+ ## Configuration Example
101
+
102
+ When using Ripple with Rails 3, add ripple to your Gemfile and then run the `ripple` generator. This will generate a test harness, some MapReduce functions and a configuration file. Example:
103
+
104
+ ```
105
+ $ rails g ripple
106
+ create config/ripple.yml
107
+ create app/mapreduce
108
+ create app/mapreduce/contrib.js
109
+ create app/mapreduce/ripple.js
110
+ create test/ripple_test_helper.rb
111
+ insert test/test_helper.rb
112
+ insert test/test_helper.rb
113
+ ```
114
+
115
+ `config/ripple.yml` should contain your Riak connection information, and settings for the test server. Example:
116
+
117
+ ``` yaml
118
+ # Configure Riak connections for the Ripple library.
119
+ development:
120
+ http_port: 8098
121
+ pb_port: 8087
122
+ host: 127.0.0.1
123
+
124
+ # The test environment has additional keys for configuring the
125
+ # Riak::TestServer for your test/spec suite:
126
+ #
127
+ # * bin_dir specifies the path to the "riak" script that you use to
128
+ # start Riak (just the directory)
129
+ # * js_source_dir specifies where your custom Javascript functions for
130
+ # MapReduce should be loaded from. Usually app/mapreduce.
131
+ test:
132
+ http_port: 9000
133
+ pb_port: 9002
134
+ host: 127.0.0.1
135
+ bin_dir: /usr/local/bin # Default for Homebrew.
136
+ js_source_dir: <%%= Rails.root + "app/mapreduce" %>
137
+
138
+ production:
139
+ http_port: 8098
140
+ pb_port: 8087
141
+ host: 127.0.0.1
142
+ ```
143
+
144
+ `require 'ripple/railtie'` from your `config/application.rb` file to complete the integration.
145
+
146
+
147
+ ## How to Contribute
148
+
149
+ * Fork the project on [Github](http://github.com/cloudability/better-ripple). If you have already forked, use `git pull --rebase` to reapply your changes on top of the mainline. Example:
150
+
151
+ ``` bash
152
+ $ git checkout master
153
+ $ git pull --rebase cloudability master
154
+ ```
155
+ * Create a topic branch. If you've already created a topic branch, rebase it on top of changes from the mainline "master" branch. Examples:
156
+ * New branch:
157
+
158
+ ``` bash
159
+ $ git checkout -b topic
160
+ ```
161
+ * Existing branch:
162
+
163
+ ``` bash
164
+ $ git rebase master
165
+ ```
166
+ * Write an RSpec example or set of examples 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.** Documentation patches need no specs, of course.
167
+ * Make your feature addition or bug fix. Make your specs and stories pass (green).
168
+ * Run the suite using multiruby or rvm to ensure cross-version compatibility.
169
+ * Cleanup any trailing whitespace in your code (try @whitespace-mode@ in Emacs, or "Remove Trailing Spaces in Document" in the "Text" bundle in Textmate).
170
+ * Commit, do not mess with Rakefile or VERSION. If related to an existing issue in the [tracker](http://github.com/cloudability/better-ripple/issues), include "Closes #X" in the commit message (where X is the issue number).
171
+ * Send me a pull request.
172
+
173
+ ## License & Copyright
174
+
175
+ Copyright &copy;2010-2012 Sean Cribbs and Basho Technologies, Inc.
176
+ Improvements Copyright &copy;2012 Cloudability Inc.
177
+
178
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
179
+
180
+ [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
181
+
182
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
data/RELEASE_NOTES.md ADDED
@@ -0,0 +1,284 @@
1
+ # Ripple Release Notes
2
+
3
+ ## 1.0.0 Patch/Feature Release - 2012-10-09
4
+
5
+ Release 1.0.0 fixes gemspec generation and uses `better-riak-client`.
6
+
7
+ This release corresponds to `ripple` v.1.0.0.beta2, plus changes on
8
+ `master` as of 2012-10-09 (commit f866ddd5e2b0a11bb11bd29683f4f41f5c1bca22).
9
+
10
+ Improvements:
11
+
12
+ * Change gemspec handling to facilitate working with stock Redstorm.
13
+
14
+ Upstream Changes:
15
+
16
+ * Do not replace accessors defined by superclass. (Fixes ActiveModel 3.2 issue)
17
+
18
+
19
+ ## 0.9.5 Patch Release - 2011-06-14
20
+
21
+ Release 0.9.5 is a minor bugfix release but also includes some small features.
22
+
23
+ * Allow IO-like objects to be used as RObject data. [Josh Nichols]
24
+ * Set the content-length or transfer-encoding appropriately for Net::HTTP. Fixes #162.
25
+ * Fix MapReduce jobs on PBC when keep=false on certain phases. [Alexander Lang]
26
+ * Invalidate the key-cache for a bucket when streaming.
27
+ * Pass options through Document#all to Bucket#keys.
28
+ * Make Hash#to_param compatible with ActiveSupport. [Dave Perrett]
29
+ * Add support for previous_changes functionality and make available to callbacks. [Nathaniel Talbott, Sean Cribbs
30
+
31
+ ## 0.9.4 Patch Release - 2011-05-10
32
+
33
+ Release 0.9.4 is a minor bugfix release.
34
+
35
+ * Allow global JSON options to be set so that deeply nested objects can be serialized.
36
+ * Set TCP_NODELAY on PBC sockets and send messages in a single write to reduce latency. [Technorama, Dan Hodge]
37
+ * X510 should be X509 in OpenSSL. [Adam Hunter]
38
+
39
+ ## 0.9.3 Patch Release - 2011-04-18
40
+
41
+ Release 0.9.3 is a minor bugfix release.
42
+
43
+ * Make YAML serialization spec immune to engine differences. [Jeff Pollard]
44
+ * Key-streaming over HTTP are immune to JSON objects that cross chunk boundaries.
45
+ * Require 'yaml' so we can read the config file.
46
+ * Require 'erb' so we can eval the config. [Myron Marston]
47
+ * Move definition of validates_associated back into the validator. [Myron Marston]
48
+ * Require 'set' before Set is extended. [André Silva]
49
+
50
+ ## 0.9.2 Patch Release - 2011-04-11
51
+
52
+ Release 0.9.2 is a minor bugfix release.
53
+
54
+ * Remove usage of autoload from all projects to reduce thread-safety problems.
55
+ * Fix Excon backend to properly initialize response headers under error conditions. [Jeff Pollard, Myron Marston]
56
+ * Excon yields multiple arguments to the streaming block.
57
+
58
+ ## 0.9.1 Patch Release - 2011-04-07
59
+
60
+ Release 0.9.1 is a minor bugfix release.
61
+
62
+ * Fix strange encoding problems on Ruby 1.9 when using Protocol Buffers.
63
+ * Use http_port rather than port in the generated TestServer. [Myron Marston]
64
+
65
+ ## 0.9.0 Feature Release - 2011-04-03
66
+
67
+ Release 0.9.0 is a huge step forward from the 0.8 series, including support for Riak 0.14.x features, Protocol Buffers transport, and many bugfixes.
68
+
69
+ Following this release, the code will be branched into a 0.9-stable branch, which will only receive critical bugfixes. Development of 1.0 features will occur on the master branch.
70
+
71
+ * Fixed some client semantics: separate ports for protocols, client ID responsibility.
72
+ * Add definition of EmbeddedDocument#==. [Myron Marston]
73
+ * Allow a many-linked doc to be removed from an association. [Myron Marston]
74
+ * Fix one-linked association to return nil appropriately. [Myron Marston]
75
+ * Added external JSON serialization for Ripple documents.
76
+ * Fixed validates_associated. [Myron Marston]
77
+ * Fixed assignment bug in one-embedded associations. [Myron Marston]
78
+ * Added integration tests that work across all client backends.
79
+ * Added support for Protocol Buffers transport with Beefcake library.
80
+ * Added HTTP Basic authorization support. [Adam Hunter]
81
+ * Added HTTPS support. [Adam Hunter]
82
+ * Normalized project Gemfiles.
83
+ * Extracted stream-isolating pump pattern from client backends.
84
+ * Improve speed and reliability of test server.
85
+ * Bubble up errors when saving a document. [Duff OMelia]
86
+ * Add automatic expiration to Rack session store.
87
+ * Use ISO8601 datetime format in stored documents (configurable). [Nicolas Fouché]
88
+ * Access document attributes that do not have a declared property. [Duff OMelia]
89
+ * Fix document callback ordering. [Nathaniel Talbott]
90
+ * Consolidate setting of the object key when link-walking. [Kyle Kingsbury]
91
+ * Added support for streaming MapReduce.
92
+ * Bucket instances are now memoized in the Client. [Woody Peterson]
93
+ * Client backends were refactored so that higher layers are not concerned with transport semantics.
94
+ * Fix false.present? bug.
95
+ * Riak 0.14 features:
96
+ * MapReduce has support for key-filters.
97
+ * Add list_buckets operation.
98
+ * HTTP resources prefixes can be discovered from the root URL.
99
+ * Added document observers using ActiveModel::Observer. [Stefan Sprenger]
100
+ * :key is a protected attribute on Document models. [Adam Hunter]
101
+
102
+ ## 0.8.3 Patch/Minor Feature Release - 2010-12-13
103
+
104
+ Release 0.8.3 includes new generators for Rails 3 projects, a new HTTP backend based on Wesley Beary's Excon library, and significant bugfixes for Document models.
105
+
106
+ `riak-client` is now also completely independent of ActiveSupport, and all three libraries have better support for JRuby.
107
+
108
+ * Fix edge case where NetHTTPBackend would not #to_i the response code.
109
+ * Improve handling of Time properties, including ActiveSupport::TimeWithZone. [Duff O'Melia]
110
+ * Don't cast empty string for Numeric property types. [Marco Campana]
111
+ * Add MapReduce built-ins generator.
112
+ * Add generators to help with Riak::TestServer and initial Rails 3 setup. [Duff O'Melia, Sean Cribbs]
113
+ * Improve handling of Document properties we don't know about.
114
+ * Refactored RequestHeaders so it can be used by multiple backends.
115
+ * Add Excon HTTP backend.
116
+ * Control mock HTTP server via DRb so as to avoid deadlocks.
117
+ * Monkeypatch #present? seperately from #blank?. [Kyle Kingsbury]
118
+ * Improved RObject#inspect output. [Jay Adkisson]
119
+ * Fix Bucket#keys raising exceptions on rare occasions. [Kyle Kingsbury]
120
+ * Add support for mass-assignment security on Document models.
121
+ * Moved ActiveSupport version check into CacheStore.
122
+ * Added example TestServer config files.
123
+ * Allow document assignment even if the value is a proxy. [Duff O'Melia]
124
+ * Remove "install curb" warnings.
125
+ * Improve JRuby compatibility.
126
+ * Resolve Hash-ordering differences between 1.9 and 1.8 in specs.
127
+ * Fix 1.8.x issue with Open3 returning a nil waitthread in the TestServer.
128
+ * Removed riak-client dependency on ActiveSupport. [Kyle Kingsbury]
129
+ * Report a changed attribute only if its value changes. [Duff O'Melia]
130
+ * Reloading a Ripple::Document now casts property values. [Duff O'Melia]
131
+
132
+ ## 0.8.2 Patch/Minor Feature Release - 2010-10-22
133
+
134
+ Release 0.8.2 includes significant additions to support features in Riak 0.13, including Riak Search and Luwak.
135
+
136
+ Simply `require 'riak/search'` to add Search-related features to riak-client.
137
+
138
+ * Fixed bug in embedded associations where associated validators would be added every time the association was instantiated. [Adam Hunter]
139
+ * Update and loosen dependencies to Rails 3.0.1 and RSpec 2.
140
+ * Add support for file-existence check in Luwak. [John Axel Eriksson]
141
+ * Avoid clobbering an existing Boolean class or module.
142
+ * Add Luwak support.
143
+ * Add Search features. [Sean Cribbs, Rusty Klophaus]
144
+
145
+ ## 0.8.1 Patch/Minor Feature Release - 2010-10-11
146
+
147
+ Release 0.8.1 includes several new features and bugfixes.
148
+
149
+ * Riak::TestServer makes it easier and faster to run automated tests that need to store data in Riak. It includes an in-memory Riak backend that quickly clears its contents at the end of a test/example. All included integration tests now use this.
150
+ * Headers are turned into strings before splitting into 8KB chunks. [Nicolas Fouché]
151
+ * Riak::RObject#prevent_stale_writes option allows conditional PUT semantics, matching on ETag. [Lee Jensen]
152
+ * Riak::RObject#raw_data gives access to the object data before deserialization. [Lee Jensen]
153
+ * Boolean properties on Ripple documents now allow a default value of false. [Duff O'Melia]
154
+ * Ripple documents now support accepts_nested_attributes_for. [Brian Kaney]
155
+
156
+ ## 0.8.0 Feature Release - 2010-08-31
157
+
158
+ The 0.8.0 release is packed full of new features and bugfixes. Of particular note are:
159
+
160
+ * Rails 3 final support
161
+ * Session stores
162
+ * Linked associations
163
+ * Riak 0.12 support
164
+
165
+ Full notes:
166
+
167
+ * Ripple::Document classes can define their desired quorum parameters.
168
+ * ripple and riak-sessions use Rails 3 final. riak-client is still compatible with active_support >= 2.3.5.
169
+ * Keys are not loaded by default when requesting a Riak::Bucket. This matches the default for Riak 0.12.
170
+ * Ripple::Document now supports update_attributes and update_attribute.
171
+ * Inspection output has been improved for Ripple documents.
172
+ * Ripple::Document classes can now have associations that use links.
173
+ * Property-casting patches are now eagerly loaded.
174
+ * Certain responses from MapReduce can be converted into Riak::RObjects. [Misha Gorodnitzky]
175
+ * Key/bucket (un)escaping has been improved. [Nicolas Fouché]
176
+ * Riak::CacheStore sets and uses bucket-default quorums instead of per-request parameters.
177
+ * Riak::Bucket supports new quorum defaults.
178
+ * The default configuration file for Ripple is now config/ripple.yml. [Ashley Woodard]
179
+ * Added a Rails 3 model generator. [Ashley Woodard]
180
+ * Serializing RObject data via Marshal is now simpler, using "application/x-ruby-marshal" content-type.
181
+ * Large HTTP headers (Link tends to be one) are split into 8KB chunks for both backends.
182
+ * Added session stores for Rack and Rails 3.
183
+ * Document#find returns nil when all arguments are blank.
184
+ * CurbBackend now properly handles IO objects as the request body data.
185
+ * Ripple::Document classes that have the same bucket/key are equivalent using ==.
186
+ * Ripple::Document classes can use a property as the key, as long as it's a String.
187
+
188
+ ## 0.7.1 Patch Release - 2010-06-08
189
+
190
+ This release has no new features but includes bug fixes and some internal refactoring of the Ripple::Document hierarchy.
191
+
192
+ * The Net::HTTP backend should handle streamed keys better (although
193
+ still not perfectly).
194
+ * The Riak::MapReduce#timeout method now returns self, allowing
195
+ chaining.
196
+ * The Ripple::Document and Ripple::EmbeddedDocument are less coupled
197
+ from one another so numerous internal confusions about calling order
198
+ are fixed.
199
+ * When using Riak::RObject#to_link, a blank tag is no longer allowed.
200
+
201
+ ## 0.7.0 Feature Release - 2010-05-06
202
+
203
+ This release includes a number of new features. The largest change is that the library is now split into two gems, 'riak-client' and 'ripple'. 'riak-client' supports ActiveSupport 2.3.5, 'ripple' only supports 3.0.0.beta3.
204
+
205
+ A big kudos goes to Adam Hunter who contributed the majority of the new associations code.
206
+
207
+ In addition, these changes were made:
208
+
209
+ * Keys should stream properly now from Bucket#keys (the "stream" option was left off).
210
+ * Deletes can be issued directly from a Bucket without instantiating an RObject.
211
+ * Added a ActiveSupport 3.0-compatible Cache Store. [Shay Frendt]
212
+ * Added Bucket#exists?
213
+ * A provisionally complete implementation of embedded document associations. [Adam Hunter]
214
+ * Ripple::Document passes ActiveModel::Lint tests.
215
+ * Updated Rails 3 dependencies to beta3 and RSpec to 2.0.0.beta6
216
+ * Ripple::Document handles nil keys better. [John Lynch]
217
+
218
+
219
+ ## 0.6.1 Patch Release - 2010-03-17
220
+
221
+ This is a minor release with fixes for a few issues:
222
+
223
+ * Riak::Link objects will now be unique when added to RObject#links
224
+ Set. [John Lynch]
225
+ * Attributes on Ripple::Document classes are no longer clone, which had
226
+ prevented non-scalar properties from being modified directly (e.g. Array).
227
+ * Buckets, keys, and walk specs are properly escaped in URLs
228
+ (including slashes).
229
+ * Time-related properties properly convert to string formats in JSON that
230
+ they will work in the context of MapReduce jobs.
231
+
232
+ ## 0.6.0 Feature Release - 2010-03-05
233
+
234
+ This release contains enhancements and bugfixes in preparation for the
235
+ Riak 0.9 release.
236
+
237
+ * The CurbBackend now uses fibers to prevent curl-handle corruption when
238
+ a block is given to streaming operations.
239
+ * The default prefix is now "/riak/" to match the latest version of Riak.
240
+ * The client configuration for Ripple is now used.
241
+ * Added Bucket#new and Bucket#get_or_new for easily creating new objects.
242
+ * Added Bucket#allow_mult and Bucket#n_value accessors for more easily setting
243
+ bucket properties.
244
+ * Added timestamps! method for easily adding created_at/updated_at to documents.
245
+ [Adam Hunter]
246
+ * The 'links' collection on RObject is now a Set instead of an Array.
247
+ * All literal messages are now stored in YAML localization files.
248
+ * Object siblings (caused by concurrent updates when allow_mult is true) can now
249
+ be accessed directly.
250
+ * Map-reduce jobs now have timeouts (in parity with Riak).
251
+
252
+ ## 0.5.1 Patch Release - 2010-02-22
253
+
254
+ This is a minor release with fixes for Ruby 1.9, bundler/edge Rails,
255
+ and a minor feature addition. Changes:
256
+
257
+ * Qualify namespaces for Ruby 1.9.
258
+ * Decoupled a few specs that gave the appearance of failure.
259
+ * Added "bucket" and "key" properties on Riak::Link objects. [John Lynch]
260
+ * Fully-qualify the `JSON` constant, using `ActiveSupport::JSON` instead.
261
+ * Adjusted gem specification to accommodate edge Rails. [Preston Marshall]
262
+
263
+ ## 0.5 Initial Release - 2010-02-10
264
+
265
+ This is the first release of Ripple, which would not have been possible
266
+ without the generous support of Sonian and Basho Technologies. Many thanks.
267
+ It includes:
268
+
269
+ * A robust basic client, `Riak`, with:
270
+ * multiple HTTP backends (curb, net/http)
271
+ * sensible client defaults (local, default port)
272
+ * bucket access and manipulation, including key-streaming
273
+ * object reading, storing, deleting and reloading
274
+ * automatic de-serialization of JSON, YAML, and Marshal (when given the right content type)
275
+ * streaming POST/PUT bodies (when given an IO)
276
+ * method-chained map-reduce job construction
277
+ * A document-style modeling library, Ripple, with:
278
+ * ActiveModel 3.0 compatibility
279
+ * Property/attribute definition with automatic type-casting
280
+ * Bucket selection based on class name, with single-bucket inheritance (configurable)
281
+ * Validations
282
+ * Dirty-tracking
283
+ * Simple finders - all documents, by key
284
+ * Reloading