dm-mongo-adapter 0.2.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/LICENSE +20 -0
- data/README.rdoc +130 -0
- data/Rakefile +36 -0
- data/TODO +33 -0
- data/VERSION.yml +5 -0
- data/bin/console +31 -0
- data/dm-mongo-adapter.gemspec +154 -0
- data/lib/mongo_adapter.rb +71 -0
- data/lib/mongo_adapter/adapter.rb +255 -0
- data/lib/mongo_adapter/aggregates.rb +21 -0
- data/lib/mongo_adapter/conditions.rb +100 -0
- data/lib/mongo_adapter/embedded_model.rb +187 -0
- data/lib/mongo_adapter/embedded_resource.rb +134 -0
- data/lib/mongo_adapter/embedments/one_to_many.rb +139 -0
- data/lib/mongo_adapter/embedments/one_to_one.rb +53 -0
- data/lib/mongo_adapter/embedments/relationship.rb +258 -0
- data/lib/mongo_adapter/migrations.rb +45 -0
- data/lib/mongo_adapter/model.rb +89 -0
- data/lib/mongo_adapter/model/embedment.rb +215 -0
- data/lib/mongo_adapter/modifier.rb +85 -0
- data/lib/mongo_adapter/query.rb +252 -0
- data/lib/mongo_adapter/query/java_script.rb +145 -0
- data/lib/mongo_adapter/resource.rb +147 -0
- data/lib/mongo_adapter/types/date.rb +28 -0
- data/lib/mongo_adapter/types/date_time.rb +28 -0
- data/lib/mongo_adapter/types/db_ref.rb +65 -0
- data/lib/mongo_adapter/types/discriminator.rb +32 -0
- data/lib/mongo_adapter/types/object_id.rb +72 -0
- data/lib/mongo_adapter/types/objects.rb +31 -0
- data/script/performance.rb +260 -0
- data/spec/legacy/README +6 -0
- data/spec/legacy/adapter_shared_spec.rb +299 -0
- data/spec/legacy/adapter_spec.rb +174 -0
- data/spec/legacy/associations_spec.rb +140 -0
- data/spec/legacy/embedded_resource_spec.rb +157 -0
- data/spec/legacy/embedments_spec.rb +177 -0
- data/spec/legacy/modifier_spec.rb +81 -0
- data/spec/legacy/property_spec.rb +51 -0
- data/spec/legacy/spec_helper.rb +3 -0
- data/spec/legacy/sti_spec.rb +53 -0
- data/spec/lib/cleanup_models.rb +32 -0
- data/spec/lib/raw_connections.rb +11 -0
- data/spec/public/embedded_collection_spec.rb +61 -0
- data/spec/public/embedded_resource_spec.rb +220 -0
- data/spec/public/model/embedment_spec.rb +186 -0
- data/spec/public/model_spec.rb +37 -0
- data/spec/public/resource_spec.rb +564 -0
- data/spec/public/shared/model_embedments_spec.rb +338 -0
- data/spec/public/shared/object_id_shared_spec.rb +56 -0
- data/spec/public/types/df_ref_spec.rb +6 -0
- data/spec/public/types/discriminator_spec.rb +118 -0
- data/spec/public/types/embedded_array_spec.rb +55 -0
- data/spec/public/types/embedded_hash_spec.rb +83 -0
- data/spec/public/types/object_id_spec.rb +6 -0
- data/spec/rcov.opts +6 -0
- data/spec/semipublic/embedded_model_spec.rb +43 -0
- data/spec/semipublic/model/embedment_spec.rb +42 -0
- data/spec/semipublic/resource_spec.rb +70 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +45 -0
- data/tasks/spec.rake +37 -0
- data/tasks/yard.rake +9 -0
- data/tasks/yardstick.rake +21 -0
- metadata +215 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
2
|
+
|
3
|
+
describe DataMapper::Mongo::Types::EmbeddedArray do
|
4
|
+
describe '.load' do
|
5
|
+
it 'should return nil when given nil' do
|
6
|
+
DataMapper::Mongo::Types::EmbeddedArray.load(nil, nil).should be_nil
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should return the argument when given an Array' do
|
10
|
+
loaded = DataMapper::Mongo::Types::EmbeddedArray.load([1, 2], nil)
|
11
|
+
loaded.should == [1, 2]
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should raise an error when given anything else' do
|
15
|
+
pending "EmbeddedArray should not be able to load arbitrary objects" do
|
16
|
+
[ 0, 1, Object.new, true, false, {} ].each do |value|
|
17
|
+
lambda {
|
18
|
+
DataMapper::Mongo::Types::EmbeddedArray.load(value, nil)
|
19
|
+
}.should raise_error(ArgumentError)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe '.dump' do
|
26
|
+
it 'should return nil when given nil' do
|
27
|
+
DataMapper::Mongo::Types::EmbeddedArray.dump(nil, nil).should == nil
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should return the argument when given an Array' do
|
31
|
+
dumped = DataMapper::Mongo::Types::EmbeddedArray.dump([1, 2], nil)
|
32
|
+
dumped.should == [1, 2]
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should return an Array when given a Set' do
|
36
|
+
pending do
|
37
|
+
dumped = DataMapper::Mongo::Types::EmbeddedArray.dump(Set.new(1, 2), nil)
|
38
|
+
dumped.should be_kind_of(Array)
|
39
|
+
dumped.should == [1, 2]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'should raise an error when given anything else' do
|
44
|
+
pending "EmbeddedArray should not be able to dump objects which " \
|
45
|
+
"can't later be loaded" do
|
46
|
+
[ 0, 1, Object.new, true, false, {} ].each do |value|
|
47
|
+
lambda {
|
48
|
+
DataMapper::Mongo::Types::EmbeddedArray.dump(value, nil)
|
49
|
+
}.should raise_error(ArgumentError)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
2
|
+
|
3
|
+
describe DataMapper::Mongo::Types::EmbeddedHash do
|
4
|
+
EHash = DataMapper::Mongo::Types::EmbeddedHash
|
5
|
+
|
6
|
+
describe '.load' do
|
7
|
+
it 'should return nil when given nil' do
|
8
|
+
EHash.load(nil, nil).should be_nil
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should return an empty Hash when given an empty Hash' do
|
12
|
+
loaded = EHash.load({}, nil)
|
13
|
+
loaded.should == {}
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should return a Hash with values when given a Hash with values' do
|
17
|
+
loaded = EHash.load({ :hello => 'World' }, nil)
|
18
|
+
loaded.should == { :hello => 'World' }
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should return a Hash with symbolized keys' do
|
22
|
+
loaded = EHash.load({ 'hello' => 'World' }, nil)
|
23
|
+
loaded.should == { :hello => 'World' }
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should return an empty Hash when given an Array with no values' do
|
27
|
+
loaded = EHash.load([], nil)
|
28
|
+
loaded.should == {}
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should return an empty Hash with values when given an Array with values' do
|
32
|
+
loaded = EHash.load([:hello, 'World'], nil)
|
33
|
+
loaded.should == { :hello => 'World' }
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should raise an error when given anything else' do
|
37
|
+
pending "EmbeddedHash should not be able to load arbitrary objects" do
|
38
|
+
lambda { EHash.load(0, nil) }.should raise_error(ArgumentError)
|
39
|
+
lambda { EHash.load(1, nil) }.should raise_error(ArgumentError)
|
40
|
+
lambda { EHash.load(Object.new, nil) }.should raise_error(ArgumentError)
|
41
|
+
lambda { EHash.load(true, nil) }.should raise_error(ArgumentError)
|
42
|
+
lambda { EHash.load(false, nil) }.should raise_error(ArgumentError)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe '.dump' do
|
48
|
+
it 'should return nil when given nil' do
|
49
|
+
EHash.dump(nil, nil).should be_nil
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'should return an empty Hash when given an empty Hash' do
|
53
|
+
EHash.dump({}, nil).should == {}
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'should return a Hash with values when given a Hash with values' do
|
57
|
+
EHash.dump({ :hello => 'World' }, nil).should == { :hello => 'World' }
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'should return an empty Hash when given an empty Mash' do
|
61
|
+
EHash.dump(Mash.new, nil).should == {}
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'should return a Hash with values when given a Mash with values' do
|
65
|
+
dumped = EHash.dump(Mash.new('hello' => 'World'), nil)
|
66
|
+
dumped.should == { 'hello' => 'World' }
|
67
|
+
end
|
68
|
+
|
69
|
+
it 'should raise an error when given anything else' do
|
70
|
+
pending "EmbeddedHash should not be able to dump objects which " \
|
71
|
+
"can't later be loaded" do
|
72
|
+
lambda { EHash.dump(0, nil) }.should raise_error(ArgumentError)
|
73
|
+
lambda { EHash.dump(1, nil) }.should raise_error(ArgumentError)
|
74
|
+
lambda { EHash.dump(Object.new, nil) }.should raise_error(ArgumentError)
|
75
|
+
lambda { EHash.dump(true, nil) }.should raise_error(ArgumentError)
|
76
|
+
lambda { EHash.dump(false, nil) }.should raise_error(ArgumentError)
|
77
|
+
lambda { EHash.dump([], nil) }.should raise_error(ArgumentError)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
data/spec/rcov.opts
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
2
|
+
|
3
|
+
describe DataMapper::Mongo::Resource do
|
4
|
+
|
5
|
+
before(:all) do
|
6
|
+
class ::CarType
|
7
|
+
include DataMapper::Mongo::EmbeddedResource
|
8
|
+
property :name, String
|
9
|
+
end
|
10
|
+
|
11
|
+
class ::Car
|
12
|
+
include DataMapper::Mongo::Resource
|
13
|
+
property :model, String
|
14
|
+
end
|
15
|
+
|
16
|
+
class ::DMCar
|
17
|
+
include DataMapper::Resource
|
18
|
+
property :type, String
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# descendants
|
24
|
+
#
|
25
|
+
|
26
|
+
describe '#descendants' do
|
27
|
+
before(:all) do
|
28
|
+
@descendants = DataMapper::Mongo::EmbeddedModel.descendants
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should include Mongo embedment models' do
|
32
|
+
@descendants.should include(CarType)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should not include Mongo models' do
|
36
|
+
@descendants.should_not include(Car)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should not include DataMapper models' do
|
40
|
+
@descendants.should_not include(DMCar)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
2
|
+
|
3
|
+
describe DataMapper::Mongo::Model::Embedment do
|
4
|
+
|
5
|
+
before(:all) do
|
6
|
+
class ::Address
|
7
|
+
include DataMapper::Mongo::EmbeddedResource
|
8
|
+
property :street, String
|
9
|
+
property :city, String, :field => 'conurbation'
|
10
|
+
end
|
11
|
+
|
12
|
+
class ::User
|
13
|
+
include DataMapper::Mongo::Resource
|
14
|
+
property :id, ObjectID
|
15
|
+
embeds 1, :address
|
16
|
+
embeds n, :locations, Address
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#embedments' do
|
21
|
+
before(:all) do
|
22
|
+
@embedments = User.embedments
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should return a hash' do
|
26
|
+
@embedments.should be_kind_of(Hash)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'should include OneToOne embedments' do
|
30
|
+
@embedments.should have_key(:address)
|
31
|
+
@embedments[:address].should \
|
32
|
+
be_kind_of(DataMapper::Mongo::Embedments::OneToOne::Relationship)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should include OneToMany embedments' do
|
36
|
+
@embedments.should have_key(:locations)
|
37
|
+
@embedments[:locations].should \
|
38
|
+
be_kind_of(DataMapper::Mongo::Embedments::OneToMany::Relationship)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
2
|
+
|
3
|
+
describe DataMapper::Mongo::Resource do
|
4
|
+
|
5
|
+
before(:all) do
|
6
|
+
class ::Address
|
7
|
+
include DataMapper::Mongo::EmbeddedResource
|
8
|
+
property :city, String
|
9
|
+
end
|
10
|
+
|
11
|
+
class ::User
|
12
|
+
include DataMapper::Mongo::Resource
|
13
|
+
property :id, ObjectID
|
14
|
+
property :name, String
|
15
|
+
property :tags, Array
|
16
|
+
property :metadata, Hash
|
17
|
+
embeds 1, :address, :model => Address
|
18
|
+
embeds n, :locations, :model => Address
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# dirty_attributes
|
24
|
+
#
|
25
|
+
|
26
|
+
describe '#dirty_attributes' do
|
27
|
+
describe 'when the resource has a change' do
|
28
|
+
it 'should return true' do
|
29
|
+
dirty = User.new(:name => 'Mongo').dirty_attributes
|
30
|
+
dirty.should == { User.properties[:name] => 'Mongo' }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'when the resource has no changes' do
|
35
|
+
it 'should return true if a one-to-one embedment has a change' do
|
36
|
+
user = User.new(:address => Address.new(:city => 'Rock Ridge'))
|
37
|
+
user.dirty_attributes.should == {
|
38
|
+
User.embedments[:address] => {
|
39
|
+
Address.properties[:city] => 'Rock Ridge'
|
40
|
+
}
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'should return false having just been saved' do
|
45
|
+
user = User.new(:address => Address.new(:city => 'Rock Ridge'))
|
46
|
+
user.save
|
47
|
+
user.dirty_attributes.should == {}
|
48
|
+
user.dirty_attributes.should be_empty
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'should return true if a one-to-many embedment has a change' do
|
52
|
+
user = User.new
|
53
|
+
user.locations << Address.new(:city => 'Rock Ridge')
|
54
|
+
user.dirty_attributes.should == {
|
55
|
+
User.embedments[:locations] => [{
|
56
|
+
Address.properties[:city] => 'Rock Ridge'
|
57
|
+
}]
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should return false if no embedments have changes' do
|
62
|
+
user = User.new(:address => Address.new(:city => 'Rock Ridge'))
|
63
|
+
user.locations << Address.new(:city => 'Rock Ridge')
|
64
|
+
user.save
|
65
|
+
user.dirty_attributes.should be_empty
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end # dirty_attributes
|
69
|
+
|
70
|
+
end
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'rubygems'
|
3
|
+
require 'spec'
|
4
|
+
|
5
|
+
MONGO_SPEC_ROOT = Pathname(__FILE__).dirname.expand_path
|
6
|
+
$LOAD_PATH.unshift(MONGO_SPEC_ROOT.parent + 'lib')
|
7
|
+
|
8
|
+
require 'mongo_adapter'
|
9
|
+
|
10
|
+
Pathname.glob((MONGO_SPEC_ROOT + '{lib,*/shared}/**/*.rb').to_s).each { |file| require file }
|
11
|
+
|
12
|
+
# Define the repositories used by the specs. Override the defaults by
|
13
|
+
# supplying ENV['DEFAULT_SPEC_URI'] or ENV['AUTH_SPEC_URI'].
|
14
|
+
|
15
|
+
REPOS = {
|
16
|
+
'default' => 'mongo://localhost/dm-mongo-test',
|
17
|
+
'auth' => 'mongo://dmm-auth:dmm-password@localhost/dm-mongo-test-auth'
|
18
|
+
}
|
19
|
+
|
20
|
+
REPOS.each do |name, default|
|
21
|
+
connection_string = ENV["#{name.upcase}_SPEC_URI"] || default
|
22
|
+
|
23
|
+
DataMapper.setup(name.to_sym, connection_string)
|
24
|
+
REPOS[name] = connection_string # ensure *_SPEC_URI is saved
|
25
|
+
end
|
26
|
+
|
27
|
+
REPOS.freeze
|
28
|
+
|
29
|
+
Spec::Runner.configure do |config|
|
30
|
+
config.include(DataMapper::Mongo::Spec::CleanupModels)
|
31
|
+
|
32
|
+
config.before(:all) do
|
33
|
+
models = DataMapper::Model.descendants.to_a
|
34
|
+
models += DataMapper::Mongo::EmbeddedModel.descendants.to_a
|
35
|
+
models.delete(DataMapper::Mongo::EmbeddedResource)
|
36
|
+
|
37
|
+
cleanup_models(*models)
|
38
|
+
end
|
39
|
+
|
40
|
+
config.after(:suite) do
|
41
|
+
# Close all the raw connections
|
42
|
+
DataMapper::Mongo::Spec.database(:default).connection.close
|
43
|
+
DataMapper::Mongo::Spec.database(:auth).connection.close
|
44
|
+
end
|
45
|
+
end
|
data/tasks/spec.rake
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
spec_defaults = lambda do |spec|
|
2
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
3
|
+
spec.libs << 'lib' << 'spec'
|
4
|
+
spec.spec_opts << '--options' << 'spec/spec.opts'
|
5
|
+
end
|
6
|
+
|
7
|
+
begin
|
8
|
+
require 'spec/rake/spectask'
|
9
|
+
Spec::Rake::SpecTask.new(:spec, &spec_defaults)
|
10
|
+
rescue LoadError
|
11
|
+
task :spec do
|
12
|
+
abort 'rspec is not available. In order to run spec, you must: gem ' \
|
13
|
+
'install rspec'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
begin
|
18
|
+
require 'rcov'
|
19
|
+
require 'spec/rake/verify_rcov'
|
20
|
+
|
21
|
+
Spec::Rake::SpecTask.new(:rcov) do |rcov|
|
22
|
+
spec_defaults.call(rcov)
|
23
|
+
rcov.rcov = true
|
24
|
+
rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
|
25
|
+
end
|
26
|
+
|
27
|
+
RCov::VerifyTask.new('rcov:verify' => :rcov) do |rcov|
|
28
|
+
rcov.threshold = 100
|
29
|
+
end
|
30
|
+
rescue LoadError
|
31
|
+
%w(rcov rcov:verify).each do |name|
|
32
|
+
task name do
|
33
|
+
abort "rcov is not available. In order to run #{name}, you must: gem " \
|
34
|
+
"install rcov"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/tasks/yard.rake
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
begin
|
2
|
+
require 'pathname'
|
3
|
+
require 'yardstick'
|
4
|
+
require 'yardstick/rake/measurement'
|
5
|
+
require 'yardstick/rake/verify'
|
6
|
+
|
7
|
+
# yardstick_measure task
|
8
|
+
Yardstick::Rake::Measurement.new('yardstick')
|
9
|
+
|
10
|
+
# verify_measurements task
|
11
|
+
Yardstick::Rake::Verify.new('yardstick:verify') do |verify|
|
12
|
+
verify.threshold = 100
|
13
|
+
end
|
14
|
+
rescue LoadError
|
15
|
+
%w(yardstick yardstick:verify).each do |name|
|
16
|
+
task name do
|
17
|
+
abort "Yardstick is not available. In order to run #{name}, you " \
|
18
|
+
"must: gem install yardstick"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,215 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dm-mongo-adapter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0.pre1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Piotr Solnica
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-01-31 00:00:00 +01:00
|
13
|
+
default_executable: console
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: dm-core
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ~>
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.10.2
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: dm-aggregates
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.10.2
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: mongo
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.18.3
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: mongo_ext
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.18.3
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
type: :development
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.3.0
|
64
|
+
version:
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: yard
|
67
|
+
type: :development
|
68
|
+
version_requirement:
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0.5"
|
74
|
+
version:
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: yardstick
|
77
|
+
type: :development
|
78
|
+
version_requirement:
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: "0.1"
|
84
|
+
version:
|
85
|
+
description:
|
86
|
+
email: piotr.solnica@gmail.com
|
87
|
+
executables:
|
88
|
+
- console
|
89
|
+
extensions: []
|
90
|
+
|
91
|
+
extra_rdoc_files:
|
92
|
+
- LICENSE
|
93
|
+
- README.rdoc
|
94
|
+
- TODO
|
95
|
+
files:
|
96
|
+
- .gitignore
|
97
|
+
- LICENSE
|
98
|
+
- README.rdoc
|
99
|
+
- Rakefile
|
100
|
+
- TODO
|
101
|
+
- VERSION.yml
|
102
|
+
- bin/console
|
103
|
+
- dm-mongo-adapter.gemspec
|
104
|
+
- lib/mongo_adapter.rb
|
105
|
+
- lib/mongo_adapter/adapter.rb
|
106
|
+
- lib/mongo_adapter/aggregates.rb
|
107
|
+
- lib/mongo_adapter/conditions.rb
|
108
|
+
- lib/mongo_adapter/embedded_model.rb
|
109
|
+
- lib/mongo_adapter/embedded_resource.rb
|
110
|
+
- lib/mongo_adapter/embedments/one_to_many.rb
|
111
|
+
- lib/mongo_adapter/embedments/one_to_one.rb
|
112
|
+
- lib/mongo_adapter/embedments/relationship.rb
|
113
|
+
- lib/mongo_adapter/migrations.rb
|
114
|
+
- lib/mongo_adapter/model.rb
|
115
|
+
- lib/mongo_adapter/model/embedment.rb
|
116
|
+
- lib/mongo_adapter/modifier.rb
|
117
|
+
- lib/mongo_adapter/query.rb
|
118
|
+
- lib/mongo_adapter/query/java_script.rb
|
119
|
+
- lib/mongo_adapter/resource.rb
|
120
|
+
- lib/mongo_adapter/types/date.rb
|
121
|
+
- lib/mongo_adapter/types/date_time.rb
|
122
|
+
- lib/mongo_adapter/types/db_ref.rb
|
123
|
+
- lib/mongo_adapter/types/discriminator.rb
|
124
|
+
- lib/mongo_adapter/types/object_id.rb
|
125
|
+
- lib/mongo_adapter/types/objects.rb
|
126
|
+
- script/performance.rb
|
127
|
+
- spec/legacy/README
|
128
|
+
- spec/legacy/adapter_shared_spec.rb
|
129
|
+
- spec/legacy/adapter_spec.rb
|
130
|
+
- spec/legacy/associations_spec.rb
|
131
|
+
- spec/legacy/embedded_resource_spec.rb
|
132
|
+
- spec/legacy/embedments_spec.rb
|
133
|
+
- spec/legacy/modifier_spec.rb
|
134
|
+
- spec/legacy/property_spec.rb
|
135
|
+
- spec/legacy/spec_helper.rb
|
136
|
+
- spec/legacy/sti_spec.rb
|
137
|
+
- spec/lib/cleanup_models.rb
|
138
|
+
- spec/lib/raw_connections.rb
|
139
|
+
- spec/public/embedded_collection_spec.rb
|
140
|
+
- spec/public/embedded_resource_spec.rb
|
141
|
+
- spec/public/model/embedment_spec.rb
|
142
|
+
- spec/public/model_spec.rb
|
143
|
+
- spec/public/resource_spec.rb
|
144
|
+
- spec/public/shared/model_embedments_spec.rb
|
145
|
+
- spec/public/shared/object_id_shared_spec.rb
|
146
|
+
- spec/public/types/df_ref_spec.rb
|
147
|
+
- spec/public/types/discriminator_spec.rb
|
148
|
+
- spec/public/types/embedded_array_spec.rb
|
149
|
+
- spec/public/types/embedded_hash_spec.rb
|
150
|
+
- spec/public/types/object_id_spec.rb
|
151
|
+
- spec/rcov.opts
|
152
|
+
- spec/semipublic/embedded_model_spec.rb
|
153
|
+
- spec/semipublic/model/embedment_spec.rb
|
154
|
+
- spec/semipublic/resource_spec.rb
|
155
|
+
- spec/spec.opts
|
156
|
+
- spec/spec_helper.rb
|
157
|
+
- tasks/spec.rake
|
158
|
+
- tasks/yard.rake
|
159
|
+
- tasks/yardstick.rake
|
160
|
+
has_rdoc: false
|
161
|
+
homepage: http://github.com/solnic/dm-mongo-adapter
|
162
|
+
licenses: []
|
163
|
+
|
164
|
+
post_install_message:
|
165
|
+
rdoc_options:
|
166
|
+
- --charset=UTF-8
|
167
|
+
require_paths:
|
168
|
+
- lib
|
169
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: "0"
|
174
|
+
version:
|
175
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: 1.3.1
|
180
|
+
version:
|
181
|
+
requirements: []
|
182
|
+
|
183
|
+
rubyforge_project:
|
184
|
+
rubygems_version: 1.3.5
|
185
|
+
signing_key:
|
186
|
+
specification_version: 3
|
187
|
+
summary: MongoDB DataMapper Adapter
|
188
|
+
test_files:
|
189
|
+
- spec/semipublic/model/embedment_spec.rb
|
190
|
+
- spec/semipublic/resource_spec.rb
|
191
|
+
- spec/semipublic/embedded_model_spec.rb
|
192
|
+
- spec/spec_helper.rb
|
193
|
+
- spec/legacy/sti_spec.rb
|
194
|
+
- spec/legacy/property_spec.rb
|
195
|
+
- spec/legacy/modifier_spec.rb
|
196
|
+
- spec/legacy/adapter_spec.rb
|
197
|
+
- spec/legacy/spec_helper.rb
|
198
|
+
- spec/legacy/embedments_spec.rb
|
199
|
+
- spec/legacy/adapter_shared_spec.rb
|
200
|
+
- spec/legacy/associations_spec.rb
|
201
|
+
- spec/legacy/embedded_resource_spec.rb
|
202
|
+
- spec/public/embedded_collection_spec.rb
|
203
|
+
- spec/public/model_spec.rb
|
204
|
+
- spec/public/model/embedment_spec.rb
|
205
|
+
- spec/public/shared/model_embedments_spec.rb
|
206
|
+
- spec/public/shared/object_id_shared_spec.rb
|
207
|
+
- spec/public/resource_spec.rb
|
208
|
+
- spec/public/types/discriminator_spec.rb
|
209
|
+
- spec/public/types/embedded_hash_spec.rb
|
210
|
+
- spec/public/types/embedded_array_spec.rb
|
211
|
+
- spec/public/types/df_ref_spec.rb
|
212
|
+
- spec/public/types/object_id_spec.rb
|
213
|
+
- spec/public/embedded_resource_spec.rb
|
214
|
+
- spec/lib/cleanup_models.rb
|
215
|
+
- spec/lib/raw_connections.rb
|