hashrocket-mongomapper 0.3.5 → 0.3.6
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/VERSION +1 -1
- data/lib/mongomapper/associations/proxy.rb +1 -0
- data/lib/mongomapper/embedded_document.rb +1 -1
- data/lib/mongomapper/support.rb +1 -1
- data/mongomapper.gemspec +142 -0
- data/test/unit/test_embedded_document.rb +15 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
@@ -227,7 +227,7 @@ module MongoMapper
|
|
227
227
|
|
228
228
|
def inspect
|
229
229
|
attributes_as_nice_string = self.class.keys.keys.collect do |name|
|
230
|
-
"#{name}: #{read_attribute(name)}"
|
230
|
+
"#{name}: #{read_attribute(name).inspect}"
|
231
231
|
end.join(", ")
|
232
232
|
"#<#{self.class} #{attributes_as_nice_string}>"
|
233
233
|
end
|
data/lib/mongomapper/support.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class BasicObject #:nodoc:
|
2
|
-
instance_methods.each { |m| undef_method m unless m =~ /(^__|^nil\?$|^send$|instance_eval|proxy_|^object_id$)/ }
|
2
|
+
instance_methods.each { |m| undef_method m unless m =~ /(^__|^nil\?$|^send$|^methods$|instance_eval|proxy_|^object_id$)/ }
|
3
3
|
end unless defined?(BasicObject)
|
4
4
|
|
5
5
|
class Boolean
|
data/mongomapper.gemspec
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{mongomapper}
|
8
|
+
s.version = "0.3.6"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["John Nunemaker"]
|
12
|
+
s.date = %q{2009-09-03}
|
13
|
+
s.default_executable = %q{mmconsole}
|
14
|
+
s.email = %q{nunemaker@gmail.com}
|
15
|
+
s.executables = ["mmconsole"]
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE",
|
18
|
+
"README.rdoc"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".gitignore",
|
22
|
+
"History",
|
23
|
+
"LICENSE",
|
24
|
+
"README.rdoc",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"bin/mmconsole",
|
28
|
+
"lib/mongomapper.rb",
|
29
|
+
"lib/mongomapper/associations.rb",
|
30
|
+
"lib/mongomapper/associations/base.rb",
|
31
|
+
"lib/mongomapper/associations/belongs_to_polymorphic_proxy.rb",
|
32
|
+
"lib/mongomapper/associations/belongs_to_proxy.rb",
|
33
|
+
"lib/mongomapper/associations/many_documents_proxy.rb",
|
34
|
+
"lib/mongomapper/associations/many_embedded_polymorphic_proxy.rb",
|
35
|
+
"lib/mongomapper/associations/many_embedded_proxy.rb",
|
36
|
+
"lib/mongomapper/associations/many_polymorphic_proxy.rb",
|
37
|
+
"lib/mongomapper/associations/many_proxy.rb",
|
38
|
+
"lib/mongomapper/associations/proxy.rb",
|
39
|
+
"lib/mongomapper/callbacks.rb",
|
40
|
+
"lib/mongomapper/document.rb",
|
41
|
+
"lib/mongomapper/dynamic_finder.rb",
|
42
|
+
"lib/mongomapper/embedded_document.rb",
|
43
|
+
"lib/mongomapper/finder_options.rb",
|
44
|
+
"lib/mongomapper/key.rb",
|
45
|
+
"lib/mongomapper/observing.rb",
|
46
|
+
"lib/mongomapper/pagination.rb",
|
47
|
+
"lib/mongomapper/rails_compatibility/document.rb",
|
48
|
+
"lib/mongomapper/rails_compatibility/embedded_document.rb",
|
49
|
+
"lib/mongomapper/save_with_validation.rb",
|
50
|
+
"lib/mongomapper/serialization.rb",
|
51
|
+
"lib/mongomapper/serializers/json_serializer.rb",
|
52
|
+
"lib/mongomapper/support.rb",
|
53
|
+
"lib/mongomapper/validations.rb",
|
54
|
+
"mongomapper.gemspec",
|
55
|
+
"test/NOTE_ON_TESTING",
|
56
|
+
"test/functional/associations/test_belongs_to_polymorphic_proxy.rb",
|
57
|
+
"test/functional/associations/test_belongs_to_proxy.rb",
|
58
|
+
"test/functional/associations/test_many_embedded_polymorphic_proxy.rb",
|
59
|
+
"test/functional/associations/test_many_embedded_proxy.rb",
|
60
|
+
"test/functional/associations/test_many_polymorphic_proxy.rb",
|
61
|
+
"test/functional/associations/test_many_proxy.rb",
|
62
|
+
"test/functional/test_associations.rb",
|
63
|
+
"test/functional/test_callbacks.rb",
|
64
|
+
"test/functional/test_document.rb",
|
65
|
+
"test/functional/test_pagination.rb",
|
66
|
+
"test/functional/test_rails_compatibility.rb",
|
67
|
+
"test/functional/test_validations.rb",
|
68
|
+
"test/models.rb",
|
69
|
+
"test/test_helper.rb",
|
70
|
+
"test/unit/serializers/test_json_serializer.rb",
|
71
|
+
"test/unit/test_association_base.rb",
|
72
|
+
"test/unit/test_document.rb",
|
73
|
+
"test/unit/test_embedded_document.rb",
|
74
|
+
"test/unit/test_finder_options.rb",
|
75
|
+
"test/unit/test_key.rb",
|
76
|
+
"test/unit/test_mongomapper.rb",
|
77
|
+
"test/unit/test_observing.rb",
|
78
|
+
"test/unit/test_pagination.rb",
|
79
|
+
"test/unit/test_rails_compatibility.rb",
|
80
|
+
"test/unit/test_serializations.rb",
|
81
|
+
"test/unit/test_validations.rb"
|
82
|
+
]
|
83
|
+
s.homepage = %q{http://github.com/jnunemaker/mongomapper}
|
84
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
85
|
+
s.require_paths = ["lib"]
|
86
|
+
s.rubyforge_project = %q{mongomapper}
|
87
|
+
s.rubygems_version = %q{1.3.4}
|
88
|
+
s.summary = %q{Awesome gem for modeling your domain and storing it in mongo}
|
89
|
+
s.test_files = [
|
90
|
+
"test/functional/associations/test_belongs_to_polymorphic_proxy.rb",
|
91
|
+
"test/functional/associations/test_belongs_to_proxy.rb",
|
92
|
+
"test/functional/associations/test_many_embedded_polymorphic_proxy.rb",
|
93
|
+
"test/functional/associations/test_many_embedded_proxy.rb",
|
94
|
+
"test/functional/associations/test_many_polymorphic_proxy.rb",
|
95
|
+
"test/functional/associations/test_many_proxy.rb",
|
96
|
+
"test/functional/test_associations.rb",
|
97
|
+
"test/functional/test_callbacks.rb",
|
98
|
+
"test/functional/test_document.rb",
|
99
|
+
"test/functional/test_pagination.rb",
|
100
|
+
"test/functional/test_rails_compatibility.rb",
|
101
|
+
"test/functional/test_validations.rb",
|
102
|
+
"test/models.rb",
|
103
|
+
"test/test_helper.rb",
|
104
|
+
"test/unit/serializers/test_json_serializer.rb",
|
105
|
+
"test/unit/test_association_base.rb",
|
106
|
+
"test/unit/test_document.rb",
|
107
|
+
"test/unit/test_embedded_document.rb",
|
108
|
+
"test/unit/test_finder_options.rb",
|
109
|
+
"test/unit/test_key.rb",
|
110
|
+
"test/unit/test_mongomapper.rb",
|
111
|
+
"test/unit/test_observing.rb",
|
112
|
+
"test/unit/test_pagination.rb",
|
113
|
+
"test/unit/test_rails_compatibility.rb",
|
114
|
+
"test/unit/test_serializations.rb",
|
115
|
+
"test/unit/test_validations.rb"
|
116
|
+
]
|
117
|
+
|
118
|
+
if s.respond_to? :specification_version then
|
119
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
120
|
+
s.specification_version = 3
|
121
|
+
|
122
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
123
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 0"])
|
124
|
+
s.add_runtime_dependency(%q<mongodb-mongo>, ["= 0.11.1"])
|
125
|
+
s.add_runtime_dependency(%q<hashrocket-validatable>, [">= 1.7.3"])
|
126
|
+
s.add_development_dependency(%q<mocha>, ["= 0.9.4"])
|
127
|
+
s.add_development_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
|
128
|
+
else
|
129
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
130
|
+
s.add_dependency(%q<mongodb-mongo>, ["= 0.11.1"])
|
131
|
+
s.add_dependency(%q<hashrocket-validatable>, [">= 1.7.3"])
|
132
|
+
s.add_dependency(%q<mocha>, ["= 0.9.4"])
|
133
|
+
s.add_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
|
134
|
+
end
|
135
|
+
else
|
136
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
137
|
+
s.add_dependency(%q<mongodb-mongo>, ["= 0.11.1"])
|
138
|
+
s.add_dependency(%q<hashrocket-validatable>, [">= 1.7.3"])
|
139
|
+
s.add_dependency(%q<mocha>, ["= 0.9.4"])
|
140
|
+
s.add_dependency(%q<jnunemaker-matchy>, ["= 0.4.0"])
|
141
|
+
end
|
142
|
+
end
|
@@ -170,6 +170,21 @@ class EmbeddedDocumentTest < Test::Unit::TestCase
|
|
170
170
|
lambda { Parent.new.other_child }.should raise_error
|
171
171
|
end
|
172
172
|
end
|
173
|
+
|
174
|
+
context "#inspect" do
|
175
|
+
setup do
|
176
|
+
@document = Class.new do
|
177
|
+
include MongoMapper::Document
|
178
|
+
key :animals
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
should "call inspect on the document's attributes instead of to_s" do
|
183
|
+
doc = @document.new
|
184
|
+
doc.animals = %w(dog cat)
|
185
|
+
doc.inspect.should include(%(animals: ["dog", "cat"]))
|
186
|
+
end
|
187
|
+
end
|
173
188
|
|
174
189
|
context "subclasses" do
|
175
190
|
should "default to nil" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashrocket-mongomapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
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-
|
12
|
+
date: 2009-09-03 00:00:00 -07:00
|
13
13
|
default_executable: mmconsole
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- lib/mongomapper/serializers/json_serializer.rb
|
106
106
|
- lib/mongomapper/support.rb
|
107
107
|
- lib/mongomapper/validations.rb
|
108
|
+
- mongomapper.gemspec
|
108
109
|
- test/NOTE_ON_TESTING
|
109
110
|
- test/functional/associations/test_belongs_to_polymorphic_proxy.rb
|
110
111
|
- test/functional/associations/test_belongs_to_proxy.rb
|
@@ -134,7 +135,6 @@ files:
|
|
134
135
|
- test/unit/test_validations.rb
|
135
136
|
has_rdoc: false
|
136
137
|
homepage: http://github.com/jnunemaker/mongomapper
|
137
|
-
licenses:
|
138
138
|
post_install_message:
|
139
139
|
rdoc_options:
|
140
140
|
- --charset=UTF-8
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
requirements: []
|
156
156
|
|
157
157
|
rubyforge_project: mongomapper
|
158
|
-
rubygems_version: 1.
|
158
|
+
rubygems_version: 1.2.0
|
159
159
|
signing_key:
|
160
160
|
specification_version: 3
|
161
161
|
summary: Awesome gem for modeling your domain and storing it in mongo
|