ripple 1.0.0.beta → 1.0.0.beta2

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