couch_potato 1.6.4 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ruby.yml +38 -0
  3. data/.gitignore +3 -0
  4. data/CHANGES.md +193 -122
  5. data/Gemfile +4 -0
  6. data/README.md +61 -85
  7. data/Rakefile +11 -10
  8. data/couch_potato-rspec.gemspec +3 -2
  9. data/couch_potato.gemspec +9 -7
  10. data/gemfiles/active_support_5_0 +7 -0
  11. data/gemfiles/active_support_5_1 +7 -0
  12. data/gemfiles/active_support_5_2 +7 -0
  13. data/gemfiles/active_support_6_0 +7 -0
  14. data/gemfiles/active_support_6_1 +7 -0
  15. data/lib/couch_potato/database.rb +168 -71
  16. data/lib/couch_potato/persistence/dirty_attributes.rb +3 -21
  17. data/lib/couch_potato/persistence/magic_timestamps.rb +3 -3
  18. data/lib/couch_potato/persistence/properties.rb +15 -10
  19. data/lib/couch_potato/persistence/revisions.rb +14 -0
  20. data/lib/couch_potato/persistence/simple_property.rb +0 -4
  21. data/lib/couch_potato/persistence/type_caster.rb +11 -6
  22. data/lib/couch_potato/persistence.rb +5 -3
  23. data/lib/couch_potato/railtie.rb +7 -12
  24. data/lib/couch_potato/validation.rb +8 -0
  25. data/lib/couch_potato/version.rb +2 -2
  26. data/lib/couch_potato/view/base_view_spec.rb +8 -32
  27. data/lib/couch_potato/view/custom_views.rb +4 -3
  28. data/lib/couch_potato/view/flex_view_spec.rb +121 -0
  29. data/lib/couch_potato/view/view_parameters.rb +34 -0
  30. data/lib/couch_potato.rb +37 -16
  31. data/spec/callbacks_spec.rb +45 -19
  32. data/spec/conflict_handling_spec.rb +1 -2
  33. data/spec/property_spec.rb +12 -3
  34. data/spec/railtie_spec.rb +17 -1
  35. data/spec/revisions_spec.rb +25 -0
  36. data/spec/spec_helper.rb +4 -3
  37. data/spec/unit/active_model_compliance_spec.rb +7 -3
  38. data/spec/unit/attributes_spec.rb +54 -1
  39. data/spec/unit/caching_spec.rb +105 -0
  40. data/spec/unit/couch_potato_spec.rb +70 -5
  41. data/spec/unit/create_spec.rb +5 -4
  42. data/spec/unit/database_spec.rb +235 -135
  43. data/spec/unit/dirty_attributes_spec.rb +5 -26
  44. data/spec/unit/flex_view_spec_spec.rb +17 -0
  45. data/spec/unit/model_view_spec_spec.rb +1 -1
  46. data/spec/unit/rspec_stub_db_spec.rb +31 -0
  47. data/spec/unit/validation_spec.rb +42 -2
  48. data/spec/views_spec.rb +214 -103
  49. data/vendor/pouchdb-collate/LICENSE +202 -0
  50. data/vendor/pouchdb-collate/pouchdb-collate.js +430 -0
  51. metadata +46 -33
  52. data/.ruby-version +0 -1
  53. data/.travis.yml +0 -20
  54. data/gemfiles/active_support_4_0 +0 -11
  55. data/gemfiles/active_support_4_1 +0 -11
  56. data/gemfiles/active_support_4_2 +0 -11
  57. data/lib/couch_potato/persistence/deep_dirty_attributes.rb +0 -180
  58. data/spec/unit/deep_dirty_attributes_spec.rb +0 -434
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 838a4fbf0f5af5fd3306a1cc2284d9c077397de1
4
- data.tar.gz: 76306355648a9447a58c24b0e802f2f79bcc86e7
2
+ SHA256:
3
+ metadata.gz: debdd32aec37a880f2cdbc7ed4dfc5827adc36558f39fe590684cdfa7f5bcd52
4
+ data.tar.gz: 9f9408d57b27baff76fd9086e83fcd8c58dd0acf9983710779c14c22e892c9f8
5
5
  SHA512:
