mongo_doc_rails2 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +8 -0
- data/HISTORY.md +11 -0
- data/LICENSE +20 -0
- data/README.textile +185 -0
- data/Rakefile +188 -0
- data/TODO +40 -0
- data/VERSION +1 -0
- data/data/.gitignore +2 -0
- data/examples/simple_document.rb +46 -0
- data/examples/simple_object.rb +34 -0
- data/features/collections.feature +9 -0
- data/features/embed_hash.feature +16 -0
- data/features/finders.feature +76 -0
- data/features/indexes.feature +28 -0
- data/features/mongodb.yml +7 -0
- data/features/mongodoc_base.feature +128 -0
- data/features/new_record.feature +36 -0
- data/features/partial_updates.feature +95 -0
- data/features/removing_documents.feature +68 -0
- data/features/saving_an_object.feature +15 -0
- data/features/scopes.feature +66 -0
- data/features/step_definitions/collection_steps.rb +17 -0
- data/features/step_definitions/document_steps.rb +149 -0
- data/features/step_definitions/documents.rb +40 -0
- data/features/step_definitions/embed_hash_steps.rb +6 -0
- data/features/step_definitions/finder_steps.rb +15 -0
- data/features/step_definitions/index_steps.rb +10 -0
- data/features/step_definitions/json_steps.rb +9 -0
- data/features/step_definitions/object_steps.rb +50 -0
- data/features/step_definitions/objects.rb +24 -0
- data/features/step_definitions/partial_update_steps.rb +31 -0
- data/features/step_definitions/query_steps.rb +66 -0
- data/features/step_definitions/removing_documents_steps.rb +14 -0
- data/features/step_definitions/scope_steps.rb +18 -0
- data/features/step_definitions/string_casting_steps.rb +29 -0
- data/features/step_definitions/util_steps.rb +7 -0
- data/features/string_casting.feature +10 -0
- data/features/support/support.rb +10 -0
- data/features/using_criteria.feature +142 -0
- data/lib/mongo_doc.rb +12 -0
- data/lib/mongo_doc/associations.rb +109 -0
- data/lib/mongo_doc/associations/collection_proxy.rb +121 -0
- data/lib/mongo_doc/associations/document_proxy.rb +65 -0
- data/lib/mongo_doc/associations/hash_proxy.rb +102 -0
- data/lib/mongo_doc/associations/proxy_base.rb +48 -0
- data/lib/mongo_doc/attributes.rb +84 -0
- data/lib/mongo_doc/bson.rb +31 -0
- data/lib/mongo_doc/collection.rb +82 -0
- data/lib/mongo_doc/connection.rb +88 -0
- data/lib/mongo_doc/contexts.rb +31 -0
- data/lib/mongo_doc/contexts/ids.rb +41 -0
- data/lib/mongo_doc/contexts/mongo.rb +272 -0
- data/lib/mongo_doc/criteria.rb +70 -0
- data/lib/mongo_doc/cursor.rb +32 -0
- data/lib/mongo_doc/document.rb +205 -0
- data/lib/mongo_doc/ext.rb +16 -0
- data/lib/mongo_doc/ext/array.rb +5 -0
- data/lib/mongo_doc/ext/binary.rb +7 -0
- data/lib/mongo_doc/ext/boolean_class.rb +17 -0
- data/lib/mongo_doc/ext/date.rb +19 -0
- data/lib/mongo_doc/ext/date_time.rb +17 -0
- data/lib/mongo_doc/ext/dbref.rb +7 -0
- data/lib/mongo_doc/ext/hash.rb +7 -0
- data/lib/mongo_doc/ext/min_max_keys.rb +13 -0
- data/lib/mongo_doc/ext/nil_class.rb +5 -0
- data/lib/mongo_doc/ext/numeric.rb +17 -0
- data/lib/mongo_doc/ext/object.rb +19 -0
- data/lib/mongo_doc/ext/object_id.rb +7 -0
- data/lib/mongo_doc/ext/regexp.rb +5 -0
- data/lib/mongo_doc/ext/string.rb +5 -0
- data/lib/mongo_doc/ext/symbol.rb +5 -0
- data/lib/mongo_doc/ext/time.rb +9 -0
- data/lib/mongo_doc/finders.rb +38 -0
- data/lib/mongo_doc/index.rb +46 -0
- data/lib/mongo_doc/matchers.rb +35 -0
- data/lib/mongo_doc/root.rb +26 -0
- data/lib/mongo_doc/scope.rb +64 -0
- data/lib/mongo_doc/validations.rb +12 -0
- data/lib/mongo_doc/validations/macros.rb +11 -0
- data/lib/mongo_doc/validations/validates_embedded.rb +13 -0
- data/lib/mongoid/contexts/enumerable.rb +151 -0
- data/lib/mongoid/contexts/paging.rb +42 -0
- data/lib/mongoid/criteria.rb +239 -0
- data/lib/mongoid/criterion/complex.rb +21 -0
- data/lib/mongoid/criterion/exclusion.rb +65 -0
- data/lib/mongoid/criterion/inclusion.rb +93 -0
- data/lib/mongoid/criterion/optional.rb +136 -0
- data/lib/mongoid/extensions/hash/criteria_helpers.rb +20 -0
- data/lib/mongoid/extensions/symbol/inflections.rb +36 -0
- data/lib/mongoid/matchers/all.rb +11 -0
- data/lib/mongoid/matchers/default.rb +26 -0
- data/lib/mongoid/matchers/exists.rb +13 -0
- data/lib/mongoid/matchers/gt.rb +11 -0
- data/lib/mongoid/matchers/gte.rb +11 -0
- data/lib/mongoid/matchers/in.rb +11 -0
- data/lib/mongoid/matchers/lt.rb +11 -0
- data/lib/mongoid/matchers/lte.rb +11 -0
- data/lib/mongoid/matchers/ne.rb +11 -0
- data/lib/mongoid/matchers/nin.rb +11 -0
- data/lib/mongoid/matchers/size.rb +11 -0
- data/mongo_doc_rails2.gemspec +237 -0
- data/mongod.example.yml +2 -0
- data/mongodb.example.yml +14 -0
- data/perf/mongo_doc_object.rb +83 -0
- data/perf/mongo_document.rb +84 -0
- data/perf/ruby_driver.rb +49 -0
- data/script/console +8 -0
- data/spec/array_including_argument_matcher.rb +62 -0
- data/spec/associations/collection_proxy_spec.rb +233 -0
- data/spec/associations/document_proxy_spec.rb +45 -0
- data/spec/associations/hash_proxy_spec.rb +181 -0
- data/spec/associations/proxy_base_spec.rb +92 -0
- data/spec/associations_spec.rb +218 -0
- data/spec/attributes_accessor_spec.rb +33 -0
- data/spec/attributes_spec.rb +145 -0
- data/spec/bson_matchers.rb +54 -0
- data/spec/bson_spec.rb +196 -0
- data/spec/collection_spec.rb +169 -0
- data/spec/connection_spec.rb +147 -0
- data/spec/contexts/ids_spec.rb +49 -0
- data/spec/contexts/mongo_spec.rb +235 -0
- data/spec/contexts_spec.rb +56 -0
- data/spec/criteria_spec.rb +69 -0
- data/spec/cursor_spec.rb +91 -0
- data/spec/document_ext.rb +9 -0
- data/spec/document_spec.rb +553 -0
- data/spec/embedded_save_spec.rb +73 -0
- data/spec/ext_spec.rb +89 -0
- data/spec/finders_spec.rb +61 -0
- data/spec/hash_matchers.rb +27 -0
- data/spec/index_spec.rb +79 -0
- data/spec/matchers_spec.rb +342 -0
- data/spec/mongodb.yml +6 -0
- data/spec/mongodb_pairs.yml +8 -0
- data/spec/new_record_spec.rb +128 -0
- data/spec/root_spec.rb +41 -0
- data/spec/scope_spec.rb +79 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/validations_spec.rb +30 -0
- metadata +346 -0
data/spec/mongodb.yml
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "MongoDoc::Document _id and #new_record?" do
|
4
|
+
class Child
|
5
|
+
include MongoDoc::Document
|
6
|
+
end
|
7
|
+
|
8
|
+
class Parent
|
9
|
+
include MongoDoc::Document
|
10
|
+
|
11
|
+
embed :child
|
12
|
+
embed_many :children
|
13
|
+
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
validates_presence_of :data
|
17
|
+
end
|
18
|
+
|
19
|
+
let(:id) { 'id' }
|
20
|
+
let(:collection) { stub('collection', :save => id) }
|
21
|
+
let(:child) { Child.new }
|
22
|
+
|
23
|
+
context "as a embed child" do
|
24
|
+
it "when added to the parent is a new record" do
|
25
|
+
Parent.new(:data => 'data', :child => child)
|
26
|
+
child.should be_new_record
|
27
|
+
end
|
28
|
+
|
29
|
+
context "saving" do
|
30
|
+
before do
|
31
|
+
Parent.stub(:collection).and_return(collection)
|
32
|
+
end
|
33
|
+
|
34
|
+
context "#save" do
|
35
|
+
it "when saved is not a new record" do
|
36
|
+
parent = Parent.new(:data => 'data', :child => child)
|
37
|
+
parent.save
|
38
|
+
child.should_not be_new_record
|
39
|
+
end
|
40
|
+
|
41
|
+
it "if parent is invalid, remains a new record" do
|
42
|
+
parent = Parent.new(:child => child)
|
43
|
+
parent.save
|
44
|
+
child.should be_new_record
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context "#save!" do
|
49
|
+
it "when saved is not a new record" do
|
50
|
+
parent = Parent.new(:data => 'data', :child => child)
|
51
|
+
parent.save!
|
52
|
+
child.should_not be_new_record
|
53
|
+
end
|
54
|
+
|
55
|
+
it "if parent is invalid, remains a new record" do
|
56
|
+
parent = Parent.new(:child => child)
|
57
|
+
parent.save! rescue nil
|
58
|
+
child.should be_new_record
|
59
|
+
end
|
60
|
+
|
61
|
+
it "when db error is raised, remains a new record" do
|
62
|
+
collection.stub(:save).and_raise(Mongo::OperationFailure)
|
63
|
+
parent = Parent.new(:data => 'data', :child => child)
|
64
|
+
expect do
|
65
|
+
parent.save!
|
66
|
+
end.should raise_error(Mongo::OperationFailure)
|
67
|
+
child.should be_new_record
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context "as a embed_many child" do
|
74
|
+
it "when added to the parent is a new record" do
|
75
|
+
parent = Parent.new(:data => 'data')
|
76
|
+
parent.children << child
|
77
|
+
child.should be_new_record
|
78
|
+
end
|
79
|
+
|
80
|
+
context "saving" do
|
81
|
+
before do
|
82
|
+
Parent.stub(:collection).and_return(collection)
|
83
|
+
end
|
84
|
+
|
85
|
+
context "#save" do
|
86
|
+
it "when saved is not a new record" do
|
87
|
+
parent = Parent.new(:data => 'data')
|
88
|
+
parent.children << child
|
89
|
+
parent.save
|
90
|
+
child.should_not be_new_record
|
91
|
+
end
|
92
|
+
|
93
|
+
it "if parent is invalid, remains a new record" do
|
94
|
+
parent = Parent.new
|
95
|
+
parent.children << child
|
96
|
+
parent.save
|
97
|
+
child.should be_new_record
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
context "#save!" do
|
102
|
+
it "when saved is not a new record" do
|
103
|
+
parent = Parent.new(:data => 'data')
|
104
|
+
parent.children << child
|
105
|
+
parent.save!
|
106
|
+
child.should_not be_new_record
|
107
|
+
end
|
108
|
+
|
109
|
+
it "if parent is invalid, remains a new record" do
|
110
|
+
parent = Parent.new
|
111
|
+
parent.children << child
|
112
|
+
parent.save! rescue nil
|
113
|
+
child.should be_new_record
|
114
|
+
end
|
115
|
+
|
116
|
+
it "when db error is raised, remains a new record" do
|
117
|
+
collection.stub(:save).and_raise(Mongo::OperationFailure)
|
118
|
+
parent = Parent.new(:data => 'data')
|
119
|
+
parent.children << child
|
120
|
+
expect do
|
121
|
+
parent.save!
|
122
|
+
end.should raise_error(Mongo::OperationFailure)
|
123
|
+
child.should be_new_record
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
data/spec/root_spec.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "MongoDoc::Root" do
|
4
|
+
class RootTest
|
5
|
+
include MongoDoc::Root
|
6
|
+
attr_accessor_with_default(:_associations) {[]}
|
7
|
+
attr_accessor :association
|
8
|
+
end
|
9
|
+
|
10
|
+
let(:doc) { RootTest.new }
|
11
|
+
|
12
|
+
context "cascade properties" do
|
13
|
+
let(:prop_val) { stub }
|
14
|
+
|
15
|
+
%w(_modifier_path _root _selector_path).each do |prop|
|
16
|
+
it "sets the #{prop}" do
|
17
|
+
doc.send("#{prop}=", prop_val)
|
18
|
+
doc.send(prop).should == prop_val
|
19
|
+
end
|
20
|
+
|
21
|
+
it "sets the prop on any associations" do
|
22
|
+
doc.association = stub
|
23
|
+
doc.association.should_receive("#{prop}=").with(prop_val)
|
24
|
+
doc._associations = ['association']
|
25
|
+
doc.send("#{prop}=", prop_val)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "#_selector_path" do
|
31
|
+
it "defaults to ''" do
|
32
|
+
doc._selector_path.should == ''
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe "#_modifier_path" do
|
37
|
+
it "defaults to ''" do
|
38
|
+
doc._modifier_path.should == ''
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/spec/scope_spec.rb
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper.rb"))
|
2
|
+
|
3
|
+
describe MongoDoc::Scope do
|
4
|
+
|
5
|
+
module Extension
|
6
|
+
def extension_module_method
|
7
|
+
"extension module method"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
class ScopeTest
|
12
|
+
include MongoDoc::Document
|
13
|
+
|
14
|
+
attr_accessor :active
|
15
|
+
attr_accessor :count
|
16
|
+
|
17
|
+
scope :active, where(:active => true)
|
18
|
+
scope :count_lte_one, where(:count.lte => 1) do
|
19
|
+
def extension_method
|
20
|
+
"extension method"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
scope :count_gt_one, where(:count.gt => 1), :extend => Extension
|
24
|
+
scope :at_least_count, lambda {|count| where(:count.gt => count)}
|
25
|
+
end
|
26
|
+
|
27
|
+
context ".scope" do
|
28
|
+
it "adds the named scope to the hash of scopes" do
|
29
|
+
ScopeTest.scopes.should have_key(:active)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "creates a class method for the named scope" do
|
33
|
+
ScopeTest.should respond_to(:active)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context "accessing a named scope" do
|
38
|
+
it "is a criteria proxy" do
|
39
|
+
MongoDoc::Scope::CriteriaProxy.should === ScopeTest.active
|
40
|
+
end
|
41
|
+
|
42
|
+
it "responds like a criteria" do
|
43
|
+
ScopeTest.active.should respond_to(:selector)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "has set the conditions on the criteria" do
|
47
|
+
ScopeTest.active.selector.should has_entry(:active => true)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "sets the association extension by block" do
|
51
|
+
ScopeTest.count_lte_one.extension_method.should == "extension method"
|
52
|
+
end
|
53
|
+
|
54
|
+
it "sets the association extension by :extend" do
|
55
|
+
ScopeTest.count_gt_one.extension_module_method.should == "extension module method"
|
56
|
+
end
|
57
|
+
|
58
|
+
context "when using a lambda" do
|
59
|
+
it "accepts parameters to the criteria" do
|
60
|
+
ScopeTest.at_least_count(3).selector.should has_entry(:count => {'$gt' => 3})
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context "chained scopes" do
|
66
|
+
it "is a criteria proxy" do
|
67
|
+
MongoDoc::Scope::CriteriaProxy.should === ScopeTest.active.count_gt_one
|
68
|
+
end
|
69
|
+
|
70
|
+
it "responds like a criteria" do
|
71
|
+
ScopeTest.active.count_gt_one.should respond_to(:selector)
|
72
|
+
end
|
73
|
+
|
74
|
+
it "merges the criteria" do
|
75
|
+
ScopeTest.active.count_gt_one.selector.should has_entry(:count => {'$gt' => 1}, :active => true)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
require 'mongo_doc'
|
4
|
+
require 'spec'
|
5
|
+
require 'spec/autorun'
|
6
|
+
require 'bson_matchers'
|
7
|
+
require 'hash_matchers'
|
8
|
+
require 'array_including_argument_matcher'
|
9
|
+
require 'document_ext'
|
10
|
+
|
11
|
+
Spec::Runner.configure do |config|
|
12
|
+
config.include(BsonMatchers)
|
13
|
+
config.include(HashMatchers)
|
14
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe MongoDoc::Validations do
|
4
|
+
|
5
|
+
class ValidationTest
|
6
|
+
include MongoDoc::Document
|
7
|
+
|
8
|
+
attr_accessor :data
|
9
|
+
validates_presence_of :data
|
10
|
+
end
|
11
|
+
|
12
|
+
context "requirements" do
|
13
|
+
subject { ValidationTest.new }
|
14
|
+
|
15
|
+
it { should respond_to(:valid?) }
|
16
|
+
it { should respond_to(:errors) }
|
17
|
+
|
18
|
+
it "is included by Document" do
|
19
|
+
MongoDoc::Validations.should === subject
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context "validations" do
|
24
|
+
it "valid? fails when a document is invalid" do
|
25
|
+
doc = ValidationTest.new
|
26
|
+
doc.should_not be_valid
|
27
|
+
doc.should have(1).error_on(:data)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,346 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mongo_doc_rails2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 6
|
8
|
+
- 1
|
9
|
+
version: 0.6.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Les Hill
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-05-10 00:00:00 -04:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: activesupport
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 2
|
29
|
+
- 3
|
30
|
+
- 4
|
31
|
+
version: 2.3.4
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: mongo
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 0
|
44
|
+
- 1
|
45
|
+
version: 1.0.1
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: bson
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 1
|
57
|
+
- 0
|
58
|
+
- 1
|
59
|
+
version: 1.0.1
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: bson_ext
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 1
|
71
|
+
- 0
|
72
|
+
- 1
|
73
|
+
version: 1.0.1
|
74
|
+
type: :runtime
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: durran-validatable
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
segments:
|
84
|
+
- 2
|
85
|
+
- 0
|
86
|
+
- 1
|
87
|
+
version: 2.0.1
|
88
|
+
type: :runtime
|
89
|
+
version_requirements: *id005
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: leshill-will_paginate
|
92
|
+
prerelease: false
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
segments:
|
98
|
+
- 2
|
99
|
+
- 3
|
100
|
+
- 11
|
101
|
+
version: 2.3.11
|
102
|
+
type: :runtime
|
103
|
+
version_requirements: *id006
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: rspec
|
106
|
+
prerelease: false
|
107
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
segments:
|
112
|
+
- 1
|
113
|
+
- 3
|
114
|
+
- 0
|
115
|
+
version: 1.3.0
|
116
|
+
type: :development
|
117
|
+
version_requirements: *id007
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: cucumber
|
120
|
+
prerelease: false
|
121
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
segments:
|
126
|
+
- 0
|
127
|
+
- 6
|
128
|
+
- 2
|
129
|
+
version: 0.6.2
|
130
|
+
type: :development
|
131
|
+
version_requirements: *id008
|
132
|
+
description: ODM for MongoDB - for Rails 2.3.x
|
133
|
+
email: leshill@gmail.com
|
134
|
+
executables: []
|
135
|
+
|
136
|
+
extensions: []
|
137
|
+
|
138
|
+
extra_rdoc_files:
|
139
|
+
- LICENSE
|
140
|
+
- README.textile
|
141
|
+
- TODO
|
142
|
+
files:
|
143
|
+
- .document
|
144
|
+
- .gitignore
|
145
|
+
- HISTORY.md
|
146
|
+
- LICENSE
|
147
|
+
- README.textile
|
148
|
+
- Rakefile
|
149
|
+
- TODO
|
150
|
+
- VERSION
|
151
|
+
- data/.gitignore
|
152
|
+
- examples/simple_document.rb
|
153
|
+
- examples/simple_object.rb
|
154
|
+
- features/collections.feature
|
155
|
+
- features/embed_hash.feature
|
156
|
+
- features/finders.feature
|
157
|
+
- features/indexes.feature
|
158
|
+
- features/mongodb.yml
|
159
|
+
- features/mongodoc_base.feature
|
160
|
+
- features/new_record.feature
|
161
|
+
- features/partial_updates.feature
|
162
|
+
- features/removing_documents.feature
|
163
|
+
- features/saving_an_object.feature
|
164
|
+
- features/scopes.feature
|
165
|
+
- features/step_definitions/collection_steps.rb
|
166
|
+
- features/step_definitions/document_steps.rb
|
167
|
+
- features/step_definitions/documents.rb
|
168
|
+
- features/step_definitions/embed_hash_steps.rb
|
169
|
+
- features/step_definitions/finder_steps.rb
|
170
|
+
- features/step_definitions/index_steps.rb
|
171
|
+
- features/step_definitions/json_steps.rb
|
172
|
+
- features/step_definitions/object_steps.rb
|
173
|
+
- features/step_definitions/objects.rb
|
174
|
+
- features/step_definitions/partial_update_steps.rb
|
175
|
+
- features/step_definitions/query_steps.rb
|
176
|
+
- features/step_definitions/removing_documents_steps.rb
|
177
|
+
- features/step_definitions/scope_steps.rb
|
178
|
+
- features/step_definitions/string_casting_steps.rb
|
179
|
+
- features/step_definitions/util_steps.rb
|
180
|
+
- features/string_casting.feature
|
181
|
+
- features/support/support.rb
|
182
|
+
- features/using_criteria.feature
|
183
|
+
- lib/mongo_doc.rb
|
184
|
+
- lib/mongo_doc/associations.rb
|
185
|
+
- lib/mongo_doc/associations/collection_proxy.rb
|
186
|
+
- lib/mongo_doc/associations/document_proxy.rb
|
187
|
+
- lib/mongo_doc/associations/hash_proxy.rb
|
188
|
+
- lib/mongo_doc/associations/proxy_base.rb
|
189
|
+
- lib/mongo_doc/attributes.rb
|
190
|
+
- lib/mongo_doc/bson.rb
|
191
|
+
- lib/mongo_doc/collection.rb
|
192
|
+
- lib/mongo_doc/connection.rb
|
193
|
+
- lib/mongo_doc/contexts.rb
|
194
|
+
- lib/mongo_doc/contexts/ids.rb
|
195
|
+
- lib/mongo_doc/contexts/mongo.rb
|
196
|
+
- lib/mongo_doc/criteria.rb
|
197
|
+
- lib/mongo_doc/cursor.rb
|
198
|
+
- lib/mongo_doc/document.rb
|
199
|
+
- lib/mongo_doc/ext.rb
|
200
|
+
- lib/mongo_doc/ext/array.rb
|
201
|
+
- lib/mongo_doc/ext/binary.rb
|
202
|
+
- lib/mongo_doc/ext/boolean_class.rb
|
203
|
+
- lib/mongo_doc/ext/date.rb
|
204
|
+
- lib/mongo_doc/ext/date_time.rb
|
205
|
+
- lib/mongo_doc/ext/dbref.rb
|
206
|
+
- lib/mongo_doc/ext/hash.rb
|
207
|
+
- lib/mongo_doc/ext/min_max_keys.rb
|
208
|
+
- lib/mongo_doc/ext/nil_class.rb
|
209
|
+
- lib/mongo_doc/ext/numeric.rb
|
210
|
+
- lib/mongo_doc/ext/object.rb
|
211
|
+
- lib/mongo_doc/ext/object_id.rb
|
212
|
+
- lib/mongo_doc/ext/regexp.rb
|
213
|
+
- lib/mongo_doc/ext/string.rb
|
214
|
+
- lib/mongo_doc/ext/symbol.rb
|
215
|
+
- lib/mongo_doc/ext/time.rb
|
216
|
+
- lib/mongo_doc/finders.rb
|
217
|
+
- lib/mongo_doc/index.rb
|
218
|
+
- lib/mongo_doc/matchers.rb
|
219
|
+
- lib/mongo_doc/root.rb
|
220
|
+
- lib/mongo_doc/scope.rb
|
221
|
+
- lib/mongo_doc/validations.rb
|
222
|
+
- lib/mongo_doc/validations/macros.rb
|
223
|
+
- lib/mongo_doc/validations/validates_embedded.rb
|
224
|
+
- lib/mongoid/contexts/enumerable.rb
|
225
|
+
- lib/mongoid/contexts/paging.rb
|
226
|
+
- lib/mongoid/criteria.rb
|
227
|
+
- lib/mongoid/criterion/complex.rb
|
228
|
+
- lib/mongoid/criterion/exclusion.rb
|
229
|
+
- lib/mongoid/criterion/inclusion.rb
|
230
|
+
- lib/mongoid/criterion/optional.rb
|
231
|
+
- lib/mongoid/extensions/hash/criteria_helpers.rb
|
232
|
+
- lib/mongoid/extensions/symbol/inflections.rb
|
233
|
+
- lib/mongoid/matchers/all.rb
|
234
|
+
- lib/mongoid/matchers/default.rb
|
235
|
+
- lib/mongoid/matchers/exists.rb
|
236
|
+
- lib/mongoid/matchers/gt.rb
|
237
|
+
- lib/mongoid/matchers/gte.rb
|
238
|
+
- lib/mongoid/matchers/in.rb
|
239
|
+
- lib/mongoid/matchers/lt.rb
|
240
|
+
- lib/mongoid/matchers/lte.rb
|
241
|
+
- lib/mongoid/matchers/ne.rb
|
242
|
+
- lib/mongoid/matchers/nin.rb
|
243
|
+
- lib/mongoid/matchers/size.rb
|
244
|
+
- mongo_doc_rails2.gemspec
|
245
|
+
- mongod.example.yml
|
246
|
+
- mongodb.example.yml
|
247
|
+
- perf/mongo_doc_object.rb
|
248
|
+
- perf/mongo_document.rb
|
249
|
+
- perf/ruby_driver.rb
|
250
|
+
- script/console
|
251
|
+
- spec/array_including_argument_matcher.rb
|
252
|
+
- spec/associations/collection_proxy_spec.rb
|
253
|
+
- spec/associations/document_proxy_spec.rb
|
254
|
+
- spec/associations/hash_proxy_spec.rb
|
255
|
+
- spec/associations/proxy_base_spec.rb
|
256
|
+
- spec/associations_spec.rb
|
257
|
+
- spec/attributes_accessor_spec.rb
|
258
|
+
- spec/attributes_spec.rb
|
259
|
+
- spec/bson_matchers.rb
|
260
|
+
- spec/bson_spec.rb
|
261
|
+
- spec/collection_spec.rb
|
262
|
+
- spec/connection_spec.rb
|
263
|
+
- spec/contexts/ids_spec.rb
|
264
|
+
- spec/contexts/mongo_spec.rb
|
265
|
+
- spec/contexts_spec.rb
|
266
|
+
- spec/criteria_spec.rb
|
267
|
+
- spec/cursor_spec.rb
|
268
|
+
- spec/document_ext.rb
|
269
|
+
- spec/document_spec.rb
|
270
|
+
- spec/embedded_save_spec.rb
|
271
|
+
- spec/ext_spec.rb
|
272
|
+
- spec/finders_spec.rb
|
273
|
+
- spec/hash_matchers.rb
|
274
|
+
- spec/index_spec.rb
|
275
|
+
- spec/matchers_spec.rb
|
276
|
+
- spec/mongodb.yml
|
277
|
+
- spec/mongodb_pairs.yml
|
278
|
+
- spec/new_record_spec.rb
|
279
|
+
- spec/root_spec.rb
|
280
|
+
- spec/scope_spec.rb
|
281
|
+
- spec/spec.opts
|
282
|
+
- spec/spec_helper.rb
|
283
|
+
- spec/validations_spec.rb
|
284
|
+
has_rdoc: true
|
285
|
+
homepage: http://github.com/leshill/mongodoc
|
286
|
+
licenses: []
|
287
|
+
|
288
|
+
post_install_message:
|
289
|
+
rdoc_options:
|
290
|
+
- --charset=UTF-8
|
291
|
+
require_paths:
|
292
|
+
- lib
|
293
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
294
|
+
requirements:
|
295
|
+
- - ">="
|
296
|
+
- !ruby/object:Gem::Version
|
297
|
+
segments:
|
298
|
+
- 0
|
299
|
+
version: "0"
|
300
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
301
|
+
requirements:
|
302
|
+
- - ">="
|
303
|
+
- !ruby/object:Gem::Version
|
304
|
+
segments:
|
305
|
+
- 0
|
306
|
+
version: "0"
|
307
|
+
requirements: []
|
308
|
+
|
309
|
+
rubyforge_project:
|
310
|
+
rubygems_version: 1.3.6
|
311
|
+
signing_key:
|
312
|
+
specification_version: 3
|
313
|
+
summary: ODM for MongoDB - for Rails 2.3.x
|
314
|
+
test_files:
|
315
|
+
- spec/array_including_argument_matcher.rb
|
316
|
+
- spec/associations/collection_proxy_spec.rb
|
317
|
+
- spec/associations/document_proxy_spec.rb
|
318
|
+
- spec/associations/hash_proxy_spec.rb
|
319
|
+
- spec/associations/proxy_base_spec.rb
|
320
|
+
- spec/associations_spec.rb
|
321
|
+
- spec/attributes_accessor_spec.rb
|
322
|
+
- spec/attributes_spec.rb
|
323
|
+
- spec/bson_matchers.rb
|
324
|
+
- spec/bson_spec.rb
|
325
|
+
- spec/collection_spec.rb
|
326
|
+
- spec/connection_spec.rb
|
327
|
+
- spec/contexts/ids_spec.rb
|
328
|
+
- spec/contexts/mongo_spec.rb
|
329
|
+
- spec/contexts_spec.rb
|
330
|
+
- spec/criteria_spec.rb
|
331
|
+
- spec/cursor_spec.rb
|
332
|
+
- spec/document_ext.rb
|
333
|
+
- spec/document_spec.rb
|
334
|
+
- spec/embedded_save_spec.rb
|
335
|
+
- spec/ext_spec.rb
|
336
|
+
- spec/finders_spec.rb
|
337
|
+
- spec/hash_matchers.rb
|
338
|
+
- spec/index_spec.rb
|
339
|
+
- spec/matchers_spec.rb
|
340
|
+
- spec/new_record_spec.rb
|
341
|
+
- spec/root_spec.rb
|
342
|
+
- spec/scope_spec.rb
|
343
|
+
- spec/spec_helper.rb
|
344
|
+
- spec/validations_spec.rb
|
345
|
+
- examples/simple_document.rb
|
346
|
+
- examples/simple_object.rb
|