couchrest_model-radiant 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/LICENSE +176 -0
  2. data/README.md +19 -0
  3. data/Rakefile +74 -0
  4. data/THANKS.md +21 -0
  5. data/history.txt +207 -0
  6. data/lib/couchrest/model.rb +10 -0
  7. data/lib/couchrest/model/associations.rb +223 -0
  8. data/lib/couchrest/model/base.rb +111 -0
  9. data/lib/couchrest/model/callbacks.rb +27 -0
  10. data/lib/couchrest/model/casted_array.rb +39 -0
  11. data/lib/couchrest/model/casted_model.rb +68 -0
  12. data/lib/couchrest/model/class_proxy.rb +122 -0
  13. data/lib/couchrest/model/collection.rb +263 -0
  14. data/lib/couchrest/model/configuration.rb +51 -0
  15. data/lib/couchrest/model/design_doc.rb +123 -0
  16. data/lib/couchrest/model/document_queries.rb +83 -0
  17. data/lib/couchrest/model/errors.rb +23 -0
  18. data/lib/couchrest/model/extended_attachments.rb +77 -0
  19. data/lib/couchrest/model/persistence.rb +155 -0
  20. data/lib/couchrest/model/properties.rb +208 -0
  21. data/lib/couchrest/model/property.rb +97 -0
  22. data/lib/couchrest/model/property_protection.rb +71 -0
  23. data/lib/couchrest/model/support/couchrest.rb +19 -0
  24. data/lib/couchrest/model/support/hash.rb +9 -0
  25. data/lib/couchrest/model/typecast.rb +175 -0
  26. data/lib/couchrest/model/validations.rb +68 -0
  27. data/lib/couchrest/model/validations/casted_model.rb +14 -0
  28. data/lib/couchrest/model/validations/locale/en.yml +5 -0
  29. data/lib/couchrest/model/validations/uniqueness.rb +44 -0
  30. data/lib/couchrest/model/views.rb +160 -0
  31. data/lib/couchrest/railtie.rb +12 -0
  32. data/lib/couchrest_model.rb +62 -0
  33. data/lib/rails/generators/couchrest_model.rb +16 -0
  34. data/lib/rails/generators/couchrest_model/model/model_generator.rb +27 -0
  35. data/lib/rails/generators/couchrest_model/model/templates/model.rb +2 -0
  36. data/spec/couchrest/assocations_spec.rb +196 -0
  37. data/spec/couchrest/attachment_spec.rb +176 -0
  38. data/spec/couchrest/base_spec.rb +463 -0
  39. data/spec/couchrest/casted_model_spec.rb +438 -0
  40. data/spec/couchrest/casted_spec.rb +75 -0
  41. data/spec/couchrest/class_proxy_spec.rb +132 -0
  42. data/spec/couchrest/configuration_spec.rb +78 -0
  43. data/spec/couchrest/inherited_spec.rb +40 -0
  44. data/spec/couchrest/persistence_spec.rb +415 -0
  45. data/spec/couchrest/property_protection_spec.rb +192 -0
  46. data/spec/couchrest/property_spec.rb +871 -0
  47. data/spec/couchrest/subclass_spec.rb +99 -0
  48. data/spec/couchrest/validations.rb +85 -0
  49. data/spec/couchrest/view_spec.rb +463 -0
  50. data/spec/fixtures/attachments/README +3 -0
  51. data/spec/fixtures/attachments/couchdb.png +0 -0
  52. data/spec/fixtures/attachments/test.html +11 -0
  53. data/spec/fixtures/base.rb +139 -0
  54. data/spec/fixtures/more/article.rb +35 -0
  55. data/spec/fixtures/more/card.rb +17 -0
  56. data/spec/fixtures/more/cat.rb +19 -0
  57. data/spec/fixtures/more/client.rb +6 -0
  58. data/spec/fixtures/more/course.rb +25 -0
  59. data/spec/fixtures/more/event.rb +8 -0
  60. data/spec/fixtures/more/invoice.rb +14 -0
  61. data/spec/fixtures/more/person.rb +9 -0
  62. data/spec/fixtures/more/question.rb +7 -0
  63. data/spec/fixtures/more/sale_entry.rb +9 -0
  64. data/spec/fixtures/more/sale_invoice.rb +13 -0
  65. data/spec/fixtures/more/service.rb +10 -0
  66. data/spec/fixtures/more/user.rb +22 -0
  67. data/spec/fixtures/views/lib.js +3 -0
  68. data/spec/fixtures/views/test_view/lib.js +3 -0
  69. data/spec/fixtures/views/test_view/only-map.js +4 -0
  70. data/spec/fixtures/views/test_view/test-map.js +3 -0
  71. data/spec/fixtures/views/test_view/test-reduce.js +3 -0
  72. data/spec/spec_helper.rb +48 -0
  73. metadata +263 -0