6
- metadata.gz: a914b059c4f92b4141eea0b8278d308a8101ba555f76db3fd83d11020f03605bc71553a99889cc0260da27b7421c347c7ebbca76bafe30843b18e2cd852ef9df
7
- data.tar.gz: 13eae7928a7a82b7102cf2d9b47da78352d225e01b28192015a18b63232afe410c29b220ed8012aabe8b1f09ab2dc33a90d5bbf120a129dd3516eb3944de9a5c
6
+ metadata.gz: 266c1005d145209fc5d2a3674dbb70ac7f1c8bcef82d0fd7e38b00ddd276807f7502b61d3fef616044cbfc1167d6254d6645cde17dd95f02d1ed277a533a84c9
7
+ data.tar.gz: 751465522ebb0c38fa4b825f30ae5f4de94df2c69409dcf509d30b5a765741b35b3c19fa0c0ebc1f06aa7c0993b9151f9cf82d00887911f3129913cea54dc693
@@ -0,0 +1,38 @@
1
+ name: Ruby CI
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ - 1.x
7
+ pull_request:
8
+ branches:
9
+ - master
10
+ - 1.x
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
15
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: [2.6, 2.7, "jruby"]
20
+ gemfile:
21
+ - "active_support_5_0"
22
+ - "active_support_5_1"
23
+ - "active_support_5_2"
24
+ - "active_support_6_0"
25
+ - "active_support_6_1"
26
+ steps:
27
+ - uses: actions/checkout@v2
28
+ - name: Set up CouchDB
29
+ uses: cobot/couchdb-action@v4
30
+ with:
31
+ couchdb version: "2.3.1"
32
+ - name: Set up Ruby
33
+ uses: ruby/setup-ruby@v1
34
+ with:
35
+ ruby-version: ${{ matrix.ruby }}
36
+ bundler-cache: true
37
+ - name: Run tests
38
+ run: bundle exec rake spec_ci
data/.gitignore CHANGED
@@ -4,3 +4,6 @@ pkg
4
4
  .rvmrc
5
5
  *.swp
6
6
  *.lock
7
+
8
+ .ruby-version
9
+ .tool-versions
data/CHANGES.md CHANGED
@@ -1,237 +1,308 @@
1
1
  ## Changes
2
2
 
3
+ ### 1.9.0
4
+
5
+ - add spec/support for Rails 6.1 and 7
6
+ - add caching Couchrest connections to reduce total number created
7
+
8
+ ### 1.8.0
9
+
10
+ - remove not saving model if it is not dirty. this could lead to missed document updates if the document has been updated in a different process in-between being loaded and saved in the current process.
11
+
12
+ - remove deep dirty tracking
13
+
14
+ ### 1.7.1
15
+
16
+ - added support for properties of type Integer
17
+
18
+ ### 1.7.0
19
+
20
+ - added `_revisions` method that returns all available revisions of a document.
21
+
22
+ ### 1.6.4
23
+
24
+ - bug fix for accessing inherited properties (Alexander Lang)
25
+
26
+ ### 1.6.3
27
+
28
+ - added ActiveSupport instrumentation (Alexander Lang)
29
+
30
+ ### 1.6.2
31
+
32
+ - view digest bugfix (Alexander Lang)
33
+
34
+ ### 1.6.1
35
+
36
+ - added option to add digests to a single view (Alexander Lang)
37
+
38
+ ### 1.6.0
39
+
40
+ - added global option to add digests to view names (Alexander Lang)
41
+
42
+ ### 1.5.1
43
+
44
+ - updated CouchRest to 2.0.0.rc3 in order to re-use http connections. Performance improvements. (Thilo Utke)
45
+ - added passing params to lists (Alexander Lang)
46
+
3
47
  ### 1.5.0
4
48
 
5
- * Moved RSpec matchers into couch_potato-rspec gem. This way, people not using RSpec don't need to install the helpers, plus we can release separate matchers for RSpec 2 and 3.
49
+ - Moved RSpec matchers into couch_potato-rspec gem. This way, people not using RSpec don't need to install the helpers, plus we can release separate matchers for RSpec 2 and 3.
6
50
 
7
51
  ### 1.4.0
8
52
 
9
- * Added support for passing the model to blocks for computing the default value of a property (Alexander Lang)
53
+ - Added support for passing the model to blocks for computing the default value of a property (Alexander Lang)
10
54
 
11
55
  ### 1.3.0
