orm_adapter 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock.development +86 -78
- data/History.txt +5 -0
- data/README.rdoc +5 -3
- data/Rakefile +1 -1
- data/lib/orm_adapter/adapters/mongo_mapper.rb +68 -0
- data/lib/orm_adapter/version.rb +1 -1
- data/lib/orm_adapter.rb +2 -1
- data/orm_adapter.gemspec +2 -1
- data/spec/orm_adapter/adapters/mongo_mapper_spec.rb +49 -0
- data/spec/orm_adapter/adapters/mongoid_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +28 -86
data/Gemfile.lock.development
CHANGED
@@ -1,115 +1,123 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
orm_adapter (0.0.
|
4
|
+
orm_adapter (0.0.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: http://rubygems.org/
|
8
8
|
specs:
|
9
|
-
activemodel (3.0.
|
10
|
-
activesupport (= 3.0.
|
9
|
+
activemodel (3.0.7)
|
10
|
+
activesupport (= 3.0.7)
|
11
11
|
builder (~> 2.1.2)
|
12
|
-
i18n (~> 0.
|
13
|
-
activerecord (3.0.
|
14
|
-
activemodel (= 3.0.
|
15
|
-
activesupport (= 3.0.
|
12
|
+
i18n (~> 0.5.0)
|
13
|
+
activerecord (3.0.7)
|
14
|
+
activemodel (= 3.0.7)
|
15
|
+
activesupport (= 3.0.7)
|
16
16
|
arel (~> 2.0.2)
|
17
17
|
tzinfo (~> 0.3.23)
|
18
|
-
activesupport (3.0.
|
19
|
-
addressable (2.2.
|
20
|
-
arel (2.0.
|
21
|
-
|
22
|
-
|
18
|
+
activesupport (3.0.7)
|
19
|
+
addressable (2.2.5)
|
20
|
+
arel (2.0.9)
|
21
|
+
bcrypt-ruby (2.1.4)
|
22
|
+
bson (1.3.0)
|
23
|
+
bson_ext (1.3.0)
|
23
24
|
builder (2.1.2)
|
24
|
-
data_objects (0.10.
|
25
|
+
data_objects (0.10.5)
|
25
26
|
addressable (~> 2.1)
|
26
|
-
datamapper (1.0
|
27
|
-
dm-aggregates (= 1.0
|
28
|
-
dm-constraints (= 1.0
|
29
|
-
dm-core (= 1.0
|
30
|
-
dm-migrations (= 1.0
|
31
|
-
dm-serializer (= 1.0
|
32
|
-
dm-timestamps (= 1.0
|
33
|
-
dm-transactions (= 1.0
|
34
|
-
dm-types (= 1.0
|
35
|
-
dm-validations (= 1.0
|
27
|
+
datamapper (1.1.0)
|
28
|
+
dm-aggregates (= 1.1.0)
|
29
|
+
dm-constraints (= 1.1.0)
|
30
|
+
dm-core (= 1.1.0)
|
31
|
+
dm-migrations (= 1.1.0)
|
32
|
+
dm-serializer (= 1.1.0)
|
33
|
+
dm-timestamps (= 1.1.0)
|
34
|
+
dm-transactions (= 1.1.0)
|
35
|
+
dm-types (= 1.1.0)
|
36
|
+
dm-validations (= 1.1.0)
|
36
37
|
diff-lcs (1.1.2)
|
37
|
-
dm-active_model (1.0
|
38
|
-
activemodel (~> 3.0.
|
39
|
-
dm-core (~> 1.0
|
40
|
-
dm-aggregates (1.0
|
41
|
-
dm-core (~> 1.0
|
42
|
-
dm-constraints (1.0
|
43
|
-
dm-core (~> 1.0
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
extlib (~> 0.9.15)
|
48
|
-
dm-do-adapter (1.0.2)
|
38
|
+
dm-active_model (1.1.0)
|
39
|
+
activemodel (~> 3.0.4)
|
40
|
+
dm-core (~> 1.1.0)
|
41
|
+
dm-aggregates (1.1.0)
|
42
|
+
dm-core (~> 1.1.0)
|
43
|
+
dm-constraints (1.1.0)
|
44
|
+
dm-core (~> 1.1.0)
|
45
|
+
dm-core (1.1.0)
|
46
|
+
addressable (~> 2.2.4)
|
47
|
+
dm-do-adapter (1.1.0)
|
49
48
|
data_objects (~> 0.10.2)
|
50
|
-
dm-core (~> 1.0
|
51
|
-
dm-migrations (1.0
|
52
|
-
dm-core (~> 1.0
|
53
|
-
dm-serializer (1.0
|
54
|
-
dm-core (~> 1.0
|
55
|
-
fastercsv (~> 1.5.
|
56
|
-
|
57
|
-
dm-sqlite-adapter (1.0
|
58
|
-
dm-do-adapter (~> 1.0
|
49
|
+
dm-core (~> 1.1.0)
|
50
|
+
dm-migrations (1.1.0)
|
51
|
+
dm-core (~> 1.1.0)
|
52
|
+
dm-serializer (1.1.0)
|
53
|
+
dm-core (~> 1.1.0)
|
54
|
+
fastercsv (~> 1.5.4)
|
55
|
+
json (~> 1.4.6)
|
56
|
+
dm-sqlite-adapter (1.1.0)
|
57
|
+
dm-do-adapter (~> 1.1.0)
|
59
58
|
do_sqlite3 (~> 0.10.2)
|
60
|
-
dm-timestamps (1.0
|
61
|
-
dm-core (~> 1.0
|
62
|
-
dm-transactions (1.0
|
63
|
-
dm-core (~> 1.0
|
64
|
-
dm-types (1.0
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
fastercsv (1.5.
|
59
|
+
dm-timestamps (1.1.0)
|
60
|
+
dm-core (~> 1.1.0)
|
61
|
+
dm-transactions (1.1.0)
|
62
|
+
dm-core (~> 1.1.0)
|
63
|
+
dm-types (1.1.0)
|
64
|
+
bcrypt-ruby (~> 2.1.4)
|
65
|
+
dm-core (~> 1.1.0)
|
66
|
+
fastercsv (~> 1.5.4)
|
67
|
+
json (~> 1.4.6)
|
68
|
+
stringex (~> 1.2.0)
|
69
|
+
uuidtools (~> 2.1.2)
|
70
|
+
dm-validations (1.1.0)
|
71
|
+
dm-core (~> 1.1.0)
|
72
|
+
do_sqlite3 (0.10.5)
|
73
|
+
data_objects (= 0.10.5)
|
74
|
+
fastercsv (1.5.4)
|
76
75
|
git (1.2.5)
|
77
76
|
i18n (0.5.0)
|
78
|
-
|
79
|
-
mongo (1.
|
80
|
-
bson (>= 1.
|
81
|
-
|
77
|
+
json (1.4.6)
|
78
|
+
mongo (1.3.0)
|
79
|
+
bson (>= 1.3.0)
|
80
|
+
mongo_mapper (0.9.0)
|
81
|
+
activemodel (~> 3.0.0)
|
82
|
+
activesupport (~> 3.0.0)
|
83
|
+
plucky (~> 0.3.6)
|
84
|
+
mongoid (2.0.1)
|
82
85
|
activemodel (~> 3.0)
|
83
|
-
mongo (~> 1.
|
86
|
+
mongo (~> 1.3)
|
84
87
|
tzinfo (~> 0.3.22)
|
85
88
|
will_paginate (~> 3.0.pre)
|
89
|
+
plucky (0.3.8)
|
90
|
+
mongo (~> 1.3)
|
86
91
|
rake (0.8.7)
|
87
|
-
rspec (2.
|
88
|
-
rspec-core (~> 2.
|
89
|
-
rspec-expectations (~> 2.
|
90
|
-
rspec-mocks (~> 2.
|
91
|
-
rspec-core (2.
|
92
|
-
rspec-expectations (2.
|
92
|
+
rspec (2.5.0)
|
93
|
+
rspec-core (~> 2.5.0)
|
94
|
+
rspec-expectations (~> 2.5.0)
|
95
|
+
rspec-mocks (~> 2.5.0)
|
96
|
+
rspec-core (2.5.2)
|
97
|
+
rspec-expectations (2.5.0)
|
93
98
|
diff-lcs (~> 1.1.2)
|
94
|
-
rspec-mocks (2.
|
95
|
-
sqlite3
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
+
rspec-mocks (2.5.0)
|
100
|
+
sqlite3 (1.3.3)
|
101
|
+
sqlite3-ruby (1.3.3)
|
102
|
+
sqlite3 (>= 1.3.3)
|
103
|
+
stringex (1.2.1)
|
104
|
+
tzinfo (0.3.27)
|
105
|
+
uuidtools (2.1.2)
|
99
106
|
will_paginate (3.0.pre2)
|
100
|
-
yard (0.6.
|
107
|
+
yard (0.6.8)
|
101
108
|
|
102
109
|
PLATFORMS
|
103
110
|
ruby
|
104
111
|
|
105
112
|
DEPENDENCIES
|
106
113
|
activerecord (>= 3.0.0)
|
107
|
-
bson_ext (>= 1.
|
114
|
+
bson_ext (>= 1.3.0)
|
108
115
|
bundler (>= 1.0.0)
|
109
116
|
datamapper (>= 1.0)
|
110
117
|
dm-active_model (>= 1.0)
|
111
118
|
dm-sqlite-adapter (>= 1.0)
|
112
119
|
git (>= 1.2.5)
|
120
|
+
mongo_mapper (>= 0.9.0)
|
113
121
|
mongoid (>= 2.0.0.beta.20)
|
114
122
|
orm_adapter!
|
115
123
|
rake (>= 0.8.7)
|
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -7,7 +7,7 @@ Provides a single point of entry for popular ruby ORMs. Its target audience is
|
|
7
7
|
|
8
8
|
require 'orm_adapter'
|
9
9
|
|
10
|
-
User # is it an ActiveRecord, DM Resource, or MongoId Document?
|
10
|
+
User # is it an ActiveRecord, DM Resource, MongoMapper or MongoId Document?
|
11
11
|
|
12
12
|
User.to_adapter.find_first :name => 'Fred' # we don't care!
|
13
13
|
|
@@ -22,9 +22,9 @@ Provides a single point of entry for popular ruby ORMs. Its target audience is
|
|
22
22
|
|
23
23
|
== Supported ORMs
|
24
24
|
|
25
|
-
Currently supported ORMs are *ActiveRecord*, *DataMapper* and *MongoId*.
|
25
|
+
Currently supported ORMs are *ActiveRecord*, *DataMapper*, *MongoMapper*, and *MongoId*.
|
26
26
|
|
27
|
-
We welcome you to write new adapters as gems. ORM Adapter will stay focused in having these
|
27
|
+
We welcome you to write new adapters as gems. ORM Adapter will stay focused in having these major ORMs working.
|
28
28
|
|
29
29
|
To write an adapter look at <tt>lib/orm_adapter/adapters/active_record.rb</tt> for an example of implementation. To see how to test it, look at <tt>spec/orm_adapter/example_app_shared.rb</tt>, <tt>spec/orm_adapter/adapters/active_record_spec.rb</tt>. You'll need to require the target ORM in <tt>spec/spec_helper.rb</tt>
|
30
30
|
|
@@ -52,6 +52,8 @@ orm_adapter is an extraction from {pickle}[http://github.com/ianwhite/pickle] by
|
|
52
52
|
|
53
53
|
{José Valim}[http://github.com/josevalim] suggested the extraction, and worked on the first release with Ian.
|
54
54
|
|
55
|
+
{Luke Cunningham}[http://github.com/icaruswings] contributes the Mongo Mapper adapter.
|
56
|
+
|
55
57
|
|
56
58
|
== Development
|
57
59
|
|
data/Rakefile
CHANGED
@@ -43,7 +43,7 @@ namespace :release do
|
|
43
43
|
raise "** Gemfile.lock.development has been updated, please commit these changes."
|
44
44
|
end
|
45
45
|
|
46
|
-
if
|
46
|
+
if git.status.changed.any? || git.status.added.any? || git.status.deleted.any?
|
47
47
|
raise "** repo is not clean, try committing some files"
|
48
48
|
end
|
49
49
|
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'mongo_mapper'
|
2
|
+
|
3
|
+
module MongoMapper
|
4
|
+
module Document
|
5
|
+
module ClassMethods
|
6
|
+
include OrmAdapter::ToAdapter
|
7
|
+
end
|
8
|
+
|
9
|
+
class OrmAdapter < ::OrmAdapter::Base
|
10
|
+
# Do not consider these to be part of the class list
|
11
|
+
def self.except_classes
|
12
|
+
@@except_classes ||= []
|
13
|
+
end
|
14
|
+
|
15
|
+
# Gets a list of the available models for this adapter
|
16
|
+
def self.model_classes
|
17
|
+
ObjectSpace.each_object(Class).to_a.select {|klass| klass.ancestors.include? MongoMapper::Document}
|
18
|
+
end
|
19
|
+
|
20
|
+
# get a list of column names for a given class
|
21
|
+
def column_names
|
22
|
+
klass.column_names
|
23
|
+
end
|
24
|
+
|
25
|
+
# @see OrmAdapter::Base#get!
|
26
|
+
def get!(id)
|
27
|
+
klass.find!(wrap_key(id))
|
28
|
+
end
|
29
|
+
|
30
|
+
# @see OrmAdapter::Base#get
|
31
|
+
def get(id)
|
32
|
+
klass.first({ :id => wrap_key(id) })
|
33
|
+
end
|
34
|
+
|
35
|
+
# @see OrmAdapter::Base#find_first
|
36
|
+
def find_first(conditions)
|
37
|
+
conditions, order = extract_conditions_and_order!(conditions)
|
38
|
+
conditions = conditions.merge(:sort => order) unless order.nil?
|
39
|
+
klass.first(conditions_to_fields(conditions))
|
40
|
+
end
|
41
|
+
|
42
|
+
# @see OrmAdapter::Base#find_all
|
43
|
+
def find_all(conditions)
|
44
|
+
conditions, order = extract_conditions_and_order!(conditions)
|
45
|
+
conditions = conditions.merge(:sort => order) unless order.nil?
|
46
|
+
klass.all(conditions_to_fields(conditions))
|
47
|
+
end
|
48
|
+
|
49
|
+
# @see OrmAdapter::Base#create!
|
50
|
+
def create!(attributes)
|
51
|
+
klass.create!(attributes)
|
52
|
+
end
|
53
|
+
|
54
|
+
protected
|
55
|
+
|
56
|
+
# converts and documents to ids
|
57
|
+
def conditions_to_fields(conditions)
|
58
|
+
conditions.inject({}) do |fields, (key, value)|
|
59
|
+
if value.is_a?(MongoMapper::Document) && klass.key?("#{key}_id")
|
60
|
+
fields.merge("#{key}_id" => value.id)
|
61
|
+
else
|
62
|
+
fields.merge(key => value)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/lib/orm_adapter/version.rb
CHANGED
data/lib/orm_adapter.rb
CHANGED
@@ -16,4 +16,5 @@ end
|
|
16
16
|
|
17
17
|
require 'orm_adapter/adapters/active_record' if defined?(ActiveRecord::Base)
|
18
18
|
require 'orm_adapter/adapters/data_mapper' if defined?(DataMapper::Resource)
|
19
|
-
require 'orm_adapter/adapters/mongoid' if defined?(Mongoid::Document)
|
19
|
+
require 'orm_adapter/adapters/mongoid' if defined?(Mongoid::Document)
|
20
|
+
require 'orm_adapter/adapters/mongo_mapper' if defined?(MongoMapper::Document)
|
data/orm_adapter.gemspec
CHANGED
@@ -24,7 +24,8 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.add_development_dependency "rake", ">= 0.8.7"
|
25
25
|
s.add_development_dependency "activerecord", ">= 3.0.0"
|
26
26
|
s.add_development_dependency "mongoid", ">= 2.0.0.beta.20"
|
27
|
-
s.add_development_dependency "
|
27
|
+
s.add_development_dependency "mongo_mapper", ">= 0.9.0"
|
28
|
+
s.add_development_dependency "bson_ext", ">= 1.3.0"
|
28
29
|
s.add_development_dependency "rspec", ">= 2.4.0"
|
29
30
|
s.add_development_dependency "sqlite3-ruby", ">= 1.3.2"
|
30
31
|
s.add_development_dependency "datamapper", ">= 1.0"
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'orm_adapter/example_app_shared'
|
3
|
+
|
4
|
+
if !defined?(MongoMapper) || !(Mongo::Connection.new.db('orm_adapter_spec') rescue nil)
|
5
|
+
puts "** require 'mongo_mapper' and start mongod to run the specs in #{__FILE__}"
|
6
|
+
else
|
7
|
+
|
8
|
+
MongoMapper.connection = Mongo::Connection.new
|
9
|
+
MongoMapper.database = "orm_adapter_spec"
|
10
|
+
|
11
|
+
|
12
|
+
module MongoMapperOrmSpec
|
13
|
+
class User
|
14
|
+
include MongoMapper::Document
|
15
|
+
key :name
|
16
|
+
key :rating
|
17
|
+
many :notes, :foreign_key => :owner_id, :class_name => 'MongoMapperOrmSpec::Note'
|
18
|
+
end
|
19
|
+
|
20
|
+
class Note
|
21
|
+
include MongoMapper::Document
|
22
|
+
key :body, :default => "made by orm"
|
23
|
+
belongs_to :owner, :class_name => 'MongoMapperOrmSpec::User'
|
24
|
+
end
|
25
|
+
|
26
|
+
# here be the specs!
|
27
|
+
describe MongoMapper::Document::OrmAdapter do
|
28
|
+
|
29
|
+
before do
|
30
|
+
MongoMapper.database.collections.each do | coll |
|
31
|
+
coll.remove
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "the OrmAdapter class" do
|
36
|
+
subject { MongoMapper::Document::OrmAdapter }
|
37
|
+
|
38
|
+
specify "#model_classes should return all document classes" do
|
39
|
+
(subject.model_classes & [User, Note]).to_set.should == [User, Note].to_set
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it_should_behave_like "example app with orm_adapter" do
|
44
|
+
let(:user_class) { User }
|
45
|
+
let(:note_class) { Note }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
require 'orm_adapter/example_app_shared'
|
3
3
|
|
4
4
|
if !defined?(Mongoid) || !(Mongo::Connection.new.db('orm_adapter_spec') rescue nil)
|
5
|
-
puts "** require 'mongoid' start mongod to run the specs in #{__FILE__}"
|
5
|
+
puts "** require 'mongoid' and start mongod to run the specs in #{__FILE__}"
|
6
6
|
else
|
7
7
|
|
8
8
|
Mongoid.configure do |config|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orm_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 4
|
10
|
-
version: 0.0.4
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.5
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Ian White
|
@@ -16,7 +11,7 @@ autorequire:
|
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
13
|
|
19
|
-
date: 2011-
|
14
|
+
date: 2011-05-09 00:00:00 +01:00
|
20
15
|
default_executable:
|
21
16
|
dependencies:
|
22
17
|
- !ruby/object:Gem::Dependency
|
@@ -27,11 +22,6 @@ dependencies:
|
|
27
22
|
requirements:
|
28
23
|
- - ">="
|
29
24
|
- !ruby/object:Gem::Version
|
30
|
-
hash: 23
|
31
|
-
segments:
|
32
|
-
- 1
|
33
|
-
- 0
|
34
|
-
- 0
|
35
25
|
version: 1.0.0
|
36
26
|
type: :development
|
37
27
|
version_requirements: *id001
|
@@ -43,11 +33,6 @@ dependencies:
|
|
43
33
|
requirements:
|
44
34
|
- - ">="
|
45
35
|
- !ruby/object:Gem::Version
|
46
|
-
hash: 21
|
47
|
-
segments:
|
48
|
-
- 1
|
49
|
-
- 2
|
50
|
-
- 5
|
51
36
|
version: 1.2.5
|
52
37
|
type: :development
|
53
38
|
version_requirements: *id002
|
@@ -59,11 +44,6 @@ dependencies:
|
|
59
44
|
requirements:
|
60
45
|
- - ">="
|
61
46
|
- !ruby/object:Gem::Version
|
62
|
-
hash: 7
|
63
|
-
segments:
|
64
|
-
- 0
|
65
|
-
- 6
|
66
|
-
- 0
|
67
47
|
version: 0.6.0
|
68
48
|
type: :development
|
69
49
|
version_requirements: *id003
|
@@ -75,11 +55,6 @@ dependencies:
|
|
75
55
|
requirements:
|
76
56
|
- - ">="
|
77
57
|
- !ruby/object:Gem::Version
|
78
|
-
hash: 49
|
79
|
-
segments:
|
80
|
-
- 0
|
81
|
-
- 8
|
82
|
-
- 7
|
83
58
|
version: 0.8.7
|
84
59
|
type: :development
|
85
60
|
version_requirements: *id004
|
@@ -91,11 +66,6 @@ dependencies:
|
|
91
66
|
requirements:
|
92
67
|
- - ">="
|
93
68
|
- !ruby/object:Gem::Version
|
94
|
-
hash: 7
|
95
|
-
segments:
|
96
|
-
- 3
|
97
|
-
- 0
|
98
|
-
- 0
|
99
69
|
version: 3.0.0
|
100
70
|
type: :development
|
101
71
|
version_requirements: *id005
|
@@ -107,109 +77,86 @@ dependencies:
|
|
107
77
|
requirements:
|
108
78
|
- - ">="
|
109
79
|
- !ruby/object:Gem::Version
|
110
|
-
hash: 62196427
|
111
|
-
segments:
|
112
|
-
- 2
|
113
|
-
- 0
|
114
|
-
- 0
|
115
|
-
- beta
|
116
|
-
- 20
|
117
80
|
version: 2.0.0.beta.20
|
118
81
|
type: :development
|
119
82
|
version_requirements: *id006
|
120
83
|
- !ruby/object:Gem::Dependency
|
121
|
-
name:
|
84
|
+
name: mongo_mapper
|
122
85
|
prerelease: false
|
123
86
|
requirement: &id007 !ruby/object:Gem::Requirement
|
124
87
|
none: false
|
125
88
|
requirements:
|
126
89
|
- - ">="
|
127
90
|
- !ruby/object:Gem::Version
|
128
|
-
|
129
|
-
segments:
|
130
|
-
- 1
|
131
|
-
- 1
|
132
|
-
- 5
|
133
|
-
version: 1.1.5
|
91
|
+
version: 0.9.0
|
134
92
|
type: :development
|
135
93
|
version_requirements: *id007
|
136
94
|
- !ruby/object:Gem::Dependency
|
137
|
-
name:
|
95
|
+
name: bson_ext
|
138
96
|
prerelease: false
|
139
97
|
requirement: &id008 !ruby/object:Gem::Requirement
|
140
98
|
none: false
|
141
99
|
requirements:
|
142
100
|
- - ">="
|
143
101
|
- !ruby/object:Gem::Version
|
144
|
-
|
145
|
-
segments:
|
146
|
-
- 2
|
147
|
-
- 4
|
148
|
-
- 0
|
149
|
-
version: 2.4.0
|
102
|
+
version: 1.3.0
|
150
103
|
type: :development
|
151
104
|
version_requirements: *id008
|
152
105
|
- !ruby/object:Gem::Dependency
|
153
|
-
name:
|
106
|
+
name: rspec
|
154
107
|
prerelease: false
|
155
108
|
requirement: &id009 !ruby/object:Gem::Requirement
|
156
109
|
none: false
|
157
110
|
requirements:
|
158
111
|
- - ">="
|
159
112
|
- !ruby/object:Gem::Version
|
160
|
-
|
161
|
-
segments:
|
162
|
-
- 1
|
163
|
-
- 3
|
164
|
-
- 2
|
165
|
-
version: 1.3.2
|
113
|
+
version: 2.4.0
|
166
114
|
type: :development
|
167
115
|
version_requirements: *id009
|
168
116
|
- !ruby/object:Gem::Dependency
|
169
|
-
name:
|
117
|
+
name: sqlite3-ruby
|
170
118
|
prerelease: false
|
171
119
|
requirement: &id010 !ruby/object:Gem::Requirement
|
172
120
|
none: false
|
173
121
|
requirements:
|
174
122
|
- - ">="
|
175
123
|
- !ruby/object:Gem::Version
|
176
|
-
|
177
|
-
segments:
|
178
|
-
- 1
|
179
|
-
- 0
|
180
|
-
version: "1.0"
|
124
|
+
version: 1.3.2
|
181
125
|
type: :development
|
182
126
|
version_requirements: *id010
|
183
127
|
- !ruby/object:Gem::Dependency
|
184
|
-
name:
|
128
|
+
name: datamapper
|
185
129
|
prerelease: false
|
186
130
|
requirement: &id011 !ruby/object:Gem::Requirement
|
187
131
|
none: false
|
188
132
|
requirements:
|
189
133
|
- - ">="
|
190
134
|
- !ruby/object:Gem::Version
|
191
|
-
hash: 15
|
192
|
-
segments:
|
193
|
-
- 1
|
194
|
-
- 0
|
195
135
|
version: "1.0"
|
196
136
|
type: :development
|
197
137
|
version_requirements: *id011
|
198
138
|
- !ruby/object:Gem::Dependency
|
199
|
-
name: dm-
|
139
|
+
name: dm-sqlite-adapter
|
200
140
|
prerelease: false
|
201
141
|
requirement: &id012 !ruby/object:Gem::Requirement
|
202
142
|
none: false
|
203
143
|
requirements:
|
204
144
|
- - ">="
|
205
145
|
- !ruby/object:Gem::Version
|
206
|
-
hash: 15
|
207
|
-
segments:
|
208
|
-
- 1
|
209
|
-
- 0
|
210
146
|
version: "1.0"
|
211
147
|
type: :development
|
212
148
|
version_requirements: *id012
|
149
|
+
- !ruby/object:Gem::Dependency
|
150
|
+
name: dm-active_model
|
151
|
+
prerelease: false
|
152
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: "1.0"
|
158
|
+
type: :development
|
159
|
+
version_requirements: *id013
|
213
160
|
description: Provides a single point of entry for using basic features of ruby ORMs
|
214
161
|
email: ian.w.white@gmail.com
|
215
162
|
executables: []
|
@@ -229,6 +176,7 @@ files:
|
|
229
176
|
- lib/orm_adapter.rb
|
230
177
|
- lib/orm_adapter/adapters/active_record.rb
|
231
178
|
- lib/orm_adapter/adapters/data_mapper.rb
|
179
|
+
- lib/orm_adapter/adapters/mongo_mapper.rb
|
232
180
|
- lib/orm_adapter/adapters/mongoid.rb
|
233
181
|
- lib/orm_adapter/base.rb
|
234
182
|
- lib/orm_adapter/to_adapter.rb
|
@@ -236,6 +184,7 @@ files:
|
|
236
184
|
- orm_adapter.gemspec
|
237
185
|
- spec/orm_adapter/adapters/active_record_spec.rb
|
238
186
|
- spec/orm_adapter/adapters/data_mapper_spec.rb
|
187
|
+
- spec/orm_adapter/adapters/mongo_mapper_spec.rb
|
239
188
|
- spec/orm_adapter/adapters/mongoid_spec.rb
|
240
189
|
- spec/orm_adapter/base_spec.rb
|
241
190
|
- spec/orm_adapter/example_app_shared.rb
|
@@ -255,31 +204,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
255
204
|
requirements:
|
256
205
|
- - ">="
|
257
206
|
- !ruby/object:Gem::Version
|
258
|
-
hash: 3
|
259
|
-
segments:
|
260
|
-
- 0
|
261
207
|
version: "0"
|
262
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
263
209
|
none: false
|
264
210
|
requirements:
|
265
211
|
- - ">="
|
266
212
|
- !ruby/object:Gem::Version
|
267
|
-
hash: 23
|
268
|
-
segments:
|
269
|
-
- 1
|
270
|
-
- 3
|
271
|
-
- 6
|
272
213
|
version: 1.3.6
|
273
214
|
requirements: []
|
274
215
|
|
275
216
|
rubyforge_project: orm_adapter
|
276
|
-
rubygems_version: 1.
|
217
|
+
rubygems_version: 1.5.1
|
277
218
|
signing_key:
|
278
219
|
specification_version: 3
|
279
220
|
summary: orm_adapter provides a single point of entry for using basic features of popular ruby ORMs. Its target audience is gem authors who want to support many ruby ORMs.
|
280
221
|
test_files:
|
281
222
|
- spec/orm_adapter/adapters/active_record_spec.rb
|
282
223
|
- spec/orm_adapter/adapters/data_mapper_spec.rb
|
224
|
+
- spec/orm_adapter/adapters/mongo_mapper_spec.rb
|
283
225
|
- spec/orm_adapter/adapters/mongoid_spec.rb
|
284
226
|
- spec/orm_adapter/base_spec.rb
|
285
227
|
- spec/orm_adapter/example_app_shared.rb
|