bowtie 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- data/bowtie.gemspec +1 -1
- data/lib/bowtie/adapters/datamapper.rb +12 -2
- data/lib/bowtie/adapters/mongomapper.rb +16 -2
- metadata +3 -3
data/bowtie.gemspec
CHANGED
@@ -141,6 +141,16 @@ module DataMapper::Resource
|
|
141
141
|
|
142
142
|
end
|
143
143
|
|
144
|
-
Bowtie.models.
|
145
|
-
|
144
|
+
if Bowtie.models.empty? # models not loaded yet
|
145
|
+
|
146
|
+
class Class # need to figure out how to extend *only* DM models
|
147
|
+
include Bowtie::ClassMethods
|
148
|
+
end
|
149
|
+
|
150
|
+
else
|
151
|
+
|
152
|
+
Bowtie.models.each do |mod|
|
153
|
+
mod.extend Bowtie::ClassMethods
|
154
|
+
end
|
155
|
+
|
146
156
|
end
|
@@ -129,6 +129,20 @@ module MongoMapper::Document
|
|
129
129
|
|
130
130
|
end
|
131
131
|
|
132
|
-
Bowtie.models.
|
133
|
-
|
132
|
+
if Bowtie.models.empty? # models not loaded yet
|
133
|
+
|
134
|
+
module MongoMapper::Document
|
135
|
+
|
136
|
+
included do
|
137
|
+
extend Bowtie::ClassMethods
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
else
|
143
|
+
|
144
|
+
Bowtie.models.each do |mod|
|
145
|
+
mod.extend Bowtie::ClassMethods
|
146
|
+
end
|
147
|
+
|
134
148
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bowtie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 7
|
10
|
+
version: 0.5.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Tom\xC3\xA1s Pollak"
|