12
56
 
13
- * Add support for built-in couchdb reduce functions in map reduce specs (Andy Morris)
14
- * Make specs handle CommonJS modules via module.exports as well as exports (Andy Morris)
15
- * Changed #attributes to return a HashWithIndifferentAccess (Owen Davies)
57
+ - Add support for built-in couchdb reduce functions in map reduce specs (Andy Morris)
58
+ - Make specs handle CommonJS modules via module.exports as well as exports (Andy Morris)
59
+ - Changed #attributes to return a HashWithIndifferentAccess (Owen Davies)
16
60
 
17
61
  ### 1.2.0
18
62
 
19
- * adds optional deep dirty tracking (andymorris)
20
- * fixes an exception when deleting an already deleted document (Alexander Lang)
63
+ - adds optional deep dirty tracking (andymorris)
64
+ - fixes an exception when deleting an already deleted document (Alexander Lang)
21
65
 
22
66
  ### 1.1.4
23
67
 
24
- * Removes the dependency to json/add/core (cstettner)
68
+ - Removes the dependency to json/add/core (cstettner)
25
69
 
26
70
  ### 1.1.3
27
71
 
28
- * removes check if database exists to avoid lots of additional requests (Alexander Lang)
72
+ - removes check if database exists to avoid lots of additional requests (Alexander Lang)
29
73
 
30
74
  ### 1.1.2
31
75
 
32
- * fixes `CouchPotato.models` did not include subclasses
33
- * adds `CouchPotato.use` (Daniel Lohse)
34
- * fixes MapReduceToMatcher when reduce uses `sum` (Daniel Lohse)
35
- * adds `CouchPotato::Config.database_host` for using multiple databases in a project (Daniel Lohse)
36
- * makes `cast_native` cast floats with no leading digits (wrshawn)
76
+ - fixes `CouchPotato.models` did not include subclasses
77
+ - adds `CouchPotato.use` (Daniel Lohse)
78
+ - fixes MapReduceToMatcher when reduce uses `sum` (Daniel Lohse)
79
+ - adds `CouchPotato::Config.database_host` for using multiple databases in a project (Daniel Lohse)
80
+ - makes `cast_native` cast floats with no leading digits (wrshawn)
37
81
 
38
82
  ### 1.1.1
39
83
 
40
- * fixes properties were leaked to sibling classes (Alexander Lang)
84
+ - fixes properties were leaked to sibling classes (Alexander Lang)
41
85
 
42
86
  ### 1.1.0
43
87
 
44
- * adds conflict handling for Database#save/destroy (Alexander Lang)
88
+ - adds conflict handling for Database#save/destroy (Alexander Lang)
45
89
 
46
90
  ### 1.0.1
47
91
 
48
- * fixes error when bulk loaded document does not respond to database= (Alexander Lang)
92
+ - fixes error when bulk loaded document does not respond to database= (Alexander Lang)
49
93
 
50
94
  ### 1.0.0
51
95
 
