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 CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mongo_doc (0.6.16)
4
+ mongo_doc (0.6.17)
5
5
  activemodel (>= 3.0.0.beta.4)
6
6
  activesupport (>= 3.0.0.beta.4)
7
7
  bson (>= 1.0.0)
data/README.textile CHANGED
@@ -1,6 +1,6 @@
1
1
  h1. MongoDoc
2
2
 
3
- Version: 0.6.16 2010/08/10
3
+ Version: 0.6.17 2010/08/11
4
4
 
5
5
  h2. Notes
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.16
1
+ 0.6.17
@@ -21,6 +21,8 @@ module MongoDoc
21
21
  end
22
22
 
23
23
  class CriteriaProxy
24
+ undef id
25
+
24
26
  attr_accessor :criteria, :klass, :parent_scope
25
27
 
26
28
  delegate :scopes, :to => :parent_scope
data/lib/mongo_doc.rb CHANGED
@@ -3,7 +3,7 @@ require 'active_support'
3
3
  require 'active_support/core_ext'
4
4
 
5
5
  module MongoDoc
6
- VERSION = '0.6.16'
6
+ VERSION = '0.6.17'
7
7
  end
8
8
 
9
9
  require 'mongo_doc/connection'
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.16"
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-10}
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 = [
@@ -24,4 +24,6 @@ module HashMatchers
24
24
  HasEntry.new(expected)
25
25
  end
26
26
  alias :has_entries :has_entry
27
+ alias :have_entries :has_entry
28
+ alias :have_entry :has_entry
27
29
  end
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 has_entry(:count => {'$gt' => 1}, :active => true)
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: 39
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 16
10
- version: 0.6.16
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-10 00:00:00 -04:00
18
+ date: 2010-08-11 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency