mongo_mapper 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +8 -2
- data/VERSION +1 -1
- data/lib/mongo_mapper/associations/many_documents_proxy.rb +6 -0
- data/mongo_mapper.gemspec +5 -6
- data/test/functional/associations/test_belongs_to_polymorphic_proxy.rb +5 -5
- data/test/functional/associations/test_belongs_to_proxy.rb +4 -4
- data/test/functional/associations/test_many_documents_as_proxy.rb +2 -2
- data/test/functional/associations/test_many_embedded_polymorphic_proxy.rb +2 -2
- data/test/functional/associations/test_many_embedded_proxy.rb +4 -4
- data/test/functional/associations/test_many_polymorphic_proxy.rb +2 -2
- data/test/functional/associations/test_many_proxy.rb +38 -9
- data/test/functional/test_associations.rb +3 -3
- data/test/functional/test_binary.rb +1 -1
- data/test/functional/test_callbacks.rb +1 -1
- data/test/functional/test_dirty.rb +3 -3
- data/test/functional/test_document.rb +6 -6
- data/test/functional/test_embedded_document.rb +1 -1
- data/test/functional/test_pagination.rb +1 -1
- data/test/functional/test_rails_compatibility.rb +1 -1
- data/test/functional/test_validations.rb +9 -9
- data/test/models.rb +13 -12
- data/test/unit/test_document.rb +2 -2
- metadata +4 -4
data/Rakefile
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
require 'jeweler'
|
4
|
+
require 'yard'
|
5
|
+
require 'yard/rake/yardoc_task'
|
6
|
+
|
4
7
|
Jeweler::Tasks.new do |gem|
|
5
8
|
gem.name = "mongo_mapper"
|
6
9
|
gem.summary = %Q{Awesome gem for modeling your domain and storing it in mongo}
|
7
|
-
gem.description = %Q{Awesome gem for modeling your domain and storing it in mongo}
|
8
10
|
gem.email = "nunemaker@gmail.com"
|
9
11
|
gem.homepage = "http://github.com/jnunemaker/mongomapper"
|
10
12
|
gem.authors = ["John Nunemaker"]
|
11
13
|
|
12
14
|
gem.add_dependency('activesupport', '>= 2.3')
|
13
|
-
gem.add_dependency('mongo', '0.
|
15
|
+
gem.add_dependency('mongo', '0.16')
|
14
16
|
gem.add_dependency('jnunemaker-validatable', '1.8.0')
|
15
17
|
|
16
18
|
gem.add_development_dependency('jnunemaker-matchy', '0.4.0')
|
@@ -47,3 +49,7 @@ end
|
|
47
49
|
|
48
50
|
task :default => :test
|
49
51
|
task :test => :check_dependencies
|
52
|
+
|
53
|
+
YARD::Rake::YardocTask.new(:doc) do |t|
|
54
|
+
t.options = ["--legacy"]
|
55
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.8
|
data/mongo_mapper.gemspec
CHANGED
@@ -5,13 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mongo_mapper}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["John Nunemaker"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-29}
|
13
13
|
s.default_executable = %q{mmconsole}
|
14
|
-
s.description = %q{Awesome gem for modeling your domain and storing it in mongo}
|
15
14
|
s.email = %q{nunemaker@gmail.com}
|
16
15
|
s.executables = ["mmconsole"]
|
17
16
|
s.extra_rdoc_files = [
|
@@ -142,7 +141,7 @@ Gem::Specification.new do |s|
|
|
142
141
|
|
143
142
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
144
143
|
s.add_runtime_dependency(%q<activesupport>, [">= 2.3"])
|
145
|
-
s.add_runtime_dependency(%q<mongo>, ["= 0.
|
144
|
+
s.add_runtime_dependency(%q<mongo>, ["= 0.16"])
|
146
145
|
s.add_runtime_dependency(%q<jnunemaker-validatable>, ["= 1.8.0"])
|
147
146
|
s.add_development_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
|
148
147
|
s.add_development_dependency(%q<shoulda>, ["= 2.10.2"])
|
@@ -150,7 +149,7 @@ Gem::Specification.new do |s|
|
|
150
149
|
s.add_development_dependency(%q<mocha>, ["= 0.9.4"])
|
151
150
|
else
|
152
151
|
s.add_dependency(%q<activesupport>, [">= 2.3"])
|
153
|
-
s.add_dependency(%q<mongo>, ["= 0.
|
152
|
+
s.add_dependency(%q<mongo>, ["= 0.16"])
|
154
153
|
s.add_dependency(%q<jnunemaker-validatable>, ["= 1.8.0"])
|
155
154
|
s.add_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
|
156
155
|
s.add_dependency(%q<shoulda>, ["= 2.10.2"])
|
@@ -159,7 +158,7 @@ Gem::Specification.new do |s|
|
|
159
158
|
end
|
160
159
|
else
|
161
160
|
s.add_dependency(%q<activesupport>, [">= 2.3"])
|
162
|
-
s.add_dependency(%q<mongo>, ["= 0.
|
161
|
+
s.add_dependency(%q<mongo>, ["= 0.16"])
|
163
162
|
s.add_dependency(%q<jnunemaker-validatable>, ["= 1.8.0"])
|
164
163
|
s.add_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
|
165
164
|
s.add_dependency(%q<shoulda>, ["= 2.10.2"])
|
@@ -3,8 +3,8 @@ require 'models'
|
|
3
3
|
|
4
4
|
class BelongsToPolymorphicProxyTest < Test::Unit::TestCase
|
5
5
|
def setup
|
6
|
-
Status.collection.
|
7
|
-
Project.collection.
|
6
|
+
Status.collection.remove
|
7
|
+
Project.collection.remove
|
8
8
|
end
|
9
9
|
|
10
10
|
should "default to nil" do
|
@@ -14,7 +14,7 @@ class BelongsToPolymorphicProxyTest < Test::Unit::TestCase
|
|
14
14
|
end
|
15
15
|
|
16
16
|
should "be able to replace the association" do
|
17
|
-
status = Status.new
|
17
|
+
status = Status.new(:name => 'Foo!')
|
18
18
|
project = Project.new(:name => "mongomapper")
|
19
19
|
status.target = project
|
20
20
|
status.save.should be_true
|
@@ -27,7 +27,7 @@ class BelongsToPolymorphicProxyTest < Test::Unit::TestCase
|
|
27
27
|
end
|
28
28
|
|
29
29
|
should "unset the association" do
|
30
|
-
status = Status.new
|
30
|
+
status = Status.new(:name => 'Foo!')
|
31
31
|
project = Project.new(:name => "mongomapper")
|
32
32
|
status.target = project
|
33
33
|
status.save.should be_true
|
@@ -41,7 +41,7 @@ class BelongsToPolymorphicProxyTest < Test::Unit::TestCase
|
|
41
41
|
|
42
42
|
context "association id set but document not found" do
|
43
43
|
setup do
|
44
|
-
@status = Status.new
|
44
|
+
@status = Status.new(:name => 'Foo!')
|
45
45
|
project = Project.new(:name => "mongomapper")
|
46
46
|
@status.target = project
|
47
47
|
@status.save.should be_true
|
@@ -3,8 +3,8 @@ require 'models'
|
|
3
3
|
|
4
4
|
class BelongsToProxyTest < Test::Unit::TestCase
|
5
5
|
def setup
|
6
|
-
Status.collection.
|
7
|
-
Project.collection.
|
6
|
+
Status.collection.remove
|
7
|
+
Project.collection.remove
|
8
8
|
end
|
9
9
|
|
10
10
|
should "default to nil" do
|
@@ -14,7 +14,7 @@ class BelongsToProxyTest < Test::Unit::TestCase
|
|
14
14
|
end
|
15
15
|
|
16
16
|
should "be able to replace the association" do
|
17
|
-
status = Status.new
|
17
|
+
status = Status.new(:name => 'Foo!')
|
18
18
|
project = Project.new(:name => "mongomapper")
|
19
19
|
status.project = project
|
20
20
|
status.save.should be_true
|
@@ -25,7 +25,7 @@ class BelongsToProxyTest < Test::Unit::TestCase
|
|
25
25
|
end
|
26
26
|
|
27
27
|
should "unset the association" do
|
28
|
-
status = Status.new
|
28
|
+
status = Status.new(:name => 'Foo!')
|
29
29
|
project = Project.new(:name => "mongomapper")
|
30
30
|
status.project = project
|
31
31
|
status.save.should be_true
|
@@ -3,8 +3,8 @@ require 'models'
|
|
3
3
|
|
4
4
|
class ManyEmbeddedPolymorphicProxyTest < Test::Unit::TestCase
|
5
5
|
def setup
|
6
|
-
Catalog.collection.
|
7
|
-
TrModels::Fleet.collection.
|
6
|
+
Catalog.collection.remove
|
7
|
+
TrModels::Fleet.collection.remove
|
8
8
|
end
|
9
9
|
|
10
10
|
should "default reader to empty array" do
|
@@ -3,8 +3,8 @@ require 'models'
|
|
3
3
|
|
4
4
|
class ManyEmbeddedProxyTest < Test::Unit::TestCase
|
5
5
|
def setup
|
6
|
-
Project.collection.
|
7
|
-
RealPerson.collection.
|
6
|
+
Project.collection.remove
|
7
|
+
RealPerson.collection.remove
|
8
8
|
end
|
9
9
|
|
10
10
|
should "default reader to empty array" do
|
@@ -45,7 +45,7 @@ class ManyEmbeddedProxyTest < Test::Unit::TestCase
|
|
45
45
|
set_collection_name 'test'
|
46
46
|
key :person, Person
|
47
47
|
end
|
48
|
-
@document.collection.
|
48
|
+
@document.collection.remove
|
49
49
|
|
50
50
|
meg = Person.new(:name => "Meg")
|
51
51
|
meg.child = Person.new(:name => "Steve")
|
@@ -92,7 +92,7 @@ class ManyEmbeddedProxyTest < Test::Unit::TestCase
|
|
92
92
|
set_collection_name 'test'
|
93
93
|
many :people
|
94
94
|
end
|
95
|
-
@document.collection.
|
95
|
+
@document.collection.remove
|
96
96
|
end
|
97
97
|
|
98
98
|
should "persist all embedded documents" do
|
@@ -3,8 +3,8 @@ require 'models'
|
|
3
3
|
|
4
4
|
class ManyProxyTest < Test::Unit::TestCase
|
5
5
|
def setup
|
6
|
-
Project.collection.
|
7
|
-
Status.collection.
|
6
|
+
Project.collection.remove
|
7
|
+
Status.collection.remove
|
8
8
|
end
|
9
9
|
|
10
10
|
should "default reader to empty array" do
|
@@ -14,9 +14,9 @@ class ManyProxyTest < Test::Unit::TestCase
|
|
14
14
|
|
15
15
|
should "allow adding to association like it was an array" do
|
16
16
|
project = Project.new
|
17
|
-
project.statuses << Status.new
|
18
|
-
project.statuses.push Status.new
|
19
|
-
project.statuses.concat Status.new
|
17
|
+
project.statuses << Status.new(:name => 'Foo1!')
|
18
|
+
project.statuses.push Status.new(:name => 'Foo2!')
|
19
|
+
project.statuses.concat Status.new(:name => 'Foo3!')
|
20
20
|
project.statuses.size.should == 3
|
21
21
|
end
|
22
22
|
|
@@ -59,14 +59,14 @@ class ManyProxyTest < Test::Unit::TestCase
|
|
59
59
|
context "create" do
|
60
60
|
should "assign foreign key" do
|
61
61
|
project = Project.create
|
62
|
-
status = project.statuses.create
|
62
|
+
status = project.statuses.create(:name => 'Foo!')
|
63
63
|
status.project_id.should == project.id
|
64
64
|
end
|
65
65
|
|
66
66
|
should "save record" do
|
67
67
|
project = Project.create
|
68
68
|
lambda {
|
69
|
-
project.statuses.create
|
69
|
+
project.statuses.create(:name => 'Foo!')
|
70
70
|
}.should change { Status.count }
|
71
71
|
end
|
72
72
|
|
@@ -77,13 +77,42 @@ class ManyProxyTest < Test::Unit::TestCase
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
+
context "create!" do
|
81
|
+
should "assign foreign key" do
|
82
|
+
project = Project.create
|
83
|
+
status = project.statuses.create!(:name => 'Foo!')
|
84
|
+
status.project_id.should == project.id
|
85
|
+
end
|
86
|
+
|
87
|
+
should "save record" do
|
88
|
+
project = Project.create
|
89
|
+
lambda {
|
90
|
+
project.statuses.create!(:name => 'Foo!')
|
91
|
+
}.should change { Status.count }
|
92
|
+
end
|
93
|
+
|
94
|
+
should "allow passing attributes" do
|
95
|
+
project = Project.create
|
96
|
+
status = project.statuses.create!(:name => 'Foo!')
|
97
|
+
status.name.should == 'Foo!'
|
98
|
+
end
|
99
|
+
|
100
|
+
should "raise exception if not valid" do
|
101
|
+
project = Project.create
|
102
|
+
lambda {
|
103
|
+
project.statuses.create!(:name => nil)
|
104
|
+
}.should raise_error(MongoMapper::DocumentNotValid)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
|
80
109
|
context "count" do
|
81
110
|
should "work scoped to association" do
|
82
111
|
project = Project.create
|
83
|
-
3.times { project.statuses.create }
|
112
|
+
3.times { project.statuses.create(:name => 'Foo!') }
|
84
113
|
|
85
114
|
other_project = Project.create
|
86
|
-
2.times { other_project.statuses.create }
|
115
|
+
2.times { other_project.statuses.create(:name => 'Foo!') }
|
87
116
|
|
88
117
|
project.statuses.count.should == 3
|
89
118
|
other_project.statuses.count.should == 2
|
@@ -8,7 +8,7 @@ class AssociationsTest < Test::Unit::TestCase
|
|
8
8
|
|
9
9
|
many :posts, :class_name => 'AssociationsTest::AwesomePost', :foreign_key => :creator_id
|
10
10
|
end
|
11
|
-
AwesomeUser.collection.
|
11
|
+
AwesomeUser.collection.remove
|
12
12
|
|
13
13
|
class AwesomeTag
|
14
14
|
include MongoMapper::EmbeddedDocument
|
@@ -28,8 +28,8 @@ class AssociationsTest < Test::Unit::TestCase
|
|
28
28
|
many :tags, :class_name => 'AssociationsTest::AwesomeTag', :foreign_key => :post_id
|
29
29
|
end
|
30
30
|
|
31
|
-
AwesomeUser.collection.
|
32
|
-
AwesomePost.collection.
|
31
|
+
AwesomeUser.collection.remove
|
32
|
+
AwesomePost.collection.remove
|
33
33
|
|
34
34
|
user = AwesomeUser.create
|
35
35
|
tag1 = AwesomeTag.new(:name => 'awesome')
|
@@ -8,10 +8,10 @@ class DirtyTest < Test::Unit::TestCase
|
|
8
8
|
set_collection_name 'test'
|
9
9
|
key :phrase, String
|
10
10
|
end
|
11
|
-
@document.collection.
|
11
|
+
@document.collection.remove
|
12
12
|
|
13
|
-
Status.collection.
|
14
|
-
Project.collection.
|
13
|
+
Status.collection.remove
|
14
|
+
Project.collection.remove
|
15
15
|
end
|
16
16
|
|
17
17
|
context "marking changes" do
|
@@ -12,7 +12,7 @@ class DocumentTest < Test::Unit::TestCase
|
|
12
12
|
key :age, Integer
|
13
13
|
key :date, Date
|
14
14
|
end
|
15
|
-
@document.collection.
|
15
|
+
@document.collection.remove
|
16
16
|
end
|
17
17
|
|
18
18
|
context "Saving a document with a custom id" do
|
@@ -194,7 +194,7 @@ class DocumentTest < Test::Unit::TestCase
|
|
194
194
|
include MongoMapper::Document
|
195
195
|
set_collection_name 'test'
|
196
196
|
end
|
197
|
-
@document.collection.
|
197
|
+
@document.collection.remove
|
198
198
|
end
|
199
199
|
|
200
200
|
should "create the document" do
|
@@ -569,13 +569,13 @@ class DocumentTest < Test::Unit::TestCase
|
|
569
569
|
class ::Property
|
570
570
|
include MongoMapper::Document
|
571
571
|
end
|
572
|
-
Property.collection.
|
572
|
+
Property.collection.remove
|
573
573
|
|
574
574
|
class ::Thing
|
575
575
|
include MongoMapper::Document
|
576
576
|
key :name, String
|
577
577
|
end
|
578
|
-
Thing.collection.
|
578
|
+
Thing.collection.remove
|
579
579
|
end
|
580
580
|
|
581
581
|
teardown do
|
@@ -701,7 +701,7 @@ class DocumentTest < Test::Unit::TestCase
|
|
701
701
|
include MongoMapper::Document
|
702
702
|
set_collection_name 'foobarbazwickdoesnotexist'
|
703
703
|
end
|
704
|
-
@document.collection.
|
704
|
+
@document.collection.remove
|
705
705
|
|
706
706
|
klass.count.should == 0
|
707
707
|
end
|
@@ -952,7 +952,7 @@ class DocumentTest < Test::Unit::TestCase
|
|
952
952
|
key :_type, String
|
953
953
|
key :name, String
|
954
954
|
end
|
955
|
-
DocParent.collection.
|
955
|
+
DocParent.collection.remove
|
956
956
|
|
957
957
|
class ::DocDaughter < ::DocParent; end
|
958
958
|
class ::DocSon < ::DocParent; end
|
@@ -13,7 +13,7 @@ class PaginationTest < Test::Unit::TestCase
|
|
13
13
|
|
14
14
|
def self.per_page; 1 end
|
15
15
|
end
|
16
|
-
@document.collection.
|
16
|
+
@document.collection.remove
|
17
17
|
|
18
18
|
@doc1 = @document.create({:first_name => 'John', :last_name => 'Nunemaker', :age => '27'})
|
19
19
|
@doc2 = @document.create({:first_name => 'Steve', :last_name => 'Smith', :age => '28'})
|
@@ -8,7 +8,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
8
8
|
set_collection_name 'test'
|
9
9
|
key :name, String, :required => true
|
10
10
|
end
|
11
|
-
@document.collection.
|
11
|
+
@document.collection.remove
|
12
12
|
end
|
13
13
|
|
14
14
|
should "not insert document" do
|
@@ -32,7 +32,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
32
32
|
set_collection_name 'test'
|
33
33
|
key :name, String, :required => true
|
34
34
|
end
|
35
|
-
@document.collection.
|
35
|
+
@document.collection.remove
|
36
36
|
end
|
37
37
|
|
38
38
|
should "raise error" do
|
@@ -48,7 +48,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
48
48
|
set_collection_name 'test'
|
49
49
|
key :name, String, :required => true
|
50
50
|
end
|
51
|
-
@document.collection.
|
51
|
+
@document.collection.remove
|
52
52
|
end
|
53
53
|
|
54
54
|
should "raise error" do
|
@@ -68,7 +68,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
68
68
|
set_collection_name 'test'
|
69
69
|
key :name, String, :required => true
|
70
70
|
end
|
71
|
-
@document.collection.
|
71
|
+
@document.collection.remove
|
72
72
|
|
73
73
|
@doc = @document.create(:name => 'John Nunemaker')
|
74
74
|
end
|
@@ -97,7 +97,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
97
97
|
errors.add(:action, 'is invalid') if action.blank?
|
98
98
|
end
|
99
99
|
end
|
100
|
-
@document.collection.
|
100
|
+
@document.collection.remove
|
101
101
|
end
|
102
102
|
|
103
103
|
should "work with validate_on_create callback" do
|
@@ -140,7 +140,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
140
140
|
key :name, String
|
141
141
|
validates_uniqueness_of :name
|
142
142
|
end
|
143
|
-
@document.collection.
|
143
|
+
@document.collection.remove
|
144
144
|
end
|
145
145
|
|
146
146
|
should "not fail if object is new" do
|
@@ -223,7 +223,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
223
223
|
key :scope, String
|
224
224
|
validates_uniqueness_of :name, :scope => :scope
|
225
225
|
end
|
226
|
-
@document.collection.
|
226
|
+
@document.collection.remove
|
227
227
|
end
|
228
228
|
|
229
229
|
should "fail if the same name exists in the scope" do
|
@@ -264,7 +264,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
264
264
|
key :second_scope, String
|
265
265
|
validates_uniqueness_of :name, :scope => [:first_scope, :second_scope]
|
266
266
|
end
|
267
|
-
@document.collection.
|
267
|
+
@document.collection.remove
|
268
268
|
end
|
269
269
|
|
270
270
|
should "fail if the same name exists in the scope" do
|
@@ -303,7 +303,7 @@ class ValidationsTest < Test::Unit::TestCase
|
|
303
303
|
|
304
304
|
key :name, String, :unique => true
|
305
305
|
end
|
306
|
-
@document.collection.
|
306
|
+
@document.collection.remove
|
307
307
|
|
308
308
|
doc = @document.create(:name => 'John')
|
309
309
|
doc.should_not have_error_on(:name)
|
data/test/models.rb
CHANGED
@@ -109,23 +109,24 @@ class Answer
|
|
109
109
|
key :body, String
|
110
110
|
end
|
111
111
|
|
112
|
+
module PeopleExtensions
|
113
|
+
def find_by_name(name)
|
114
|
+
detect { |p| p.name == name }
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
module CollaboratorsExtensions
|
119
|
+
def top
|
120
|
+
first
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
112
124
|
class Project
|
113
125
|
include MongoMapper::Document
|
114
126
|
|
115
127
|
key :name, String
|
116
128
|
|
117
|
-
module PeopleExtensions
|
118
|
-
def find_by_name(name)
|
119
|
-
detect { |p| p.name == name }
|
120
|
-
end
|
121
|
-
end
|
122
129
|
many :people, :extend => PeopleExtensions
|
123
|
-
|
124
|
-
module CollaboratorsExtensions
|
125
|
-
def top
|
126
|
-
first
|
127
|
-
end
|
128
|
-
end
|
129
130
|
many :collaborators, :extend => CollaboratorsExtensions
|
130
131
|
|
131
132
|
many :statuses, :order => 'position' do
|
@@ -155,7 +156,7 @@ class Status
|
|
155
156
|
key :project_id, String
|
156
157
|
key :target_id, String
|
157
158
|
key :target_type, String
|
158
|
-
key :name, String
|
159
|
+
key :name, String, :required => true
|
159
160
|
key :position, Integer
|
160
161
|
|
161
162
|
belongs_to :project
|
data/test/unit/test_document.rb
CHANGED
@@ -8,7 +8,7 @@ class DocumentTest < Test::Unit::TestCase
|
|
8
8
|
include MongoMapper::Document
|
9
9
|
set_collection_name 'test'
|
10
10
|
end
|
11
|
-
@document.collection.
|
11
|
+
@document.collection.remove
|
12
12
|
end
|
13
13
|
|
14
14
|
should "have logger method" do
|
@@ -102,7 +102,7 @@ class DocumentTest < Test::Unit::TestCase
|
|
102
102
|
key :name, String
|
103
103
|
key :age, Integer
|
104
104
|
end
|
105
|
-
@document.collection.
|
105
|
+
@document.collection.remove
|
106
106
|
end
|
107
107
|
|
108
108
|
should "have access to logger" do
|
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.5.
|
4
|
+
version: 0.5.8
|
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: 2009-10-
|
12
|
+
date: 2009-10-29 00:00:00 -04: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.
|
33
|
+
version: "0.16"
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: jnunemaker-validatable
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: 0.9.4
|
84
84
|
version:
|
85
|
-
description:
|
85
|
+
description:
|
86
86
|
email: nunemaker@gmail.com
|
87
87
|
executables:
|
88
88
|
- mmconsole
|