mongo_mapper 0.6.10 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +5 -14
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/mongo_mapper.rb +48 -56
- data/lib/mongo_mapper/document.rb +136 -164
- data/lib/mongo_mapper/embedded_document.rb +29 -354
- data/lib/mongo_mapper/plugins.rb +31 -0
- data/lib/mongo_mapper/plugins/associations.rb +105 -0
- data/lib/mongo_mapper/plugins/associations/base.rb +123 -0
- data/lib/mongo_mapper/plugins/associations/belongs_to_polymorphic_proxy.rb +30 -0
- data/lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb +25 -0
- data/lib/mongo_mapper/plugins/associations/collection.rb +21 -0
- data/lib/mongo_mapper/plugins/associations/embedded_collection.rb +50 -0
- data/lib/mongo_mapper/plugins/associations/in_array_proxy.rb +139 -0
- data/lib/mongo_mapper/plugins/associations/many_documents_as_proxy.rb +28 -0
- data/lib/mongo_mapper/plugins/associations/many_documents_proxy.rb +117 -0
- data/lib/mongo_mapper/plugins/associations/many_embedded_polymorphic_proxy.rb +31 -0
- data/lib/mongo_mapper/plugins/associations/many_embedded_proxy.rb +23 -0
- data/lib/mongo_mapper/plugins/associations/many_polymorphic_proxy.rb +13 -0
- data/lib/mongo_mapper/plugins/associations/one_proxy.rb +68 -0
- data/lib/mongo_mapper/plugins/associations/proxy.rb +118 -0
- data/lib/mongo_mapper/plugins/callbacks.rb +65 -0
- data/lib/mongo_mapper/plugins/clone.rb +13 -0
- data/lib/mongo_mapper/plugins/descendants.rb +16 -0
- data/lib/mongo_mapper/plugins/dirty.rb +119 -0
- data/lib/mongo_mapper/plugins/equality.rb +23 -0
- data/lib/mongo_mapper/plugins/identity_map.rb +122 -0
- data/lib/mongo_mapper/plugins/inspect.rb +14 -0
- data/lib/mongo_mapper/plugins/keys.rb +324 -0
- data/lib/mongo_mapper/plugins/logger.rb +17 -0
- data/lib/mongo_mapper/plugins/pagination.rb +24 -0
- data/lib/mongo_mapper/plugins/pagination/proxy.rb +68 -0
- data/lib/mongo_mapper/plugins/protected.rb +45 -0
- data/lib/mongo_mapper/plugins/rails.rb +45 -0
- data/lib/mongo_mapper/plugins/serialization.rb +105 -0
- data/lib/mongo_mapper/plugins/validations.rb +46 -0
- data/lib/mongo_mapper/query.rb +130 -0
- data/lib/mongo_mapper/support.rb +40 -17
- data/lib/mongo_mapper/support/descendant_appends.rb +46 -0
- data/lib/mongo_mapper/support/find.rb +77 -0
- data/mongo_mapper.gemspec +55 -38
- data/performance/read_write.rb +52 -0
- data/specs.watchr +23 -2
- data/test/functional/associations/test_belongs_to_proxy.rb +12 -10
- data/test/functional/associations/test_many_documents_as_proxy.rb +4 -21
- data/test/functional/associations/test_many_documents_proxy.rb +2 -8
- data/test/functional/associations/test_many_embedded_polymorphic_proxy.rb +59 -39
- data/test/functional/associations/test_many_embedded_proxy.rb +145 -81
- data/test/functional/associations/test_many_polymorphic_proxy.rb +2 -40
- data/test/functional/associations/test_one_proxy.rb +25 -10
- data/test/functional/test_binary.rb +2 -8
- data/test/functional/test_callbacks.rb +1 -5
- data/test/functional/test_dirty.rb +27 -23
- data/test/functional/test_document.rb +224 -165
- data/test/functional/test_embedded_document.rb +72 -82
- data/test/functional/test_identity_map.rb +508 -0
- data/test/functional/test_modifiers.rb +15 -5
- data/test/functional/test_pagination.rb +1 -3
- data/test/functional/test_protected.rb +155 -0
- data/test/functional/test_string_id_compatibility.rb +7 -12
- data/test/functional/test_validations.rb +26 -58
- data/test/models.rb +0 -39
- data/test/test_helper.rb +37 -3
- data/test/unit/associations/test_base.rb +5 -5
- data/test/unit/associations/test_proxy.rb +8 -6
- data/test/unit/test_descendant_appends.rb +71 -0
- data/test/unit/test_document.rb +71 -76
- data/test/unit/test_dynamic_finder.rb +27 -29
- data/test/unit/test_embedded_document.rb +555 -601
- data/test/unit/{test_key.rb → test_keys.rb} +2 -5
- data/test/unit/test_mongo_mapper.rb +69 -9
- data/test/unit/test_pagination.rb +40 -32
- data/test/unit/test_plugins.rb +50 -0
- data/test/unit/{test_finder_options.rb → test_query.rb} +74 -65
- data/test/unit/test_rails.rb +123 -0
- data/test/unit/{test_serializations.rb → test_serialization.rb} +1 -2
- data/test/unit/test_support.rb +23 -7
- data/test/unit/test_time_zones.rb +3 -4
- data/test/unit/test_validations.rb +58 -17
- metadata +53 -36
- data/lib/mongo_mapper/associations.rb +0 -78
- data/lib/mongo_mapper/associations/base.rb +0 -119
- data/lib/mongo_mapper/associations/belongs_to_polymorphic_proxy.rb +0 -26
- data/lib/mongo_mapper/associations/belongs_to_proxy.rb +0 -21
- data/lib/mongo_mapper/associations/collection.rb +0 -19
- data/lib/mongo_mapper/associations/in_array_proxy.rb +0 -137
- data/lib/mongo_mapper/associations/many_documents_as_proxy.rb +0 -26
- data/lib/mongo_mapper/associations/many_documents_proxy.rb +0 -115
- data/lib/mongo_mapper/associations/many_embedded_polymorphic_proxy.rb +0 -31
- data/lib/mongo_mapper/associations/many_embedded_proxy.rb +0 -54
- data/lib/mongo_mapper/associations/many_polymorphic_proxy.rb +0 -11
- data/lib/mongo_mapper/associations/one_proxy.rb +0 -64
- data/lib/mongo_mapper/associations/proxy.rb +0 -116
- data/lib/mongo_mapper/callbacks.rb +0 -61
- data/lib/mongo_mapper/dirty.rb +0 -117
- data/lib/mongo_mapper/dynamic_finder.rb +0 -74
- data/lib/mongo_mapper/finder_options.rb +0 -145
- data/lib/mongo_mapper/key.rb +0 -36
- data/lib/mongo_mapper/mongo_mapper.rb +0 -125
- data/lib/mongo_mapper/pagination.rb +0 -66
- data/lib/mongo_mapper/rails_compatibility/document.rb +0 -15
- data/lib/mongo_mapper/rails_compatibility/embedded_document.rb +0 -28
- data/lib/mongo_mapper/serialization.rb +0 -54
- data/lib/mongo_mapper/serializers/json_serializer.rb +0 -48
- data/lib/mongo_mapper/validations.rb +0 -39
- data/test/functional/test_rails_compatibility.rb +0 -25
@@ -0,0 +1,123 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TestRails < Test::Unit::TestCase
|
4
|
+
context "Document" do
|
5
|
+
setup do
|
6
|
+
@klass = Doc('Post') do
|
7
|
+
key :foo, String
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
context "Class methods" do
|
12
|
+
should "alias has_many to many" do
|
13
|
+
@klass.should respond_to(:has_many)
|
14
|
+
end
|
15
|
+
|
16
|
+
should "alias has_one to one" do
|
17
|
+
@klass.should respond_to(:has_one)
|
18
|
+
end
|
19
|
+
|
20
|
+
should "have column names" do
|
21
|
+
@klass.column_names.sort.should == ['_id', 'foo']
|
22
|
+
end
|
23
|
+
|
24
|
+
should "implement human_name" do
|
25
|
+
@klass.human_name.should == 'Post'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "Instance methods" do
|
30
|
+
setup do
|
31
|
+
@klass.class_eval do
|
32
|
+
def bar=(value)
|
33
|
+
write_attribute(:foo, value)
|
34
|
+
end
|
35
|
+
|
36
|
+
def bar_before_typecast
|
37
|
+
read_attribute_before_typecast(:foo)
|
38
|
+
end
|
39
|
+
|
40
|
+
def bar
|
41
|
+
read_attribute(:foo)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
should "alias new_record? to new?" do
|
47
|
+
@klass.new.should be_new_record
|
48
|
+
end
|
49
|
+
|
50
|
+
should "be able to read key with read_attribute" do
|
51
|
+
@klass.new(:foo => 'Bar').bar.should == 'Bar'
|
52
|
+
end
|
53
|
+
|
54
|
+
should "be able to read key before typecast with read_attribute_before_typecast" do
|
55
|
+
@klass.new(:foo => 21).bar_before_typecast.should == 21
|
56
|
+
@klass.new(:foo => 21).bar.should == '21'
|
57
|
+
end
|
58
|
+
|
59
|
+
should "be able to write key with write_attribute" do
|
60
|
+
@klass.new(:bar => 'Setting Foo').foo.should == 'Setting Foo'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context "EmbeddedDocument" do
|
66
|
+
setup do
|
67
|
+
@klass = EDoc('Post') { key :foo, String }
|
68
|
+
end
|
69
|
+
|
70
|
+
context "Class methods" do
|
71
|
+
should "alias has_many to many" do
|
72
|
+
@klass.should respond_to(:has_many)
|
73
|
+
end
|
74
|
+
|
75
|
+
should "alias has_one to one" do
|
76
|
+
@klass.should respond_to(:has_one)
|
77
|
+
end
|
78
|
+
|
79
|
+
should "have column names" do
|
80
|
+
@klass.column_names.sort.should == ['_id', 'foo']
|
81
|
+
end
|
82
|
+
|
83
|
+
should "implement human_name" do
|
84
|
+
@klass.human_name.should == 'Post'
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
context "Instance methods" do
|
89
|
+
setup do
|
90
|
+
@klass.class_eval do
|
91
|
+
def bar=(value)
|
92
|
+
write_attribute(:foo, value)
|
93
|
+
end
|
94
|
+
|
95
|
+
def bar_before_typecast
|
96
|
+
read_attribute_before_typecast(:foo)
|
97
|
+
end
|
98
|
+
|
99
|
+
def bar
|
100
|
+
read_attribute(:foo)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
should "alias new_record? to new?" do
|
106
|
+
@klass.new.should be_new_record
|
107
|
+
end
|
108
|
+
|
109
|
+
should "be able to read key with read_attribute" do
|
110
|
+
@klass.new(:foo => 'Bar').bar.should == 'Bar'
|
111
|
+
end
|
112
|
+
|
113
|
+
should "be able to read key before typecast with read_attribute_before_typecast" do
|
114
|
+
@klass.new(:foo => 21).bar_before_typecast.should == 21
|
115
|
+
@klass.new(:foo => 21).bar.should == '21'
|
116
|
+
end
|
117
|
+
|
118
|
+
should "be able to write key with write_attribute" do
|
119
|
+
@klass.new(:bar => 'Setting Foo').foo.should == 'Setting Foo'
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
data/test/unit/test_support.rb
CHANGED
@@ -90,6 +90,10 @@ class SupportTest < Test::Unit::TestCase
|
|
90
90
|
Date.to_mongo(Date.new(2009, 10, 1)).should == Time.utc(2009, 10, 1)
|
91
91
|
end
|
92
92
|
|
93
|
+
should "be date if time" do
|
94
|
+
Date.to_mongo(Time.parse("2009-10-1T12:30:00")).should == Time.utc(2009, 10, 1)
|
95
|
+
end
|
96
|
+
|
93
97
|
should "be nil if bogus string" do
|
94
98
|
Date.to_mongo('jdsafop874').should be_nil
|
95
99
|
end
|
@@ -263,9 +267,17 @@ class SupportTest < Test::Unit::TestCase
|
|
263
267
|
end
|
264
268
|
end
|
265
269
|
|
270
|
+
context "Symbol" do
|
271
|
+
%w(gt lt gte lte ne in nin mod all size where exists asc desc).each do |operator|
|
272
|
+
should "have $#{operator} operator" do
|
273
|
+
:foo.respond_to?(operator)
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
266
278
|
context "Time#to_mongo without Time.zone" do
|
267
|
-
should "be time if string" do
|
268
|
-
Time.to_mongo('2000-01-01 01:01:01.123456').should == Time.local(2000, 1, 1, 1, 1, 1,
|
279
|
+
should "be time to milliseconds if string" do
|
280
|
+
Time.to_mongo('2000-01-01 01:01:01.123456').should == Time.local(2000, 1, 1, 1, 1, 1, 123000).utc
|
269
281
|
end
|
270
282
|
|
271
283
|
should "be time in utc if time" do
|
@@ -282,15 +294,15 @@ class SupportTest < Test::Unit::TestCase
|
|
282
294
|
end
|
283
295
|
|
284
296
|
context "Time#to_mongo with Time.zone" do
|
285
|
-
should "be time if time" do
|
297
|
+
should "be time to milliseconds if time" do
|
286
298
|
Time.zone = 'Hawaii'
|
287
|
-
Time.to_mongo(Time.zone.local(2009, 8, 15, 14, 0, 0)).should == Time.utc(2009, 8, 16, 0, 0, 0)
|
299
|
+
Time.to_mongo(Time.zone.local(2009, 8, 15, 14, 0, 0, 123456)).should == Time.utc(2009, 8, 16, 0, 0, 0, 123000)
|
288
300
|
Time.zone = nil
|
289
301
|
end
|
290
302
|
|
291
|
-
should "be time if string" do
|
303
|
+
should "be time to milliseconds if string" do
|
292
304
|
Time.zone = 'Hawaii'
|
293
|
-
Time.to_mongo('2009-08-15 14:00:00').should == Time.utc(2009, 8, 16, 0, 0, 0)
|
305
|
+
Time.to_mongo('2009-08-15 14:00:00.123456').should == Time.utc(2009, 8, 16, 0, 0, 0, 123000)
|
294
306
|
Time.zone = nil
|
295
307
|
end
|
296
308
|
|
@@ -341,6 +353,10 @@ class SupportTest < Test::Unit::TestCase
|
|
341
353
|
id = Mongo::ObjectID.new
|
342
354
|
id.to_json.should == %Q("#{id}")
|
343
355
|
end
|
356
|
+
|
357
|
+
should "support ruby driver syntax also" do
|
358
|
+
id = Mongo::ObjectID.new
|
359
|
+
id.original_to_json.should == %Q({"$oid": "#{id}"})
|
360
|
+
end
|
344
361
|
end
|
345
|
-
|
346
362
|
end
|
@@ -3,8 +3,7 @@ require 'test_helper'
|
|
3
3
|
class TimeZonesTest < Test::Unit::TestCase
|
4
4
|
context "An instance of an embedded document" do
|
5
5
|
setup do
|
6
|
-
@document =
|
7
|
-
include MongoMapper::EmbeddedDocument
|
6
|
+
@document = EDoc do
|
8
7
|
key :name, String
|
9
8
|
key :created_at, Time
|
10
9
|
end
|
@@ -27,10 +26,10 @@ class TimeZonesTest < Test::Unit::TestCase
|
|
27
26
|
Time.zone = nil
|
28
27
|
end
|
29
28
|
|
30
|
-
|
29
|
+
should "work with timezones that are not UTC" do
|
31
30
|
Time.zone = 'Hawaii'
|
32
31
|
|
33
|
-
doc = @document.new(:created_at =>
|
32
|
+
doc = @document.new(:created_at => "2009-08-15 14:00:00")
|
34
33
|
doc.created_at.is_a?(ActiveSupport::TimeWithZone).should be_true
|
35
34
|
doc.created_at.should == Time.utc(2009, 8, 16)
|
36
35
|
|
@@ -2,14 +2,9 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class ValidationsTest < Test::Unit::TestCase
|
4
4
|
context "Validations" do
|
5
|
-
|
6
5
|
context "on a Document" do
|
7
|
-
|
8
6
|
setup do
|
9
|
-
@document =
|
10
|
-
include MongoMapper::Document
|
11
|
-
set_collection_name 'test'
|
12
|
-
end
|
7
|
+
@document = Doc()
|
13
8
|
end
|
14
9
|
|
15
10
|
context "Validating acceptance of" do
|
@@ -180,7 +175,20 @@ class ValidationsTest < Test::Unit::TestCase
|
|
180
175
|
doc.action = 'kick'
|
181
176
|
doc.should have_error_on(:action, 'is reserved')
|
182
177
|
end
|
183
|
-
|
178
|
+
|
179
|
+
should "work with :not_in shortcut on key definition" do
|
180
|
+
@document.key :action, String, :not_in => %w(kick run)
|
181
|
+
|
182
|
+
doc = @document.new
|
183
|
+
doc.should_not have_error_on(:action)
|
184
|
+
|
185
|
+
doc.action = 'fart'
|
186
|
+
doc.should_not have_error_on(:action)
|
187
|
+
|
188
|
+
doc.action = 'kick'
|
189
|
+
doc.should have_error_on(:action, 'is reserved')
|
190
|
+
end
|
191
|
+
|
184
192
|
should "not have error if allow nil is true and value is nil" do
|
185
193
|
@document.key :action, String
|
186
194
|
@document.validates_exclusion_of :action, :within => %w(kick run), :allow_nil => true
|
@@ -219,6 +227,19 @@ class ValidationsTest < Test::Unit::TestCase
|
|
219
227
|
doc.action = 'kick'
|
220
228
|
doc.should_not have_error_on(:action)
|
221
229
|
end
|
230
|
+
|
231
|
+
should "work with :in shortcut on key definition" do
|
232
|
+
@document.key :action, String, :in => %w(kick run)
|
233
|
+
|
234
|
+
doc = @document.new
|
235
|
+
doc.should have_error_on(:action, 'is not in the list')
|
236
|
+
|
237
|
+
doc.action = 'fart'
|
238
|
+
doc.should have_error_on(:action, 'is not in the list')
|
239
|
+
|
240
|
+
doc.action = 'kick'
|
241
|
+
doc.should_not have_error_on(:action)
|
242
|
+
end
|
222
243
|
|
223
244
|
should "not have error if allow nil is true and value is nil" do
|
224
245
|
@document.key :action, String
|
@@ -240,11 +261,8 @@ class ValidationsTest < Test::Unit::TestCase
|
|
240
261
|
end # End on a Document
|
241
262
|
|
242
263
|
context "On an EmbeddedDocument" do
|
243
|
-
|
244
264
|
setup do
|
245
|
-
@embedded_doc =
|
246
|
-
include MongoMapper::EmbeddedDocument
|
247
|
-
end
|
265
|
+
@embedded_doc = EDoc()
|
248
266
|
end
|
249
267
|
|
250
268
|
context "Validating acceptance of" do
|
@@ -415,6 +433,19 @@ class ValidationsTest < Test::Unit::TestCase
|
|
415
433
|
doc.action = 'kick'
|
416
434
|
doc.should have_error_on(:action, 'is reserved')
|
417
435
|
end
|
436
|
+
|
437
|
+
should "work with :not_in shortcut on key definition" do
|
438
|
+
@embedded_doc.key :action, String, :not_in => %w(kick run)
|
439
|
+
|
440
|
+
doc = @embedded_doc.new
|
441
|
+
doc.should_not have_error_on(:action)
|
442
|
+
|
443
|
+
doc.action = 'fart'
|
444
|
+
doc.should_not have_error_on(:action)
|
445
|
+
|
446
|
+
doc.action = 'kick'
|
447
|
+
doc.should have_error_on(:action, 'is reserved')
|
448
|
+
end
|
418
449
|
|
419
450
|
should "not have error if allow nil is true and value is nil" do
|
420
451
|
@embedded_doc.key :action, String
|
@@ -454,7 +485,20 @@ class ValidationsTest < Test::Unit::TestCase
|
|
454
485
|
doc.action = 'kick'
|
455
486
|
doc.should_not have_error_on(:action)
|
456
487
|
end
|
457
|
-
|
488
|
+
|
489
|
+
should "work with :in shortcut on key definition" do
|
490
|
+
@embedded_doc.key :action, String, :in => %w(kick run)
|
491
|
+
|
492
|
+
doc = @embedded_doc.new
|
493
|
+
doc.should have_error_on(:action, 'is not in the list')
|
494
|
+
|
495
|
+
doc.action = 'fart'
|
496
|
+
doc.should have_error_on(:action, 'is not in the list')
|
497
|
+
|
498
|
+
doc.action = 'kick'
|
499
|
+
doc.should_not have_error_on(:action)
|
500
|
+
end
|
501
|
+
|
458
502
|
should "not have error if allow nil is true and value is nil" do
|
459
503
|
@embedded_doc.key :action, String
|
460
504
|
@embedded_doc.validates_inclusion_of :action, :within => %w(kick run), :allow_nil => true
|
@@ -478,10 +522,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
478
522
|
|
479
523
|
context "Adding validation errors" do
|
480
524
|
setup do
|
481
|
-
@document =
|
482
|
-
include MongoMapper::Document
|
483
|
-
set_collection_name 'test'
|
484
|
-
|
525
|
+
@document = Doc do
|
485
526
|
key :action, String
|
486
527
|
def action_present
|
487
528
|
errors.add(:action, 'is invalid') if action.blank?
|
@@ -500,4 +541,4 @@ class ValidationsTest < Test::Unit::TestCase
|
|
500
541
|
doc.should_not have_error_on(:action)
|
501
542
|
end
|
502
543
|
end
|
503
|
-
end
|
544
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo_mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-10 00:00:00 -05:00
|
13
13
|
default_executable: mmconsole
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.18.
|
33
|
+
version: 0.18.3
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: jnunemaker-validatable
|
@@ -99,35 +99,44 @@ files:
|
|
99
99
|
- VERSION
|
100
100
|
- bin/mmconsole
|
101
101
|
- lib/mongo_mapper.rb
|
102
|
-
- lib/mongo_mapper/associations.rb
|
103
|
-
- lib/mongo_mapper/associations/base.rb
|
104
|
-
- lib/mongo_mapper/associations/belongs_to_polymorphic_proxy.rb
|
105
|
-
- lib/mongo_mapper/associations/belongs_to_proxy.rb
|
106
|
-
- lib/mongo_mapper/associations/collection.rb
|
107
|
-
- lib/mongo_mapper/associations/in_array_proxy.rb
|
108
|
-
- lib/mongo_mapper/associations/many_documents_as_proxy.rb
|
109
|
-
- lib/mongo_mapper/associations/many_documents_proxy.rb
|
110
|
-
- lib/mongo_mapper/associations/many_embedded_polymorphic_proxy.rb
|
111
|
-
- lib/mongo_mapper/associations/many_embedded_proxy.rb
|
112
|
-
- lib/mongo_mapper/associations/many_polymorphic_proxy.rb
|
113
|
-
- lib/mongo_mapper/associations/one_proxy.rb
|
114
|
-
- lib/mongo_mapper/associations/proxy.rb
|
115
|
-
- lib/mongo_mapper/callbacks.rb
|
116
|
-
- lib/mongo_mapper/dirty.rb
|
117
102
|
- lib/mongo_mapper/document.rb
|
118
|
-
- lib/mongo_mapper/dynamic_finder.rb
|
119
103
|
- lib/mongo_mapper/embedded_document.rb
|
120
|
-
- lib/mongo_mapper/
|
121
|
-
- lib/mongo_mapper/
|
122
|
-
- lib/mongo_mapper/
|
123
|
-
- lib/mongo_mapper/
|
124
|
-
- lib/mongo_mapper/
|
125
|
-
- lib/mongo_mapper/
|
126
|
-
- lib/mongo_mapper/
|
127
|
-
- lib/mongo_mapper/
|
104
|
+
- lib/mongo_mapper/plugins.rb
|
105
|
+
- lib/mongo_mapper/plugins/associations.rb
|
106
|
+
- lib/mongo_mapper/plugins/associations/base.rb
|
107
|
+
- lib/mongo_mapper/plugins/associations/belongs_to_polymorphic_proxy.rb
|
108
|
+
- lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb
|
109
|
+
- lib/mongo_mapper/plugins/associations/collection.rb
|
110
|
+
- lib/mongo_mapper/plugins/associations/embedded_collection.rb
|
111
|
+
- lib/mongo_mapper/plugins/associations/in_array_proxy.rb
|
112
|
+
- lib/mongo_mapper/plugins/associations/many_documents_as_proxy.rb
|
113
|
+
- lib/mongo_mapper/plugins/associations/many_documents_proxy.rb
|
114
|
+
- lib/mongo_mapper/plugins/associations/many_embedded_polymorphic_proxy.rb
|
115
|
+
- lib/mongo_mapper/plugins/associations/many_embedded_proxy.rb
|
116
|
+
- lib/mongo_mapper/plugins/associations/many_polymorphic_proxy.rb
|
117
|
+
- lib/mongo_mapper/plugins/associations/one_proxy.rb
|
118
|
+
- lib/mongo_mapper/plugins/associations/proxy.rb
|
119
|
+
- lib/mongo_mapper/plugins/callbacks.rb
|
120
|
+
- lib/mongo_mapper/plugins/clone.rb
|
121
|
+
- lib/mongo_mapper/plugins/descendants.rb
|
122
|
+
- lib/mongo_mapper/plugins/dirty.rb
|
123
|
+
- lib/mongo_mapper/plugins/equality.rb
|
124
|
+
- lib/mongo_mapper/plugins/identity_map.rb
|
125
|
+
- lib/mongo_mapper/plugins/inspect.rb
|
126
|
+
- lib/mongo_mapper/plugins/keys.rb
|
127
|
+
- lib/mongo_mapper/plugins/logger.rb
|
128
|
+
- lib/mongo_mapper/plugins/pagination.rb
|
129
|
+
- lib/mongo_mapper/plugins/pagination/proxy.rb
|
130
|
+
- lib/mongo_mapper/plugins/protected.rb
|
131
|
+
- lib/mongo_mapper/plugins/rails.rb
|
132
|
+
- lib/mongo_mapper/plugins/serialization.rb
|
133
|
+
- lib/mongo_mapper/plugins/validations.rb
|
134
|
+
- lib/mongo_mapper/query.rb
|
128
135
|
- lib/mongo_mapper/support.rb
|
129
|
-
- lib/mongo_mapper/
|
136
|
+
- lib/mongo_mapper/support/descendant_appends.rb
|
137
|
+
- lib/mongo_mapper/support/find.rb
|
130
138
|
- mongo_mapper.gemspec
|
139
|
+
- performance/read_write.rb
|
131
140
|
- specs.watchr
|
132
141
|
- test/NOTE_ON_TESTING
|
133
142
|
- test/functional/associations/test_belongs_to_polymorphic_proxy.rb
|
@@ -145,10 +154,11 @@ files:
|
|
145
154
|
- test/functional/test_dirty.rb
|
146
155
|
- test/functional/test_document.rb
|
147
156
|
- test/functional/test_embedded_document.rb
|
157
|
+
- test/functional/test_identity_map.rb
|
148
158
|
- test/functional/test_logger.rb
|
149
159
|
- test/functional/test_modifiers.rb
|
150
160
|
- test/functional/test_pagination.rb
|
151
|
-
- test/functional/
|
161
|
+
- test/functional/test_protected.rb
|
152
162
|
- test/functional/test_string_id_compatibility.rb
|
153
163
|
- test/functional/test_validations.rb
|
154
164
|
- test/models.rb
|
@@ -158,15 +168,18 @@ files:
|
|
158
168
|
- test/unit/associations/test_base.rb
|
159
169
|
- test/unit/associations/test_proxy.rb
|
160
170
|
- test/unit/serializers/test_json_serializer.rb
|
171
|
+
- test/unit/test_descendant_appends.rb
|
161
172
|
- test/unit/test_document.rb
|
162
173
|
- test/unit/test_dynamic_finder.rb
|
163
174
|
- test/unit/test_embedded_document.rb
|
164
|
-
- test/unit/
|
165
|
-
- test/unit/test_key.rb
|
175
|
+
- test/unit/test_keys.rb
|
166
176
|
- test/unit/test_mongo_mapper.rb
|
167
177
|
- test/unit/test_pagination.rb
|
178
|
+
- test/unit/test_plugins.rb
|
179
|
+
- test/unit/test_query.rb
|
180
|
+
- test/unit/test_rails.rb
|
168
181
|
- test/unit/test_rails_compatibility.rb
|
169
|
-
- test/unit/
|
182
|
+
- test/unit/test_serialization.rb
|
170
183
|
- test/unit/test_support.rb
|
171
184
|
- test/unit/test_time_zones.rb
|
172
185
|
- test/unit/test_validations.rb
|
@@ -214,10 +227,11 @@ test_files:
|
|
214
227
|
- test/functional/test_dirty.rb
|
215
228
|
- test/functional/test_document.rb
|
216
229
|
- test/functional/test_embedded_document.rb
|
230
|
+
- test/functional/test_identity_map.rb
|
217
231
|
- test/functional/test_logger.rb
|
218
232
|
- test/functional/test_modifiers.rb
|
219
233
|
- test/functional/test_pagination.rb
|
220
|
-
- test/functional/
|
234
|
+
- test/functional/test_protected.rb
|
221
235
|
- test/functional/test_string_id_compatibility.rb
|
222
236
|
- test/functional/test_validations.rb
|
223
237
|
- test/models.rb
|
@@ -227,15 +241,18 @@ test_files:
|
|
227
241
|
- test/unit/associations/test_base.rb
|
228
242
|
- test/unit/associations/test_proxy.rb
|
229
243
|
- test/unit/serializers/test_json_serializer.rb
|
244
|
+
- test/unit/test_descendant_appends.rb
|
230
245
|
- test/unit/test_document.rb
|
231
246
|
- test/unit/test_dynamic_finder.rb
|
232
247
|
- test/unit/test_embedded_document.rb
|
233
|
-
- test/unit/
|
234
|
-
- test/unit/test_key.rb
|
248
|
+
- test/unit/test_keys.rb
|
235
249
|
- test/unit/test_mongo_mapper.rb
|
236
250
|
- test/unit/test_pagination.rb
|
251
|
+
- test/unit/test_plugins.rb
|
252
|
+
- test/unit/test_query.rb
|
253
|
+
- test/unit/test_rails.rb
|
237
254
|
- test/unit/test_rails_compatibility.rb
|
238
|
-
- test/unit/
|
255
|
+
- test/unit/test_serialization.rb
|
239
256
|
- test/unit/test_support.rb
|
240
257
|
- test/unit/test_time_zones.rb
|
241
258
|
- test/unit/test_validations.rb
|