rest_kat 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/model.m.erb +18 -18
- data/lib/rest_kat.rb +8 -0
- data/rest_kat.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.14
|
data/lib/model.m.erb
CHANGED
@@ -153,12 +153,21 @@
|
|
153
153
|
<%end%>
|
154
154
|
|
155
155
|
// -------------------------------------------
|
156
|
-
|
156
|
+
// Register the mapper for the class
|
157
|
+
<%if klass.resource %>
|
158
|
+
[[RKObjectManager sharedManager].mappingProvider
|
159
|
+
registerMapping:mapping
|
160
|
+
withRootKeyPath:@"<%=klass.resource.item_keypath%>"];
|
161
|
+
|
162
|
+
[[RKObjectManager sharedManager].mappingProvider
|
163
|
+
setMapping:mapping
|
164
|
+
forKeyPath:@"<%=klass.resource.collection_keypath%>"];
|
165
|
+
<%else%>
|
157
166
|
[[RKObjectManager sharedManager].mappingProvider addObjectMapping:mapping];
|
158
|
-
|
159
167
|
// -------------------------------------------
|
160
168
|
// Register the serializer for the class
|
161
169
|
[[RKObjectManager sharedManager].mappingProvider setSerializationMapping:[mapping inverseMapping] forClass:[<%=klass.objc_class%> class] ];
|
170
|
+
<%end%>
|
162
171
|
}
|
163
172
|
|
164
173
|
<%if klass.resource%>
|
@@ -238,13 +247,10 @@
|
|
238
247
|
// Load collection
|
239
248
|
+ (void) loadCollectionWithDelegate:(id<RKObjectLoaderDelegate>)delegate
|
240
249
|
{
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
[objectManager loadObjectsAtResourcePath:[self resourcePath]
|
246
|
-
objectMapping:mapping
|
247
|
-
delegate:delegate];
|
250
|
+
[[RKObjectManager sharedManager]
|
251
|
+
loadObjectsAtResourcePath:[self resourcePath]
|
252
|
+
delegate:delegate];
|
253
|
+
|
248
254
|
}
|
249
255
|
|
250
256
|
|
@@ -252,19 +258,13 @@
|
|
252
258
|
+ (void) loadCollectionThroughQuery:(NSObject *)mappableQueryObject
|
253
259
|
withDelegate:(id<RKObjectLoaderDelegate>)delegate
|
254
260
|
{
|
255
|
-
|
256
|
-
RKObjectManager * objectManager = [RKObjectManager sharedManager];
|
257
|
-
RKObjectMapping * mapping = [objectManager.mappingProvider
|
258
|
-
objectMappingForClass:self ];
|
259
|
-
|
260
|
-
|
261
261
|
// Append the dictionary to the resource as query parameters
|
262
262
|
NSString * resourcePath = RKPathAppendQueryParams([self resourcePath], convertToDictionary(mappableQueryObject));
|
263
263
|
|
264
264
|
// Load the objects at the query
|
265
|
-
|
266
|
-
|
267
|
-
|
265
|
+
[[RKObjectManager sharedManager]
|
266
|
+
loadObjectsAtResourcePath:resourcePath
|
267
|
+
delegate:delegate];
|
268
268
|
}
|
269
269
|
<%end%>
|
270
270
|
|
data/lib/rest_kat.rb
CHANGED
data/rest_kat.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rest_kat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.14
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brad Phelan
|
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
requirements:
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
hash:
|
113
|
+
hash: -667916720988082051
|
114
114
|
segments:
|
115
115
|
- 0
|
116
116
|
version: "0"
|