mongomodel 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -1
- data/lib/mongomodel/concerns/properties.rb +1 -1
- data/lib/mongomodel/support/mongo_options.rb +2 -2
- data/lib/mongomodel/support/reference.rb +2 -0
- data/lib/mongomodel/support/scope.rb +2 -0
- data/lib/mongomodel/support/types/array.rb +4 -0
- data/lib/mongomodel/support/types/object.rb +4 -0
- data/lib/mongomodel/version.rb +1 -1
- data/mongomodel.gemspec +1 -1
- data/spec/mongomodel/support/scope_spec.rb +10 -0
- metadata +9 -9
data/Gemfile
CHANGED
@@ -36,9 +36,9 @@ module MongoModel
|
|
36
36
|
key = property.as
|
37
37
|
|
38
38
|
if k.is_a?(MongoOperator)
|
39
|
-
value = k.to_mongo_selector(v.is_a?(Array) ? v.map { |i| property.
|
39
|
+
value = k.to_mongo_selector(v.is_a?(Array) ? v.map { |i| property.to_query(i) } : property.to_query(v))
|
40
40
|
else
|
41
|
-
value = property.
|
41
|
+
value = property.to_query(v)
|
42
42
|
end
|
43
43
|
else
|
44
44
|
converter = Types.converter_for(value.class)
|
data/lib/mongomodel/version.rb
CHANGED
data/mongomodel.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
|
17
17
|
s.add_dependency "activesupport", "~> 3.0.3"
|
18
18
|
s.add_dependency "activemodel", "~> 3.0.3"
|
19
|
-
s.add_dependency "mongo", "~> 1.
|
19
|
+
s.add_dependency "mongo", "~> 1.3.0"
|
20
20
|
s.add_dependency "will_paginate", "~> 2.3.15"
|
21
21
|
|
22
22
|
s.add_development_dependency "bundler", ">= 1.0.0"
|
@@ -183,6 +183,16 @@ module MongoModel
|
|
183
183
|
subject.reload
|
184
184
|
subject.should be_loaded
|
185
185
|
end
|
186
|
+
|
187
|
+
it "should reset its finder options" do
|
188
|
+
old_finder_options = subject.finder_options
|
189
|
+
subject.reload.finder_options.should_not equal(old_finder_options)
|
190
|
+
end
|
191
|
+
|
192
|
+
it "should reset its options for create" do
|
193
|
+
old_options_for_create = subject.options_for_create
|
194
|
+
subject.reload.options_for_create.should_not equal(old_options_for_create)
|
195
|
+
end
|
186
196
|
end
|
187
197
|
end
|
188
198
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongomodel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sam Pohlenz
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-04-19 00:00:00 +09:30
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -58,12 +58,12 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
61
|
+
hash: 27
|
62
62
|
segments:
|
63
63
|
- 1
|
64
|
-
-
|
65
|
-
-
|
66
|
-
version: 1.
|
64
|
+
- 3
|
65
|
+
- 0
|
66
|
+
version: 1.3.0
|
67
67
|
type: :runtime
|
68
68
|
version_requirements: *id003
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -305,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
305
305
|
requirements: []
|
306
306
|
|
307
307
|
rubyforge_project: mongomodel
|
308
|
-
rubygems_version: 1.
|
308
|
+
rubygems_version: 1.6.1
|
309
309
|
signing_key:
|
310
310
|
specification_version: 3
|
311
311
|
summary: MongoDB ORM for Ruby/Rails
|