Parsistence 0.3.11 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/Parsistence/Query.rb +2 -13
- data/lib/Parsistence/version.rb +1 -1
- metadata +2 -2
data/lib/Parsistence/Query.rb
CHANGED
|
@@ -172,8 +172,6 @@ module Parsistence
|
|
|
172
172
|
callback.call item_count
|
|
173
173
|
end
|
|
174
174
|
}
|
|
175
|
-
|
|
176
|
-
self
|
|
177
175
|
end
|
|
178
176
|
|
|
179
177
|
def fetch(&callback)
|
|
@@ -198,14 +196,9 @@ module Parsistence
|
|
|
198
196
|
|
|
199
197
|
myKlass = self.klass
|
|
200
198
|
query.findObjectsInBackgroundWithBlock (lambda { |items, error|
|
|
201
|
-
modelItems = []
|
|
202
199
|
modelItems = items.map! { |item| myKlass.new(item) } if items
|
|
203
|
-
callback.call
|
|
204
|
-
callback.call(modelItems) if callback.arity == 1
|
|
205
|
-
callback.call if callback.arity == 0
|
|
200
|
+
callback.call modelItems, error
|
|
206
201
|
})
|
|
207
|
-
|
|
208
|
-
self
|
|
209
202
|
end
|
|
210
203
|
|
|
211
204
|
# @deprecated
|
|
@@ -222,12 +215,8 @@ module Parsistence
|
|
|
222
215
|
myKlass = self.klass
|
|
223
216
|
query.getFirstObjectInBackgroundWithBlock (lambda { |item, error|
|
|
224
217
|
modelItem = myKlass.new(item) if item
|
|
225
|
-
callback.call
|
|
226
|
-
callback.call(modelItem) if callback.arity == 1
|
|
227
|
-
callback.call if callback.arity == 0
|
|
218
|
+
callback.call modelItem, error
|
|
228
219
|
})
|
|
229
|
-
|
|
230
|
-
self
|
|
231
220
|
end
|
|
232
221
|
|
|
233
222
|
# @deprecated
|
data/lib/Parsistence/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: Parsistence
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.20
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2012-12-03 00:00:00.000000000 Z
|
|
14
14
|
dependencies: []
|
|
15
15
|
description: Your models on RubyMotion and Parse in a persistence.js style pattern.
|
|
16
16
|
email:
|