active_mongoid 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/Appraisals +4 -0
- data/README.md +23 -6
- data/active_mongoid.gemspec +0 -1
- data/gemfiles/mongoid_4.0.gemfile +7 -0
- data/lib/active_mongoid.rb +5 -1
- data/lib/active_mongoid/bson_id.rb +15 -1
- data/lib/active_mongoid/finder_proxy.rb +13 -2
- data/lib/active_mongoid/finders.rb +13 -2
- data/lib/active_mongoid/version.rb +1 -1
- data/spec/lib/finders_spec.rb +163 -54
- data/spec/spec_helper.rb +16 -3
- data/spec/support/models/active_record/play.rb +11 -0
- metadata +6 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5bd42e8cd2f6ff10aa998ed7e3dd94a92829c6f
|
4
|
+
data.tar.gz: 4bb0e5b3309514f69bee4cf5620922154cb66159
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 165efcb720f10b7a646e863a074038546287bfaa410aa662b72b62f9b8256055d76ba13dbe58eb728df5afcd8a12ec912ad6374a0019ebeb6ae4c50feba0876d
|
7
|
+
data.tar.gz: 440c44e214a16195df803a1ce72da3ba87bb1d748eb4c726d643746fc276fdc4e98e61fcc09d71985cc2fbb6138c58099e829d57703b39836850c1780820453d
|
data/.travis.yml
CHANGED
data/Appraisals
CHANGED
data/README.md
CHANGED
@@ -159,6 +159,25 @@ end
|
|
159
159
|
=> BSON::ObjectId('545289a7b736b6586a000002')
|
160
160
|
```
|
161
161
|
|
162
|
+
```ruby
|
163
|
+
class Play < ActiveRecord::Base
|
164
|
+
include ActiveMongoid::Associations
|
165
|
+
include ActiveMongoid::Finders
|
166
|
+
include ActiveMongoid::BsonId
|
167
|
+
|
168
|
+
bsonify_attr :id, initialize: true, primary: true
|
169
|
+
end
|
170
|
+
```
|
171
|
+
|
172
|
+
```ruby
|
173
|
+
> play.id
|
174
|
+
=> '545289a7b736b6586a000001' # An issue with ActiveRecord does not allow casting this particular accessor
|
175
|
+
> play.id = BSON::ObjectId('545289a7b736b6586a000002')
|
176
|
+
=> BSON::ObjectId('545289a7b736b6586a000002')
|
177
|
+
> play._id = '545289a7b736b6586a000002'
|
178
|
+
=> BSON::ObjectId('545289a7b736b6586a000002')
|
179
|
+
```
|
180
|
+
|
162
181
|
### ActiveMongoid::Finders
|
163
182
|
|
164
183
|
This module proxies the existing ActiveRecord `find` and `where` to perform casting of `BSON::ObjectId`'s to string for queries. Additionally it'll default to the `_id` field if the object is a valid `BSON::ObjectId` and the `_id` field is present on the model.
|
@@ -173,17 +192,15 @@ end
|
|
173
192
|
|
174
193
|
```ruby
|
175
194
|
> Division.find(1)
|
176
|
-
=> #<
|
195
|
+
=> #<Division id: 1, _id: "545289a7b736b6586a000001", name: "new">
|
177
196
|
> Division.find(BSON::ObjectId('545289a7b736b6586a000001')
|
178
|
-
=> #<
|
197
|
+
=> #<Division id: 1, _id: "545289a7b736b6586a000001", name: "new">
|
179
198
|
> Division.where(_id: BSON::ObjectId('545289a7b736b6586a000001')
|
180
|
-
=> [#<
|
199
|
+
=> [#<Division id: 1, _id: "545289a7b736b6586a000001", name: "new">]
|
181
200
|
> Division.where(id: BSON::ObjectId('545289a7b736b6586a000001')
|
182
|
-
=> [#<
|
201
|
+
=> [#<Division id: 1, _id: "545289a7b736b6586a000001", name: "new">]
|
183
202
|
```
|
184
203
|
|
185
|
-
|
186
|
-
|
187
204
|
## Contributing
|
188
205
|
|
189
206
|
1. Fork it ( https://github.com/[my-github-username]/active_mongoid/fork )
|
data/active_mongoid.gemspec
CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency "activesupport", "> 3.2.0"
|
22
22
|
spec.add_dependency "activerecord", "> 3.2.0"
|
23
|
-
spec.add_dependency "mongo", "> 1.5.0"
|
24
23
|
spec.add_dependency "bson_ext", "> 1.5.0"
|
25
24
|
spec.add_dependency "mongoid", "> 2.8.0"
|
26
25
|
spec.add_dependency "after_do", "~> 0.3.0"
|
data/lib/active_mongoid.rb
CHANGED
@@ -4,5 +4,9 @@ require "active_mongoid/finder_proxy"
|
|
4
4
|
require "active_mongoid/finders"
|
5
5
|
|
6
6
|
module ActiveMongoid
|
7
|
-
|
7
|
+
if ::Gem::Version.new(Mongoid::VERSION).between?(::Gem::Version.new("3.0.0"), ::Gem::Version.new("4.0.0"))
|
8
|
+
BSON = ::Moped::BSON
|
9
|
+
else
|
10
|
+
BSON = ::BSON
|
11
|
+
end
|
8
12
|
end
|
@@ -2,12 +2,26 @@ module ActiveMongoid
|
|
2
2
|
module BsonId
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
+
included do
|
6
|
+
class_attribute :bson_attrs
|
7
|
+
class_attribute :primary_bson_key
|
8
|
+
self.bson_attrs = []
|
9
|
+
end
|
10
|
+
|
5
11
|
module ClassMethods
|
6
12
|
|
7
13
|
def bsonify_attr(name, options = {})
|
8
14
|
bson_attr_setter(name)
|
9
|
-
bson_attr_getter(name)
|
15
|
+
bson_attr_getter(name) unless options[:primary]
|
16
|
+
bson_attrs << name
|
10
17
|
bson_attr_init(name) if options[:initialize]
|
18
|
+
set_ar_primary_bson_id(name) if options[:primary]
|
19
|
+
end
|
20
|
+
|
21
|
+
def set_ar_primary_bson_id(name)
|
22
|
+
self.primary_key = name
|
23
|
+
self.primary_bson_key = name
|
24
|
+
alias_attribute "_#{name}".to_sym, name
|
11
25
|
end
|
12
26
|
|
13
27
|
private
|
@@ -16,7 +16,7 @@ module ActiveMongoid
|
|
16
16
|
def find(*args)
|
17
17
|
key = args.flatten.first
|
18
18
|
if !key.is_a?(Fixnum) && (key.is_a?(::ActiveMongoid::BSON::ObjectId) || ::ActiveMongoid::BSON::ObjectId.legal?(key))
|
19
|
-
where({
|
19
|
+
where({__am_primary_key => key.to_s}).first.tap do |obj|
|
20
20
|
raise ActiveRecord::RecordNotFound unless obj
|
21
21
|
end
|
22
22
|
else
|
@@ -28,9 +28,12 @@ module ActiveMongoid
|
|
28
28
|
if opts && opts.is_a?(Hash)
|
29
29
|
bson_opts = opts.select{|k,v| v.is_a?(::ActiveMongoid::BSON::ObjectId)}
|
30
30
|
|
31
|
-
if bson_opts[:id]
|
31
|
+
if bson_opts[:id] && __am_primary_key != :id
|
32
32
|
opts.delete(:id)
|
33
33
|
bson_opts[:_id] = bson_opts.delete(:id)
|
34
|
+
elsif bson_opts[:_id] && __am_primary_key == :id
|
35
|
+
opts.delete(:_id)
|
36
|
+
bson_opts[:id] = bson_opts.delete(:_id)
|
34
37
|
end
|
35
38
|
|
36
39
|
bson_opts.each do |k,v|
|
@@ -51,5 +54,13 @@ module ActiveMongoid
|
|
51
54
|
end
|
52
55
|
end
|
53
56
|
|
57
|
+
def __am_primary_key
|
58
|
+
if __target_class.respond_to?(:__am_primary_key) && __target_class.__am_primary_key
|
59
|
+
__target_class.__am_primary_key
|
60
|
+
else
|
61
|
+
:_id
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
54
65
|
end
|
55
66
|
end
|
@@ -7,7 +7,7 @@ module ActiveMongoid
|
|
7
7
|
def find(*args)
|
8
8
|
key = args.flatten.first
|
9
9
|
if !key.is_a?(Fixnum) && (key.is_a?(::ActiveMongoid::BSON::ObjectId) || ::ActiveMongoid::BSON::ObjectId.legal?(key))
|
10
|
-
where({
|
10
|
+
where({__am_primary_key => key.to_s}).first.tap do |obj|
|
11
11
|
raise ActiveRecord::RecordNotFound unless obj
|
12
12
|
end
|
13
13
|
else
|
@@ -19,9 +19,12 @@ module ActiveMongoid
|
|
19
19
|
if opts && opts.respond_to?(:select)
|
20
20
|
bson_opts = opts.select{|k,v| v.is_a?(::ActiveMongoid::BSON::ObjectId)}
|
21
21
|
|
22
|
-
if bson_opts[:id]
|
22
|
+
if bson_opts[:id] && __am_primary_key != :id
|
23
23
|
opts.delete(:id)
|
24
24
|
bson_opts[:_id] = bson_opts.delete(:id)
|
25
|
+
elsif bson_opts[:_id] && __am_primary_key == :id
|
26
|
+
opts.delete(:_id)
|
27
|
+
bson_opts[:id] = bson_opts.delete(:_id)
|
25
28
|
end
|
26
29
|
|
27
30
|
bson_opts.each do |k,v|
|
@@ -55,6 +58,14 @@ module ActiveMongoid
|
|
55
58
|
)
|
56
59
|
end
|
57
60
|
|
61
|
+
def __am_primary_key
|
62
|
+
if self.respond_to?(:primary_bson_key) && self.primary_bson_key
|
63
|
+
self.primary_bson_key
|
64
|
+
else
|
65
|
+
:_id
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
58
69
|
end
|
59
70
|
end
|
60
71
|
end
|
data/spec/lib/finders_spec.rb
CHANGED
@@ -1,103 +1,212 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe ActiveMongoid::Finders do
|
4
|
-
let(:klass) { Division }
|
5
|
-
let(:division) { klass.create(name: 'foo') }
|
6
4
|
|
7
5
|
describe ".find" do
|
8
6
|
|
9
|
-
describe "when not
|
7
|
+
describe "when primary id is not bson_attr" do
|
8
|
+
let(:klass) { Division }
|
9
|
+
let(:subject) { klass.create(name: 'foo') }
|
10
10
|
|
11
|
-
|
12
|
-
expect(klass.find(division.id)).to eq(division)
|
13
|
-
end
|
11
|
+
describe "when not scoped" do
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
it "returns object when request with object fixnum id" do
|
14
|
+
expect(klass.find(subject.id)).to eq(subject)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "returns object when request with object bson id" do
|
18
|
+
expect(klass.find(subject._id)).to eq(subject)
|
19
|
+
end
|
20
|
+
|
21
|
+
it "raises NotFound exception when request with fixnum id" do
|
22
|
+
expect{klass.find(-1)}.to raise_error(ActiveRecord::RecordNotFound)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "raises NotFound exception when request with bson id" do
|
26
|
+
expect{klass.find(::ActiveMongoid::BSON::ObjectId.new)}.to raise_error(ActiveRecord::RecordNotFound)
|
27
|
+
end
|
18
28
|
|
19
|
-
it "raises NotFound exception when request with fixnum id" do
|
20
|
-
expect{klass.find(-1)}.to raise_error(ActiveRecord::RecordNotFound)
|
21
29
|
end
|
22
30
|
|
23
|
-
|
24
|
-
|
31
|
+
describe "when scoped" do
|
32
|
+
|
33
|
+
let(:scoped_klass) { klass.by_name(subject.name) }
|
34
|
+
|
35
|
+
it "returns object when request with object fixnum id" do
|
36
|
+
expect(scoped_klass.find(subject.id)).to eq(subject)
|
37
|
+
end
|
38
|
+
|
39
|
+
it "returns object when request with object bson id" do
|
40
|
+
expect(scoped_klass.find(subject._id)).to eq(subject)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "raises NotFound exception when request with fixnum id" do
|
44
|
+
expect{scoped_klass.find(-1)}.to raise_error(ActiveRecord::RecordNotFound)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "raises NotFound exception when request with bson id" do
|
48
|
+
expect{scoped_klass.find(::ActiveMongoid::BSON::ObjectId.new)}.to raise_error(ActiveRecord::RecordNotFound)
|
49
|
+
end
|
50
|
+
|
25
51
|
end
|
26
52
|
|
27
53
|
end
|
28
54
|
|
29
|
-
describe "when
|
55
|
+
describe "when primary id is bson_attr" do
|
56
|
+
let(:klass) { Play }
|
57
|
+
let(:subject) { klass.create(name: 'foo') }
|
30
58
|
|
31
|
-
|
59
|
+
describe "when not scoped" do
|
32
60
|
|
33
|
-
|
34
|
-
|
35
|
-
|
61
|
+
it "returns object when request with object fixnum id" do
|
62
|
+
expect(klass.find(subject.id)).to eq(subject)
|
63
|
+
end
|
36
64
|
|
37
|
-
|
38
|
-
|
39
|
-
|
65
|
+
it "returns object when request with object bson id" do
|
66
|
+
expect(klass.find(subject._id)).to eq(subject)
|
67
|
+
end
|
68
|
+
|
69
|
+
it "raises NotFound exception when request with fixnum id" do
|
70
|
+
expect{klass.find(-1)}.to raise_error(ActiveRecord::RecordNotFound)
|
71
|
+
end
|
72
|
+
|
73
|
+
it "raises NotFound exception when request with bson id" do
|
74
|
+
expect{klass.find(::ActiveMongoid::BSON::ObjectId.new)}.to raise_error(ActiveRecord::RecordNotFound)
|
75
|
+
end
|
40
76
|
|
41
|
-
it "raises NotFound exception when request with fixnum id" do
|
42
|
-
expect{scoped_klass.find(-1)}.to raise_error(ActiveRecord::RecordNotFound)
|
43
77
|
end
|
44
78
|
|
45
|
-
|
46
|
-
|
79
|
+
describe "when scoped" do
|
80
|
+
|
81
|
+
let(:scoped_klass) { klass.by_name(subject.name) }
|
82
|
+
|
83
|
+
it "returns object when request with object fixnum id" do
|
84
|
+
expect(scoped_klass.find(subject.id)).to eq(subject)
|
85
|
+
end
|
86
|
+
|
87
|
+
it "returns object when request with object bson id" do
|
88
|
+
expect(scoped_klass.find(subject._id)).to eq(subject)
|
89
|
+
end
|
90
|
+
|
91
|
+
it "raises NotFound exception when request with fixnum id" do
|
92
|
+
expect{scoped_klass.find(-1)}.to raise_error(ActiveRecord::RecordNotFound)
|
93
|
+
end
|
94
|
+
|
95
|
+
it "raises NotFound exception when request with bson id" do
|
96
|
+
expect{scoped_klass.find(::ActiveMongoid::BSON::ObjectId.new)}.to raise_error(ActiveRecord::RecordNotFound)
|
97
|
+
end
|
98
|
+
|
47
99
|
end
|
48
100
|
|
49
101
|
end
|
50
102
|
|
51
|
-
|
103
|
+
end
|
52
104
|
|
53
105
|
describe ".where" do
|
54
106
|
|
55
|
-
|
107
|
+
describe "when primary_key is not bson_attr" do
|
108
|
+
let(:klass) { Division }
|
109
|
+
let(:subject) { klass.create(name: 'foo') }
|
110
|
+
let(:bson_id) { ::ActiveMongoid::BSON::ObjectId.new }
|
56
111
|
|
57
|
-
|
58
|
-
|
59
|
-
|
112
|
+
before do
|
113
|
+
subject.update_attributes(sport_id: bson_id)
|
114
|
+
end
|
60
115
|
|
61
|
-
|
116
|
+
describe "when not scoped" do
|
62
117
|
|
63
|
-
|
64
|
-
|
65
|
-
|
118
|
+
it "returns relation by bson_id" do
|
119
|
+
expect(klass.where(sport_id: bson_id)).to eq([subject])
|
120
|
+
end
|
66
121
|
|
67
|
-
|
68
|
-
|
69
|
-
|
122
|
+
it "returns relation by bson_id string" do
|
123
|
+
expect(klass.where(sport_id: bson_id.to_s)).to eq([subject])
|
124
|
+
end
|
70
125
|
|
71
|
-
|
72
|
-
|
73
|
-
|
126
|
+
it "return relation by primary key" do
|
127
|
+
expect(klass.where(id: subject.id)).to eq([subject])
|
128
|
+
end
|
129
|
+
|
130
|
+
it "return relation by bson primary key" do
|
131
|
+
expect(klass.where(id: subject._id)).to eq([subject])
|
132
|
+
end
|
74
133
|
|
75
|
-
it "return relation by bson primary key" do
|
76
|
-
expect(klass.where(id: division._id)).to eq([division])
|
77
134
|
end
|
78
135
|
|
79
|
-
|
136
|
+
describe "when scoped" do
|
80
137
|
|
81
|
-
|
138
|
+
let(:scoped_klass) { klass.by_name(subject.name) }
|
82
139
|
|
83
|
-
|
140
|
+
it "returns relation by bson_id" do
|
141
|
+
expect(scoped_klass.where(sport_id: bson_id)).to eq([subject])
|
142
|
+
end
|
84
143
|
|
85
|
-
|
86
|
-
|
87
|
-
|
144
|
+
it "returns relation by bson_id string" do
|
145
|
+
expect(scoped_klass.where(sport_id: bson_id.to_s)).to eq([subject])
|
146
|
+
end
|
147
|
+
|
148
|
+
it "return relation by primary key" do
|
149
|
+
expect(scoped_klass.where(id: subject.id)).to eq([subject])
|
150
|
+
end
|
151
|
+
|
152
|
+
it "return relation by bson primary key" do
|
153
|
+
expect(scoped_klass.where(id: subject._id)).to eq([subject])
|
154
|
+
end
|
88
155
|
|
89
|
-
it "returns relation by bson_id string" do
|
90
|
-
expect(scoped_klass.where(sport_id: bson_id.to_s)).to eq([division])
|
91
156
|
end
|
92
157
|
|
93
|
-
|
94
|
-
|
158
|
+
end
|
159
|
+
|
160
|
+
describe "when primary_key is not bson_attr" do
|
161
|
+
let(:klass) { Play }
|
162
|
+
let(:subject) { klass.create(name: 'foo') }
|
163
|
+
let(:bson_id) { ::ActiveMongoid::BSON::ObjectId.new }
|
164
|
+
|
165
|
+
before do
|
166
|
+
subject.update_attributes(sport_id: bson_id)
|
95
167
|
end
|
96
168
|
|
97
|
-
|
98
|
-
|
169
|
+
describe "when not scoped" do
|
170
|
+
|
171
|
+
it "returns relation by bson_id" do
|
172
|
+
expect(klass.where(sport_id: bson_id)).to eq([subject])
|
173
|
+
end
|
174
|
+
|
175
|
+
it "returns relation by bson_id string" do
|
176
|
+
expect(klass.where(sport_id: bson_id.to_s)).to eq([subject])
|
177
|
+
end
|
178
|
+
|
179
|
+
it "return relation by primary key" do
|
180
|
+
expect(klass.where(id: subject.id)).to eq([subject])
|
181
|
+
end
|
182
|
+
|
183
|
+
it "return relation by bson primary key" do
|
184
|
+
expect(klass.where(id: subject._id)).to eq([subject])
|
185
|
+
end
|
186
|
+
|
99
187
|
end
|
100
188
|
|
189
|
+
describe "when scoped" do
|
190
|
+
|
191
|
+
let(:scoped_klass) { klass.by_name(subject.name) }
|
192
|
+
|
193
|
+
it "returns relation by bson_id" do
|
194
|
+
expect(scoped_klass.where(sport_id: bson_id)).to eq([subject])
|
195
|
+
end
|
196
|
+
|
197
|
+
it "returns relation by bson_id string" do
|
198
|
+
expect(scoped_klass.where(sport_id: bson_id.to_s)).to eq([subject])
|
199
|
+
end
|
200
|
+
|
201
|
+
it "return relation by primary key" do
|
202
|
+
expect(scoped_klass.where(id: subject.id)).to eq([subject])
|
203
|
+
end
|
204
|
+
|
205
|
+
it "return relation by bson primary key" do
|
206
|
+
expect(scoped_klass.where(id: subject._id)).to eq([subject])
|
207
|
+
end
|
208
|
+
|
209
|
+
end
|
101
210
|
end
|
102
211
|
|
103
212
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -26,13 +26,20 @@ require 'pry'
|
|
26
26
|
require 'rspec'
|
27
27
|
|
28
28
|
Mongoid.configure do |config|
|
29
|
-
|
30
|
-
|
29
|
+
version = ::Gem::Version.new(Mongoid::VERSION)
|
30
|
+
if version >= ::Gem::Version.new("3.0.0")
|
31
|
+
config.sessions = {
|
32
|
+
default: {
|
33
|
+
database: 'active_mongoid_test',
|
34
|
+
hosts: [ (ENV['MONGO_HOST'] || 'localhost')+':27017' ],
|
35
|
+
options: { read: :primary }
|
36
|
+
}
|
37
|
+
}
|
31
38
|
else
|
32
39
|
config.master = Mongo::Connection.new.db('active_mongoid_test')
|
33
40
|
config.allow_dynamic_fields = false
|
34
41
|
end
|
35
|
-
config.identity_map_enabled = false
|
42
|
+
config.identity_map_enabled = false if config.respond_to?(:identity_map_enabled)
|
36
43
|
end
|
37
44
|
|
38
45
|
RSpec.configure do |config|
|
@@ -84,6 +91,12 @@ ActiveRecord::Schema.define do
|
|
84
91
|
t.string :target_id
|
85
92
|
t.string :target_type
|
86
93
|
end
|
94
|
+
|
95
|
+
create_table :plays, :force => true, :id => false do |t|
|
96
|
+
t.string :id
|
97
|
+
t.string :name
|
98
|
+
t.string :sport_id
|
99
|
+
end
|
87
100
|
end
|
88
101
|
|
89
102
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Play < ActiveRecord::Base
|
2
|
+
include ActiveMongoid::Associations
|
3
|
+
include ActiveMongoid::Finders
|
4
|
+
include ActiveMongoid::BsonId
|
5
|
+
|
6
|
+
scope :by_name, ->(n){ where(name: n) }
|
7
|
+
scope :sport_id, ->(id){ where(sport_id: id) }
|
8
|
+
|
9
|
+
bsonify_attr :id, initialize: true, primary: true
|
10
|
+
bsonify_attr :sport_id
|
11
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryce Schmidt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.2.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: mongo
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.5.0
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.5.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: bson_ext
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -228,6 +214,7 @@ files:
|
|
228
214
|
- active_mongoid.gemspec
|
229
215
|
- gemfiles/mongoid_2.8.gemfile
|
230
216
|
- gemfiles/mongoid_3.1.gemfile
|
217
|
+
- gemfiles/mongoid_4.0.gemfile
|
231
218
|
- lib/active_mongoid.rb
|
232
219
|
- lib/active_mongoid/associations.rb
|
233
220
|
- lib/active_mongoid/associations/binding.rb
|
@@ -297,6 +284,7 @@ files:
|
|
297
284
|
- spec/support/models/active_record/address.rb
|
298
285
|
- spec/support/models/active_record/division.rb
|
299
286
|
- spec/support/models/active_record/division_setting.rb
|
287
|
+
- spec/support/models/active_record/play.rb
|
300
288
|
- spec/support/models/active_record/player.rb
|
301
289
|
- spec/support/models/mongoid/league.rb
|
302
290
|
- spec/support/models/mongoid/person.rb
|
@@ -324,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
312
|
version: '0'
|
325
313
|
requirements: []
|
326
314
|
rubyforge_project:
|
327
|
-
rubygems_version: 2.
|
315
|
+
rubygems_version: 2.4.5
|
328
316
|
signing_key:
|
329
317
|
specification_version: 4
|
330
318
|
summary: ActiveMongoid provides a relational interface between ActiveRecord and Mongoid
|
@@ -359,6 +347,7 @@ test_files:
|
|
359
347
|
- spec/support/models/active_record/address.rb
|
360
348
|
- spec/support/models/active_record/division.rb
|
361
349
|
- spec/support/models/active_record/division_setting.rb
|
350
|
+
- spec/support/models/active_record/play.rb
|
362
351
|
- spec/support/models/active_record/player.rb
|
363
352
|
- spec/support/models/mongoid/league.rb
|
364
353
|
- spec/support/models/mongoid/person.rb
|