data/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,19 @@
1
+ # CouchRest Model for radiantcms-couchrest_model
2
+
3
+ Based on the original work made by the CouchRest Model team
4
+
5
+ ## Install
6
+
7
+ ### Gem
8
+
9
+ $ sudo gem install couchrest_model-radiant
10
+
11
+ ### Bundler
12
+
13
+ If you're using bundler, just define a line similar to the following in your project's Gemfile:
14
+
15
+ gem 'couchrest_model-radiant'
16
+
17
+ ### Model
18
+
19
+ $ rails generate model person --orm=couchrest_model
@@ -0,0 +1,74 @@
1
+ require 'rake'
2
+ require "rake/rdoctask"
3
+
4
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
5
+ require 'couchrest_model'
6
+
7
+ begin
8
+ require 'rspec'
9
+ require 'rspec/core/rake_task'
10
+ rescue LoadError
11
+ puts <<-EOS
12
+ To use rspec for testing you must install rspec gem:
13
+ gem install rspec
14
+ EOS
15
+ exit(0)
16
+ end
17
+
18
+ begin
19
+ require 'jeweler'
20
+ Jeweler::Tasks.new do |gemspec|
21
+ gemspec.name = "couchrest_model"
22
+ gemspec.summary = "Extends the CouchRest Document for advanced modelling."
23
+ gemspec.description = "CouchRest Model provides aditional features to the standard CouchRest Document class such as properties, view designs, associations, callbacks, typecasting and validations."
24
+ gemspec.email = "jchris@apache.org"
25
+ gemspec.homepage = "http://github.com/couchrest/couchrest_model"
26
+ gemspec.authors = ["J. Chris Anderson", "Matt Aimonetti", "Marcos Tapajos", "Will Leinweber", "Sam Lown"]
27
+ gemspec.extra_rdoc_files = %w( README.md LICENSE THANKS.md )
28
+ gemspec.files = %w( LICENSE README.md Rakefile THANKS.md history.txt couchrest.gemspec) + Dir["{examples,lib,spec}/**/*"] - Dir["spec/tmp"]
29
+ gemspec.has_rdoc = true
30
+ gemspec.add_dependency("couchrest", "~> 1.0.1")
31
+ gemspec.add_dependency("mime-types", "~> 1.15")
32
+ gemspec.add_dependency("activemodel", "~> 3.0.0.rc")
33
+ gemspec.add_dependency("tzinfo", "~> 0.3.22")
34
+ gemspec.add_dependency('railties', "~> 3.0.0.rc")
35
+ gemspec.add_development_dependency('rspec', '~> 2.0.0.beta.19')
36
+ gemspec.version = CouchRest::Model::VERSION
37
+ gemspec.date = Time.now.strftime("%Y-%m-%d")
38
+ gemspec.require_path = "lib"
39
+ end
40
+ rescue LoadError
41
+ puts "Jeweler not available. Install it with: gem install jeweler"
42
+ end
43
+
44
+ desc "Run all specs"
45
+ Rspec::Core::RakeTask.new(:spec) do |spec|
46
+ spec.spec_opts = ["--color"]
47
+ spec.pattern = 'spec/**/*_spec.rb'
48
+ end
49
+
50
+ desc "Print specdocs"
51
+ Rspec::Core::RakeTask.new(:doc) do |spec|
52
+ spec.spec_opts = ["--format", "specdoc"]
53
+ spec.pattern = 'spec/*_spec.rb'
54
+ end
55
+
56
+ desc "Generate the rdoc"
57
+ Rake::RDocTask.new do |rdoc|
58
+ files = ["README.rdoc", "LICENSE", "lib/**/*.rb"]
59
+ rdoc.rdoc_files.add(files)
60
+ rdoc.main = "README.rdoc"
61
+ rdoc.title = "CouchRest: Ruby CouchDB, close to the metal"
62
+ end
63
+
64
+ desc "Run the rspec"
65
+ task :default => :spec
66
+
67
+ module Rake
68
+ def self.remove_task(task_name)
69
+ Rake.application.instance_variable_get('@tasks').delete(task_name.to_s)
70
+ end
71
+ end
72
+
73
+ Rake.remove_task("github:release")
74
+ Rake.remove_task("release")
@@ -0,0 +1,21 @@
1
+ CouchRest THANKS
2
+ =====================
3
+
4
+ CouchRest was originally developed by J. Chris Anderson <jchris@grabb.it>
5
+ and a number of other contributors. Many people further contributed to
6
+ CouchRest by reporting problems, suggesting various improvements or submitting
7
+ changes. A list of these people is included below.
8
+
9
+ * [Matt Aimonetti](http://merbist.com/about/)
10
+ * [Greg Borenstein](http://ideasfordozens.com)
11
+ * [Geoffrey Grosenbach](http://nubyonrails.com/)
12
+ * [Jonathan S. Katz](http://github.com/jkatz)
13
+ * [Matt Lyon](http://mattly.tumblr.com/)
14
+ * Simon Rozet (simon /at/ rozet /dot/ name)
15
+ * [Marcos Tapajós](http://tapajos.me)
16
+ * [Sam Lown](http://github.com/samlown)
17
+ * [Will Leinweber](http://github.com/will)
18
+
19
+ Patches are welcome. The primary source for this software project is [on Github](http://github.com/couchrest/couchrest)
20
+
21
+ A lot of people have active forks - thank you all - even the patches I don't end up using are helpful.
@@ -0,0 +1,207 @@
1
+ == Next Version
2
+
3
+ * Major enhancements
4
+ * Support for configuration module and "model_type_key" option for overriding model's type key
5
+ * Added "mass_assign_any_attribute" configuration option to allow setting anything via the attribute= method.
6
+
7
+ * Minor enhancements
8
+ * Fixing find("") issue (thanks epochwolf)
9
+ * Altered protected attributes so that hash provided to #attributes= is not modified
10
+ * Altering typecasting for floats to better handle commas and points
11
+ * Fixing the lame pagination bug where database url (and pass!!) were included in view requests (Thanks James Hayton)
12
+
13
+ Notes:
14
+
15
+ * 2010-10-22 @samlown:
16
+ * ActiveModel Attribute support was added but has now been removed due to major performance issues.
17
+ Until these have been resolved (if possible?!) they should not be included. See the
18
+ 'active_model_attrs' if you'd like to test.
19
+
20
+ == CouchRest Model 1.0.0.beta8
21
+
22
+ * Major enhancements
23
+ * Added model generator
24
+
25
+ * Minor enhancements
26
+ * Raise error on adding objects to "collection_of" without an id
27
+ * Allow mixing of protected and accessible properties. Any unspecified properties are now assumed to be protected by default
28
+ * Parsing times without zone
29
+ * Using latest rspec (2.0.0.beta.19)
30
+
31
+ == CouchRest Model 1.0.0.beta7
32
+
33
+ * Major enhancements
34
+ * Renamed ExtendedDocument to CouchRest::Model
35
+ * Added initial support for simple belongs_to associations
36
+ * Added support for basic collection_of association (unique to document databases!)
37
+ * Moved Validation to ActiveModel
38
+ * Moved Callbacks to ActiveModel
39
+ * Removed support for properties defined using a string for the type instead of a class
40
+ * Validation always included
41
+ * Uniqueness validation now available
42
+
43
+ * Minor enhancements
44
+ * Removed support for auto_validate! and :length on properties
45
+
46
+
47
+ == 1.0.0.beta6
48
+
49
+ * Major enhancements
50
+ * Added support for anonymous CastedModels defined in Documents
51
+
52
+ * Minor enhancements
53
+ * Added 'find_by_*' alias for finding first item in view with matching key.
54
+ * Fixed issue with active_support in Rails3 and text in README for JSON.
55
+ * Refactoring of properties, added read_attribute and write_attribute methods.
56
+ * Now possible to send anything to update_attribtues method. Invalid or readonly attributes will be ignored.
57
+ * Attributes with arrays are *always* instantiated as a CastedArray.
58
+ * Setting a property of type Array (or keyed hash) must be an array or an error will be raised.
59
+ * Now possible to set Array attribute from hash where keys determine order.
60
+
61
+ == 1.0.0.beta5
62
+
63
+ * Minor enhancements
64
+ * Added 'find' alias for 'get' for easier rails transition
65
+
66
+ == 1.0.0.beta3
67
+
68
+ * Minor enhancements
69
+ * Removed Validation by default, requires too many structure changes (FAIL)
70
+ * Added support for instantiation of documents read from database as couchrest-type provided (Sam Lown)
71
+ * Improved attachment handling for detecting file type (Sam Lown)
72
+ * Removing some monkey patches and relying on active_support for constantize and humanize (Sam Lown)
73
+ * Added support for setting type directly on property (Sam Lown)
74
+
75
+
76
+ == 1.0.0.beta2
77
+
78
+ * Minor enhancements
79
+ * Enable Validation by default and refactored location (Sam Lown)
80
+
81
+ == 1.0.0.beta
82
+
83
+ * Major enhancements
84
+ * Separated ExtendedDocument from main CouchRest gem (Sam Lown)
85
+
86
+ * Minor enhancements
87
+ * active_support included by default
88
+
89
+ == 0.37
90
+
91
+ * Minor enhancements
92
+ * Added gemspec (needed for Bundler install) (Tapajós)
93
+
94
+ == 0.36
95
+
96
+ * Major enhancements
97
+ * Adds support for continuous replication (sauy7)
98
+ * Automatic Type Casting (Alexander Uvarov, Sam Lown, Tim Heighes, Will Leinweber)
99
+ * Added a search method to CouchRest:Database to search the documents in a given database. (Dave Farkas, Arnaud Berthomier, John Wood)
100
+
101
+ * Minor enhancements
102
+ * Provide a description of the timeout error (John Wood)
103
+
104
+ == 0.35
105
+
106
+ * Major enhancements
107
+ * CouchRest::ExtendedDocument allow chaining the inherit class callback (Kenneth Kalmer) - http://github.com/couchrest/couchrest/issues#issue/8
108
+
109
+ * Minor enhancements
110
+ * Fix attachment bug (Johannes Jörg Schmidt)
111
+ * Fix create database exception bug (Damien Mathieu)
112
+ * Compatible with restclient >= 1.4.0 new responses (Julien Kirch)
113
+ * Bug fix: Attribute protection no longer strips attributes coming from the database (Will Leinweber)
114
+ * Bug fix: Remove double CGI escape when PUTting an attachment (nzoschke)
115
+ * Bug fix: Changing Class proxy to set database on result sets (Peter Gumeson)
116
+ * Bug fix: Updated time regexp (Nolan Darilek)
117
+ * Added an update_doc method to database to handle conflicts during atomic updates. (Pierre Larochelle)
118
+ * Bug fix: http://github.com/couchrest/couchrest/issues/#issue/2 (Luke Burton)
119
+
120
+ == 0.34
121
+
122
+ * Major enhancements
123
+
124
+ * Added support for https database URIs. (Mathias Meyer)
125
+ * Changing some validations to be compatible with activemodel. (Marcos Tapajós)
126
+ * Adds attribute protection to properties. (Will Leinweber)
127
+ * Improved CouchRest::Database#save_doc, added "batch" mode to significantly speed up saves at cost of lower durability gurantees. (Igal Koshevoy)
128
+ * Added CouchRest::Database#bulk_save_doc and #batch_save_doc as human-friendlier wrappers around #save_doc. (Igal Koshevoy)
129
+
130
+ * Minor enhancements
131
+
132
+ * Fix content_type handling for attachments
133
+ * Fixed a bug in the pagination code that caused it to paginate over records outside of the scope of the view parameters.(John Wood)
134
+ * Removed amount_pages calculation for the pagination collection, since it cannot be reliably calculated without a view.(John Wood)
135
+ * Bug fix: http://github.com/couchrest/couchrest/issues/#issue/2 (Luke Burton)
136
+ * Bug fix: http://github.com/couchrest/couchrest/issues/#issue/1 (Marcos Tapajós)
137
+ * Removed the Database class deprecation notices (Matt Aimonetti)
138
+ * Adding support to :cast_as => 'Date'. (Marcos Tapajós)
139
+ * Improve documentation (Marcos Tapajós)
140
+ * Streamer fixes (Julien Sanchez)
141
+ * Fix Save on Document & ExtendedDocument crashed if bulk (Julien Sanchez)
142
+ * Fix Initialization of ExtendentDocument model shouldn't failed on a nil value in argument (deepj)
143
+ * Change to use Jeweler and Gemcutter (Marcos Tapajós)
144
+
145
+ == 0.33
146
+
147
+ * Major enhancements
148
+
149
+ * Added a new Rack logger middleware letting you log/save requests/queries (Matt Aimonetti)
150
+
151
+ * Minor enhancements
152
+
153
+ * Added #amount_pages to a paginated result array (Matt Aimonetti)
154
+ * Ruby 1.9.2 compatible (Matt Aimonetti)
155
+ * Added a property? method for property cast as :boolean (John Wood)
156
+ * Added an option to force the deletion of a attachments (bypass 409s) (Matt Aimonetti)
157
+ * Created a new abstraction layer for the REST API (Matt Aimonetti)
158
+ * Bug fix: made ExtendedDocument#all compatible with Couch 0.10 (tc)
159
+
160
+ == 0.32
161
+
162
+ * Major enhancements
163
+
164
+ * ExtendedDocument.get doesn't raise an exception anymore. If no documents are found nil is returned.
165
+ * ExtendedDocument.get! works the say #get used to work and will raise an exception if a document isn't found.
166
+
167
+ * Minor enhancements
168
+
169
+ * Bug fix: Model.all(:keys => [1,2]) was not working (Matt Aimonetti)
170
+ * Added ValidationErrors#count in order to play nicely with Rails (Peter Wagenet)
171
+ * Bug fix: class proxy design doc refresh (Daniel Kirsh)
172
+ * Bug fix: the count method on the proxy collection was missing (Daniel Kirsch)
173
+ * Added #amount_pages to a paginated collection. (Matt Aimonetti)
174
+
175
+ == 0.31
176
+
177
+ * Major enhancements
178
+
179
+ * Created an abstraction HTTP layer to support different http adapters (Matt Aimonetti)
180
+ * Added ExtendedDocument.create({}) and #create!({}) so you don't have to do Model.new.create (Matt Aimonetti)
181
+
182
+ * Minor enhancements
183
+
184
+ * Added an init.rb file for easy usage as a Rails plugin (Aaron Quint)
185
+ * Bug fix: pagination shouldn't die on empty results (Arnaud Berthomier)
186
+ * Optimized ExtendedDocument.count to run about 3x faster (Matt Aimonetti)
187
+ * Added Float casting (Ryan Felton & Matt Aimonetti)
188
+
189
+ == 0.30
190
+
191
+ * Major enhancements
192
+
193
+ * Added support for pagination (John Wood)
194
+ * Improved performance when initializing documents with timestamps (Matt Aimonetti)
195
+
196
+ * Minor enhancements
197
+
198
+ * Extended the API to retrieve an attachment URI (Matt Aimonetti)
199
+ * Bug fix: default value should be able to be set as false (Alexander Uvarov)
200
+ * Bug fix: validates_is_numeric should be able to properly validate a Float instance (Rob Kaufman)
201
+ * Bug fix: fixed the Timeout implementation (Seth Falcon)
202
+
203
+
204
+ ---
205
+
206
+ Unfortunately, before 0.30 we did not keep a track of the modifications made to CouchRest.
207
+ You can see the full commit history on GitHub: http://github.com/couchrest/couchrest/commits/master/