mongo_doc 0.6.16 → 0.6.17
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.textile +1 -1
- data/VERSION +1 -1
- data/lib/mongo_doc/scope.rb +2 -0
- data/lib/mongo_doc.rb +1 -1
- data/mongo_doc.gemspec +2 -2
- data/spec/hash_matchers.rb +2 -0
- data/spec/scope_spec.rb +10 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/README.textile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.17
|
data/lib/mongo_doc/scope.rb
CHANGED
data/lib/mongo_doc.rb
CHANGED
data/mongo_doc.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mongo_doc}
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.17"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Les Hill"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-11}
|
13
13
|
s.description = %q{ODM for MongoDB}
|
14
14
|
s.email = %q{leshill@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/hash_matchers.rb
CHANGED
data/spec/scope_spec.rb
CHANGED
@@ -72,7 +72,16 @@ describe MongoDoc::Scope do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
it "merges the criteria" do
|
75
|
-
ScopeTest.active.count_gt_one.selector.should
|
75
|
+
ScopeTest.active.count_gt_one.selector.should have_entries(:count => {'$gt' => 1}, :active => true)
|
76
|
+
end
|
77
|
+
|
78
|
+
it "chains with other criteria" do
|
79
|
+
ScopeTest.active.where(:count => 1).selector.should have_entries(:count => 1, :active => true)
|
80
|
+
end
|
81
|
+
|
82
|
+
let(:id) { BSON::ObjectID.new }
|
83
|
+
it "chains with id" do
|
84
|
+
ScopeTest.active.id(id).selector.should have_entries(:active => true, :_id => id)
|
76
85
|
end
|
77
86
|
end
|
78
87
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo_doc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 37
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 17
|
10
|
+
version: 0.6.17
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Les Hill
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-11 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|