rest_kat 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/rest_kat.gemspec +2 -2
- data/src/MSRestSerializable.h +3 -0
- data/src/MSRestSerializable.m +8 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/rest_kat.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rest_kat}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Brad Phelan}]
|
12
|
-
s.date = %q{2011-11-
|
12
|
+
s.date = %q{2011-11-24}
|
13
13
|
s.description = %q{The generated source code is a layer on top of the iOS REST framework http://restkit.org/}
|
14
14
|
s.email = %q{brad.phelan@mysugr.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/src/MSRestSerializable.h
CHANGED
@@ -65,6 +65,9 @@
|
|
65
65
|
// save the object
|
66
66
|
-(void) saveWithDelegate:(id<RKObjectLoaderDelegate>)delegate;
|
67
67
|
|
68
|
+
//delete the object
|
69
|
+
- (void)deleteWithDelegate:(id<RKObjectLoaderDelegate>)delegate;
|
70
|
+
|
68
71
|
// Find an instance by id
|
69
72
|
+ (void) find:(NSNumber *)id
|
70
73
|
withDelegate:(id<RKObjectLoaderDelegate>)delegate;
|
data/src/MSRestSerializable.m
CHANGED
@@ -155,15 +155,22 @@
|
|
155
155
|
{
|
156
156
|
if ([self isNew])
|
157
157
|
{
|
158
|
+
NSAssert(self.canCreate, @"Object must allow create to be created");
|
158
159
|
NSLog(@"Creating new object\n%@", self);
|
159
160
|
// Save a new object
|
160
161
|
[[RKObjectManager sharedManager] postObject:self mapResponseWith:[self _mapper] delegate:delegate];
|
161
162
|
}else{
|
163
|
+
NSAssert(self.canUpdate, @"Object must allow update to be updated");
|
162
164
|
NSLog(@"Updating object\n%@", self);
|
163
165
|
// Update the object as it allready has an id
|
164
166
|
[[RKObjectManager sharedManager] putObject:self mapResponseWith:[self _mapper] delegate:delegate];
|
165
167
|
}
|
166
|
-
|
168
|
+
}
|
169
|
+
|
170
|
+
- (void)deleteWithDelegate:(id<RKObjectLoaderDelegate>)delegate
|
171
|
+
{
|
172
|
+
NSAssert(self.canDelete, @"Object must allow delete to be deleted");
|
173
|
+
[[RKObjectManager sharedManager] deleteObject:self withDelegate:delegate];
|
167
174
|
}
|
168
175
|
|
169
176
|
// Find an instance by id
|
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.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brad Phelan
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-11-
|
13
|
+
date: 2011-11-24 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: kwalify
|
@@ -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: -2260295425497078183
|
114
114
|
segments:
|
115
115
|
- 0
|
116
116
|
version: "0"
|