52
- * adds `reload` method (Alexander Lang)
53
- * removes `total_rows` from database results (Alexander Lang)
54
- * changes `==` to use ids instead of comparing all attributes (orders of magnitude faster) ([Jochen Kramer](https://github.com/freetwix))
55
- * fixes decoding JSON objects for newer versions of the JSON gem (Alexander Lang)
56
- * adds support for testing map/reduce/rereduce (Andy Morris)
57
- * fixes serializing dates in map/reduce specs (Andy Morris)
58
- * adds support for Rails4 forbidden attributes protection (Alexander Lang)
59
- * adds Rails4, drops 3.0/3.1 support (Alexander Lang)
60
- * adds property default values returned by Procs (Andy Morris)
61
- * adds suppot for BigDecimal properties (Fredrik Rubensson)
62
- * adds support for 2.0, Rubinius, 1.9.3, drops Ruby 1.8, 1.9.2
96
+ - adds `reload` method (Alexander Lang)
97
+ - removes `total_rows` from database results (Alexander Lang)
98
+ - changes `==` to use ids instead of comparing all attributes (orders of magnitude faster) ([Jochen Kramer](https://github.com/freetwix))
99
+ - fixes decoding JSON objects for newer versions of the JSON gem (Alexander Lang)
100
+ - adds support for testing map/reduce/rereduce (Andy Morris)
101
+ - fixes serializing dates in map/reduce specs (Andy Morris)
102
+ - adds support for Rails4 forbidden attributes protection (Alexander Lang)
103
+ - adds Rails4, drops 3.0/3.1 support (Alexander Lang)
104
+ - adds property default values returned by Procs (Andy Morris)
105
+ - adds suppot for BigDecimal properties (Fredrik Rubensson)
106
+ - adds support for 2.0, Rubinius, 1.9.3, drops Ruby 1.8, 1.9.2
63
107
 
64
108
  ### 0.7.1
65
109
 
66
- * fixes a bug when trying to bulk-load non-existant documents
110
+ - fixes a bug when trying to bulk-load non-existant documents
67
111
 
68
112
  ### 0.7.0
69
113
 
70
- * ActiveSupport/Rails 3.2 compatibility (Alexander Lang)
71
- * removed Object#try, String#blank? as they are part of ActiveSupport - ActiveSupport's try behaves differently than the couch potato implementation so this change might break your app (now calling a non-existant method on a non-nil raises a NoMethodError, before it did not) (Alexander Lang)
72
- * bulk document loading (Matthias Jakel)
73
- * multi db support (Peter Schröder)
74
- * hash-style access to attributes (Peter Schröder)
75
- * support for properties of type Array, e.g. :type => [User] (Peter Schröder)
76
- * improve compatibility with state_machine (Alexander Lang)
77
- * allow false as default value for properties (Matthias Jakel)
78
- * support for Erlang views (Alexander Lang)
79
- * don't crash, only warn if couchdb.yml is missing (Alexander Lang)
80
- * use the therubyracer gem to run view specs instead of relying on a `js` executable (Alexander Lang)
114
+ - ActiveSupport/Rails 3.2 compatibility (Alexander Lang)
115
+ - removed Object#try, String#blank? as they are part of ActiveSupport - ActiveSupport's try behaves differently than the couch potato implementation so this change might break your app (now calling a non-existant method on a non-nil raises a NoMethodError, before it did not) (Alexander Lang)
116
+ - bulk document loading (Matthias Jakel)
117
+ - multi db support (Peter Schröder)
118
+ - hash-style access to attributes (Peter Schröder)
119
+ - support for properties of type Array, e.g. :type => [User] (Peter Schröder)
120
+ - improve compatibility with state_machine (Alexander Lang)
121
+ - allow false as default value for properties (Matthias Jakel)
122
+ - support for Erlang views (Alexander Lang)
123
+ - don't crash, only warn if couchdb.yml is missing (Alexander Lang)
124
+ - use the therubyracer gem to run view specs instead of relying on a `js` executable (Alexander Lang)
81
125
 
82
126
  ### 0.6.0
83
127
 
84
- * ActiveSupport/Rails 3.1 compatibility (Maximilian Mack)
85
- * fix no such file to load with json/add/rails (Simone Carletti)
128
+ - ActiveSupport/Rails 3.1 compatibility (Maximilian Mack)
129
+ - fix no such file to load with json/add/rails (Simone Carletti)
86
130
 
87
131
  ### 0.5.7
88
132
 
89
- * support CouchPotato::Database#first/#first! calls when using `stub_db` from tests (langalex)
90
- * support RSpec2 block syntax in `stub_db` (langalex)
133
+ - support CouchPotato::Database#first/#first! calls when using `stub_db` from tests (langalex)
134
+ - support RSpec2 block syntax in `stub_db` (langalex)
91
135
 
92
136
  ### 0.5.6
93
137
 
94
- * remove the stale parameter from a view query if it's nil, as couchdb only allows stale to be ok or update\_after (langalex)
138
+ - remove the stale parameter from a view query if it's nil, as couchdb only allows stale to be ok or update_after (langalex)
95
139
 
96
140
  ### 0.5.5
97
141
 
98
- * support for split_design_documents_per_view (jweiss)
99
- * errors now returns a Hash instead of an Array (bterkuile)
100
- * support passing in list names as symbols in view specs (langalex)
142
+ - support for split_design_documents_per_view (jweiss)
143
+ - errors now returns a Hash instead of an Array (bterkuile)
144
+ - support passing in list names as symbols in view specs (langalex)
101
145
 
102
146
  ### 0.5.4
103
- * cast 'false' to false for boolean properties (langalex)
147
+
148
+ - cast 'false' to false for boolean properties (langalex)
104
149
 
105
150
  ### 0.5.3
106
- * added CouchPotato::Database.load! (langalex)
151
+
152
+ - added CouchPotato::Database.load! (langalex)
107
153
 
108
154
  ### 0.5.2
109
- * added CouchPotato::Database#first and #first! methods (langalex)
110
- * added workaround for BigCouch/Cloudant to not add null reduce functions to views (langalex)
111
- * don't add _attachments if there are none (langalex)
155
+
156
+ - added CouchPotato::Database#first and #first! methods (langalex)
157
+ - added workaround for BigCouch/Cloudant to not add null reduce functions to views (langalex)
158
+ - don't add \_attachments if there are none (langalex)
112
159
 
113
160
  ### 0.5.1
114
- * fixed issues with tzinfo gem (Bernd Ahlers)
161
+
162
+ - fixed issues with tzinfo gem (Bernd Ahlers)
115
163
 
116
164
  ### 0.5.0
117
- * time zone support (Time properties are now converted to current Time.zone) (langalex)
118
- * lazy property initialization (performance!) (langalex)
119
- * active_model is now the default validation framework (langalex)
165
+
166
+ - time zone support (Time properties are now converted to current Time.zone) (langalex)
167
+ - lazy property initialization (performance!) (langalex)
168
+ - active_model is now the default validation framework (langalex)
120
169
 
121
170
  ### 0.4.0
122
- * ruby 1.9.2 compatibility (langalex)
123
- * couch potato objects now behave correctly when used as keys in Hashes (langalex)
124
- * use as\_json instead of to\_s(:json), which is the rails way
125
- * use ActiveModel dirty tracking (langalex) - this means no more "deep tracking", e.g. `user.tags << 'new_tag'; user.dirty? # false`
171
+
172
+ - ruby 1.9.2 compatibility (langalex)
173
+ - couch potato objects now behave correctly when used as keys in Hashes (langalex)
174
+ - use as_json instead of to_s(:json), which is the rails way
175
+ - use ActiveModel dirty tracking (langalex) - this means no more "deep tracking", e.g. `user.tags << 'new_tag'; user.dirty? # false`
126
176
 
127
177
  ### 0.3.2
128
- * support yielding to blocks on #initialize (martinrehfeld)
129
- * support for negative numbers in Fixnum/Float properties (langalex)
178
+
179
+ - support yielding to blocks on #initialize (martinrehfeld)
180
+ - support for negative numbers in Fixnum/Float properties (langalex)
130
181
 
131
182
  ### 0.3.1
132
- * ActiveModel callbacks (kazjote)
133
- * do not use Rails.env in initializer as it will free Rails.env for all times and in Rails 2.3.x apps it will be called too early thus always beeing development (jweiss)
134
- * ruby 1.9.2 compatibility (langalex)
135
- * can configure validation framework in couchdb.yml, process couchdb.yml with erb (langalex)
183
+
184
+ - ActiveModel callbacks (kazjote)
185
+ - do not use Rails.env in initializer as it will free Rails.env for all times and in Rails 2.3.x apps it will be called too early thus always beeing development (jweiss)
186
+ - ruby 1.9.2 compatibility (langalex)
187
+ - can configure validation framework in couchdb.yml, process couchdb.yml with erb (langalex)
136
188
 
137
189
  ### 0.3.0
138
- * support for lists (langalex)
190
+
191
+ - support for lists (langalex)
139
192
 
140
193
  ### 0.2.32
141
- * added persisted? and to_key for proper ActiveModel compliance (thilo)
142
- * id setter (jhohertz-work)
143
- * load document ids if include\_documents is false (jweiss)
144
- * persist given created\_at/updated\_at instead of Time.now (langalex)
194
+
195
+ - added persisted? and to_key for proper ActiveModel compliance (thilo)
196
+ - id setter (jhohertz-work)
197
+ - load document ids if include_documents is false (jweiss)
198
+ - persist given created_at/updated_at instead of Time.now (langalex)
145
199
 
146
200
  ### 0.2.31
147
- * Removed requirement for validatable gem. Allows for using more uptodate versions of the library, or doesn't install it when you're using ActiveModel. (mattmatt)
148
- * fixed callbacks of super classes were not run (langalex)
201
+
202
+ - Removed requirement for validatable gem. Allows for using more uptodate versions of the library, or doesn't install it when you're using ActiveModel. (mattmatt)
203
+ - fixed callbacks of super classes were not run (langalex)
149
204
 
150
205
  ### 0.2.30
151
- * pass in multiple keys when querying a view (langalex)
206
+
207
+ - pass in multiple keys when querying a view (langalex)
152
208
 
153
209
  ### 0.2.29
154
- * nicer inspect() for models (mattmatt)
155
- * fixed (re)reduce for property views wasn't working (langalex)
210
+
211
+ - nicer inspect() for models (mattmatt)
212
+ - fixed (re)reduce for property views wasn't working (langalex)
156
213
 
157
214
  ### 0.2.28
158
- * fixed reloading nested classes (langalex)
159
- * fixed constant missing error when loading models with uninitialized classes via views (langalex)
160
- * added rspec helpers for stubbing out views (langalex)
161
- * fixed design document names for nested model classes (svenfuchs)
215
+
216
+ - fixed reloading nested classes (langalex)
217
+ - fixed constant missing error when loading models with uninitialized classes via views (langalex)
218
+ - added rspec helpers for stubbing out views (langalex)
219
+ - fixed design document names for nested model classes (svenfuchs)
162
220
 
163
221
  ### 0.2.27
164
- * workaround for Rails apps using bundler: database name was not initialized from couchdb.yml (langalex)
222
+
223
+ - workaround for Rails apps using bundler: database name was not initialized from couchdb.yml (langalex)
165
224
 
166
225
  ### 0.2.26
167
- * added to_s(:json) to Date and Time to be able to get properly formatted dates/times for searching with dates/times (langalex)
168
- * all times are now stored as UTC (langalex)
169
- * added support for Float attributes (arbovm)
170
226
 
227
+ - added to_s(:json) to Date and Time to be able to get properly formatted dates/times for searching with dates/times (langalex)
228
+ - all times are now stored as UTC (langalex)
229
+ - added support for Float attributes (arbovm)
171
230
 
172
231
  ### 0.2.25
173
- * automatic view updates: when you change the definition of a view couch potato will now update the design document in the database (langalex)
174
- * support for properties of type Date, better support for Time (langalex)
175
- * support for default reduce count methods in custom views (jweiss)
232
+
233
+ - automatic view updates: when you change the definition of a view couch potato will now update the design document in the database (langalex)
234
+ - support for properties of type Date, better support for Time (langalex)
235
+ - support for default reduce count methods in custom views (jweiss)
176
236
 
177
237
  ### 0.2.24
178
- * persistent instances can now be marked as dirty with #is_dirty (langalex)
238
+
239
+ - persistent instances can now be marked as dirty with #is_dirty (langalex)
179
240
 
180
241
  ### 0.2.23
181
- * Couch Potato models now conform to the ActiveModel interface when ActiveModel is installed, see http://yehudakatz.com/2010/01/10/activemodel-make-any-ruby-object-feel-like-activerecord/ (langalex)
182
- * fixed error with dirty tracking and BigDecimals (thilo)
183
- * added the ability to use ActiveModel validations instead of validatable (martinrehfeld)
242
+
243
+ - Couch Potato models now conform to the ActiveModel interface when ActiveModel is installed, see http://yehudakatz.com/2010/01/10/activemodel-make-any-ruby-object-feel-like-activerecord/ (langalex)
244
+ - fixed error with dirty tracking and BigDecimals (thilo)
245
+ - added the ability to use ActiveModel validations instead of validatable (martinrehfeld)
184
246
 
185
247
  ### 0.2.22
186
- * fixed properties with default values returned default when a blank value like '' or [] was set (langalex)
248
+
249
+ - fixed properties with default values returned default when a blank value like '' or [] was set (langalex)
187
250
 
188
251
  ### 0.2.21
189
- * automatically set a database instance on results of CouchPotato::Database#view (langalex)
190
- * improved auto loading of unloaded constants - can now load constants that have never been loaded before (langalex)
191
- * raise exception on invalid parameters passed to a couchdb view query (langalex)
192
- * when querying a view: pass in ranges as key instead of startkey/endkey, pass in plain value instead of hash with key (langalex)
252
+
253
+ - automatically set a database instance on results of CouchPotato::Database#view (langalex)
254
+ - improved auto loading of unloaded constants - can now load constants that have never been loaded before (langalex)
255
+ - raise exception on invalid parameters passed to a couchdb view query (langalex)
256
+ - when querying a view: pass in ranges as key instead of startkey/endkey, pass in plain value instead of hash with key (langalex)
193
257
 
194
258
  ### 0.2.20
195
- * support for :boolean properties (jweiss)
196
- * return the total_rows when querying a view (langalex)
259
+
260
+ - support for :boolean properties (jweiss)
261
+ - return the total_rows when querying a view (langalex)
197
262
 
198
263
  ### 0.2.19
199
- * added conditions to views (langalex)
264
+
265
+ - added conditions to views (langalex)
200
266
 
201
267
  ### 0.2.18
202
- * set Fixnum property to nil when given a blank string (langalex)
268
+
269
+ - set Fixnum property to nil when given a blank string (langalex)
203
270
 
204
271
  ### 0.2.17
205
- * fixed nil attributes were omitted in json (jweiss, mattmatt)
206
- * support for properties of type Fixnum (langalex)
272
+
273
+ - fixed nil attributes were omitted in json (jweiss, mattmatt)
274
+ - support for properties of type Fixnum (langalex)
207
275
 
208
276
  ### 0.2.16
209
- * fixed problem with classes being not loaded in rails development mode (langalex)
210
- * fixed persist boolean false value (bernd)
277
+
278
+ - fixed problem with classes being not loaded in rails development mode (langalex)
279
+ - fixed persist boolean false value (bernd)
211
280
 
212
281
  ### 0.2.15
213
- * ability to change the name of the attribute that stores the ruby class in the documents by setting JSON.create_id (lennart)
214
- * fixed double loading issue with bundler (jweiss)
215
- * fixed an issue with setting attachments (endor)
282
+
283
+ - ability to change the name of the attribute that stores the ruby class in the documents by setting JSON.create_id (lennart)
284
+ - fixed double loading issue with bundler (jweiss)
285
+ - fixed an issue with setting attachments (endor)
216
286
 
217
287
  ### 0.2.13
218
288
 
219
- * support adding errors in before_validation callbacks (mattmatt)
220
- * support for inheritance (mattmatt)
221
- * support for save without validations (mattmatt)
222
- * improved (de)serialization now supports deserializing nested objects (railsbros, specs by hagenburger)
223
- * RSpec matchers for testing map/reduce functions (langalex)
289
+ - support adding errors in before_validation callbacks (mattmatt)
290
+ - support for inheritance (mattmatt)
291
+ - support for save without validations (mattmatt)
292
+ - improved (de)serialization now supports deserializing nested objects (railsbros, specs by hagenburger)
293
+ - RSpec matchers for testing map/reduce functions (langalex)
224
294
 
225
295
  ### 0.2.10
226
- * fixed bug with hardcoded timezone
296
+
297
+ - fixed bug with hardcoded timezone
227
298
 
228
299
  ### 0.2.9
229
300
 
230
- * allow to overwrite attribute accessor of properties and use super to call the original accessors
231
- * allow read access to attributes that are present in the Couchdb document but not defined as properties
232
- * support default values for properties via the :default parameter
233
- * support attachments via the _attachments property
234
- * support for namespaces models
235
- * removed belongs_to macro for now
236
- * removed CouchPotato::Config.database_server, just set CouchPotato::Config.database_name to the full url if you are not using localhost:5984
237
- * Ruby 1.9 was broken and is now working again
301
+ - allow to overwrite attribute accessor of properties and use super to call the original accessors
302
+ - allow read access to attributes that are present in the Couchdb document but not defined as properties
303
+ - support default values for properties via the :default parameter
304
+ - support attachments via the \_attachments property
305
+ - support for namespaces models
306
+ - removed belongs_to macro for now
307
+ - removed CouchPotato::Config.database_server, just set CouchPotato::Config.database_name to the full url if you are not using localhost:5984
308
+ - Ruby 1.9 was broken and is now working again
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in couch_potato.gemspec
4
4
  gemspec name: 'couch_potato'
5
+
6
+ group :test do
7
+ gem 'execjs'
8
+ end