Commit Graph

402 Commits

Author SHA1 Message Date
Blake Watters
3dfbaf1810 Updated to support setting default value instead of nil when an attribute is missing in the payload. For Core Data backed models, we consult the entity definition to obtain the default value. closes #117 2011-06-28 15:22:04 -04:00
Blake Watters
851df3bcba Changed signature of willMapData: to allow you to completely replace the mappableData. 2011-06-28 11:46:03 -04:00
Blake Watters
0949337749 Allow modification of the data in objectLoader:willMapData: by creating a mutable copy of the parsed data if the delegate method is implemented. 2011-06-27 16:37:55 -04:00
Blake Watters
e4320f7ea9 Added error reporting when RKManagedObjectLoader fails to save the object context. This was silently masking validation failures post-mapping. 2011-06-24 15:59:40 -04:00
Blake Watters
5dff3088e2 Added trace logging for Response body 2011-06-24 10:23:54 -04:00
Blake Watters
6f0b0b38f8 Broke out logging for requests into meaningfully differentiated Debug and Trace messages. 2011-06-24 10:13:59 -04:00
Blake Watters
4773542a9e Fix breakage in Core Data 2011-06-23 09:21:54 -04:00
Blake Watters
64db97ce60 Helper methods for retrieving attribute and relationship mappings by attribute/relationship keyPath. Useful for customizing serialization mappings that were built using inverseMapping. 2011-06-22 10:43:42 -04:00
Blake Watters
8ad1a84281 Reworked object loader to check if a response is mappable even if it is an error. We had an assertion failure that could be triggered by trying to load a remote error payload in a non-mappable format (i.e. text/html). 2011-06-21 13:27:15 -04:00
Blake Watters
903ab19eae Ensure that logging is configured on first invocation of RKLogConfigureByName. This
allows you to initialize the log level before you have configured any other part of the
framework.
2011-06-21 13:26:06 -04:00
Blake Watters
1ab61ad735 Check for nil target object ID before performing deletion. Log info about the process. 2011-06-21 10:13:34 -04:00
Blake Watters
13da6aa77e Fix memory leak in the Three20 data source 2011-06-20 15:49:29 -04:00
Blake Watters
0954d4a063 Fixing more memory leaks 2011-06-20 15:03:35 -04:00
Blake Watters
99ae37037a Fixes for memory leaks with RKParams related to HTTPBodyStream causing a retain 2011-06-20 13:41:42 -04:00
Jeremy Ellison
a5cc456351 Merge branch 'restkit-sprint' of github.com:twotoasters/RestKit into restkit-sprint 2011-06-20 10:51:30 -04:00
Jeremy Ellison
de154e21b8 Fix -reset in RKManagedObjectLoader.m 2011-06-20 10:50:56 -04:00
Blake Watters
3204682f72 Added object mapping management to the mapping provider for folks who don't have keyPaths. Deprecated setMapping:forKeyPath: in favor of setObjectMapping:forKeyPath: for consistency with the other method signatures. 2011-06-20 10:49:40 -04:00
Blake Watters
2006633491 Memory and ivar cleanups for RKParams 2011-06-20 10:49:40 -04:00
Victor Kryukov
9cb4e91ec6 Fix types: _body should be NSMutableData 2011-06-20 10:49:40 -04:00
Victor Kryukov
b14578436b Fix typo in documentation string 2011-06-20 10:49:40 -04:00
Victor Kryukov
714be36907 Code cleanup: initWithDictionary is used in RKObjectLoader and should be declared 2011-06-20 10:49:39 -04:00
Victor Kryukov
00ee7e93c3 Code cleanup: **error may be null as per coding standards in 'Creating and Returning NSError Objects' (found with Analyzer) 2011-06-20 10:49:39 -04:00
Victor Kryukov
5eb654b76a Code cleanup: sent == 0 at that point (found with XCode's Analyzer) 2011-06-20 10:49:39 -04:00
Victor Kryukov
b25d1395ee Code cleanup: background policy is iOS 4.x and higher only 2011-06-20 10:49:39 -04:00
Jeremy Ellison
de684989db Fix memory leaks in -reset on RKObjectLoader and RKManagedObjectLoader. 2011-06-20 09:12:56 -04:00
Blake Watters
3bf4b7bc0f Implemented nested mapping for structures similar to the BuildBot JSON structure. fixes #112 2011-06-17 15:36:28 -04:00
Daniel Hammond
e9e4c83630 Merge branch 'restkit-sprint' of github.com:twotoasters/RestKit into restkit-sprint 2011-06-16 21:17:31 -04:00
Daniel Hammond
d9fc311433 Remove objects persisted to Core Dataduring postObject: when there is an error (Fix Issue #125) 2011-06-16 21:17:14 -04:00
Duncan Lewis
d211d3ba44 Issue #61 patched, adds escapes according to UTF8 encoding 2011-06-16 20:07:19 -04:00
Scott Penrose
87b0ea0b38 Added HTTPBody and HTTPBodyString properties to simplify specifying Request Body. Fixes #55 2011-06-16 19:32:24 -04:00
Jeremy Ellison
ae68829ec4 transform booleans to strings 2011-06-16 19:30:10 -04:00
Jeremy Ellison
9073b25988 Merge branch 'master' of github.com:twotoasters/RestKit into restkit-sprint 2011-06-16 19:06:25 -04:00
Duncan Lewis
ed9260abcd Issue #106 added requested change in RKManagedObjectStore.m 2011-06-16 18:47:42 -04:00
Duncan Lewis
61de21f0d1 Applied fix for RestKit issue #89 2011-06-16 18:29:21 -04:00
Scott Penrose
13e29a403b Merge branch 'restkit-sprint' of github.com:twotoasters/RestKit into restkit-sprint 2011-06-16 18:15:11 -04:00
Scott Penrose
ea4a930cee Add support for 409 and 410 response status codes BOOL helper methods. fixes #115 2011-06-16 18:11:43 -04:00
Jeremy Ellison
130135013c fix xml parser from overwriting dupe keys. Add a spec for this case. 2011-06-16 17:55:06 -04:00
Blake Watters
323d5e30b1 Add support for mapping from NSNumber to NSDate by coercing to a time interval since 1970. fixes #141 2011-06-16 17:33:21 -04:00
Blake Watters
1137aff165 Tweaks to comments 2011-06-16 17:15:07 -04:00
Blake Watters
3dd7361116 Pushing code up for Jeremy 2011-06-16 17:11:13 -04:00
Blake Watters
dbd752e74a Merge branch 'master' of github.com:twotoasters/RestKit 2011-06-16 17:05:44 -04:00
Blake Watters
a75ace87d0 Deprecated RKObjectManager methods that use queryParams. Added NSString category for achieving the same results without bloating the API 2011-06-16 17:04:34 -04:00
Jeremy Ellison
9b6581a258 also release the underlying NSURLConnection so we don't leak memory when resetting requests. 2011-06-16 15:19:49 -04:00
Jeremy Ellison
518f57d013 don't leak URLRequest ivar when resetting RKRequest 2011-06-16 14:43:42 -04:00
Jeremy Ellison
9388673d67 Allow RKRequests (and object loaders) to be 'reset' so that you can send them again.
Reset RKObjectLoaders before sending them in RKObjectLoaderTTModel. This fixes reloading of the model (i.e. pull to refresh).
2011-06-16 13:45:14 -04:00
Blake Watters
964ea545ae Added support for HEAD requests. closes #151 2011-06-15 16:14:00 -04:00
Blake Watters
d84088277e Expand commentary around registerMapping 2011-06-15 11:14:57 -04:00
Blake Watters
e65ea71b20 Updates to make parsedBody: implementation ready for merge. Migrated all remaining specs to RKSpec so failures don't cause crashes when you use the Hamcrest helpers. closes #153 2011-06-15 10:47:45 -04:00
Blake Watters
d5e3fc33a1 Merge branch 'master' of https://github.com/leonradley/RestKit into leonradley-master 2011-06-15 10:35:15 -04:00
Blake Watters
5f7b8559cd Only build a serialization if we are a POST or a PUT 2011-06-15 10:29:11 -04:00