Commit Graph

533 Commits

Author SHA1 Message Date
Blake Watters
939f45bf64 Add note about escaping path patterns to the main RKObjectManager.h header docs. refs #1091 2012-12-19 15:51:38 -05:00
Blake Watters
477d04b9a9 Add support for logging the elapsed time. Guard against attempts to log non-HTTP request operations. 2012-12-19 13:35:28 -05:00
Blake Watters
862e84a515 Hook the RKManagedObjectMappingOperationDataSource into the Managed Object Context save lifecycle to avoid the creation of duplicate objects during sequential mapping operations 2012-12-18 22:00:44 -05:00
Blake Watters
9f228e0280 Expand test coverage on managed object deletion cases and fix bugs. closes #358 2012-12-16 20:45:01 -05:00
Blake Watters
b6a94de68a Remove extraneous assert on deletion case 2012-12-16 13:02:18 -05:00
Blake Watters
c75a05a754 Fix usage of subscript access in RKHTTPRequestOperation.m refs #1077 2012-12-14 07:55:06 -05:00
Blake Watters
a424908242 Expand test coverage and fix all known issues with managed object refetching and deletion. closes #1066 2012-12-13 22:42:34 -05:00
Blake Watters
406504ff2e Skip orphaned object deletion if the 304 optimization is in effect. Update log messages during orphaned object cleanup 2012-12-13 19:00:01 -05:00
Blake Watters
a9a1c3dc48 Don't crash when encountering nil in the mapping results dictionary 2012-12-13 18:12:50 -05:00
Blake Watters
abd07043f3 Output a string representation of the HTTP status code in the HTTP operation log. Add RKStringFromStatusCode convenience method to the HTTP utilities 2012-12-13 17:52:51 -05:00
Blake Watters
280fd5d571 Fix crashes during refetch if objects were deleted. Expand managed object deletion support to handle nested objects. refs #1066 2012-12-13 17:35:39 -05:00
Blake Watters
a471bdd8a3 Add support for refetching NSManagedObject instances mapped at any point in the object graph. refs #1066 2012-12-12 20:47:14 -05:00
Blake Watters
69c65ef8ab Override error implementation to correct the NSLocalizedDescription key for RKHTTPRequestOperation objects. fixes #1070 2012-12-11 23:12:20 -05:00
Blake Watters
ae6b58d7bc Add support for parameterizing NSSet. refs #1010 2012-12-11 21:31:40 -05:00
Blake Watters
b9457ce65c Remove RKObjectManager specific value for the 'Accept' header and configure the header directly on the HTTP client instead. Register the AFJSONRequestOperation class in managerWithBaseURL:. Update documentation. 2012-12-11 21:24:22 -05:00
Blake Watters
f51a711a15 Add test coverage and bug fix for mapping error while processing an error response with RKObjectResponseMapperOperation. closes #1064 2012-12-11 09:00:57 -05:00
Blake Watters
5efcfe2c41 Eliminate remaining use of keyed subscript access 2012-12-10 17:12:53 -05:00
Blake Watters
3b5fe29e8b Fix incorrect consultation of containsEntityMapping rather than isManagedObjectRequestOperation 2012-12-09 23:55:40 -05:00
Blake Watters
1c86cfab75 Improve RKManagedObjectRequestOperation handling for DELETE requests and expand test coverage
* Failure to match a response descriptor no longer fails DELETE requests
2012-12-09 23:24:45 -05:00
Blake Watters
38480b269c Rev docs referencing primaryKey as opposed to identificationAttributes 2012-12-08 11:41:48 -05:00
Blake Watters
c06a1a314d Add documentation notes about the importance of coercing your values from the path matcher 2012-12-08 00:44:28 -05:00
Blake Watters
3d6c211417 Add documentation notes about how easy it is to fuck things up with relative paths 2012-12-08 00:34:15 -05:00
Blake Watters
d79dec118a Greatly improve error output when all response descriptors fail to match. closes #1060 2012-12-07 17:39:02 -05:00
Blake Watters
0eb875679d Add proxy attributes enabling pagination mapping configuration under iOS 5. Expand documentation. closes #1040 2012-12-07 14:16:50 -05:00
Blake Watters
b1f57612e1 Add support for replacing the HTTP client on the object manager and mutating the baseURL on the router. closes #1051 2012-12-07 13:49:18 -05:00
Blake Watters
997158e9e6 Fix issues with incorrect determination of the appropriate object request operation. fixes #1054, #1056
* Expands test coverage for the `appropriateObjectRequestOperationWithObject:method:path:parameters:`
* Uses an object graph visitor to completely navigate the mapping graph, ensuring that an `RKEntityMapping` appearing at any nesting level will be correctly handled
2012-12-07 12:40:02 -05:00
Sam Krishna
0210424c6c Added proper support for RKDynamicMapping as a container for RKEntityMappings inside of RKObjectManager. 2012-12-07 11:41:33 -05:00
Blake Watters
ff1de2b740 Fix incorrect header comment in documentation of RKRequestDescriptor. fixes #1048 2012-12-02 00:28:19 -05:00
Blake Watters
89d0294dcd Expose access to the RKMapperOperationDelegate to RKObjectRequestOperation subclasses. closes #1009 2012-11-29 23:35:45 -05:00
Blake Watters
4eb765aad8 Switch to %ld and cast counts to long to suppress warnings on OS X 2012-11-29 00:21:56 -05:00
Blake Watters
8dc54a89b2 Major overhaul to the Core Data managed object identification and relationship connection support.
* Replaces primary key with `RKEntityIdentifier`
* Add support for use of compound keys for object identification
* Refactor `RKConnectionMapping` to `RKConnectionDescription` and add support for connecting with multiple attributes
* Clarify naming of representation key methods to better match naming conventions
* Add type transformation support for object identification
* Greatly expand test coverage for object identification
* Drop the `NSEntityDescription` category
* Simplify the `RKManagedObjectCaching` protocol
* Add compound key support to the Fetch Request and In Memory Cache implementations
* Replace Kiwi with Specta for tests where contexts are helpful for organization
* Rename `defaultValueForMissingAttribute` to `defaultValueForAttribute`
2012-11-27 10:29:36 -05:00
Blake Watters
0aeb5f6de4 Restore paginator integration in Object Manager 2012-11-19 12:01:07 -05:00
Blake Watters
9d14bfe395 Rev docs for willMapDeserializedResponseBlock. refs #900 2012-11-18 22:54:05 -05:00
Blake Watters
61f0817776 Update docs regarding error behavior in the event nil is returned by the willMapDeserializedResponse block. closes #900 2012-11-18 22:50:56 -05:00
Blake Watters
54dce20ac6 Rework paginator support for 0.20. closes #1024, #900, #759
* Renamed RKObjectPaginator to RKPaginator for simplicity
* Removed delegate on paginator in favor of simple success/failure blocks
* Added `willMapDeserializedResponseBlock` for manipulating the response body before mapping begins
* Added support for cancelling an in-progress pagination request
2012-11-18 22:44:33 -05:00
Blake Watters
e088bdc186 When managedObjectContext is set to nil on RKManagedObjectRequestOperation, avoid creation of an orphaned privateContext 2012-11-09 11:05:26 -05:00
Blake Watters
c5cdff950f Add NSParameterAssert guards for getObject:, postObject:, putObject:, patchObject:, and deleteObject: 2012-11-09 10:53:49 -05:00
Blake Watters
e109036683 Add support and test coverage for serializing Boolean properties to JSON as true/false instead of numbers. closes #920, #827 2012-11-08 23:41:19 -05:00
Blake Watters
b723788fce Style touch-up 2012-11-08 19:31:38 -05:00
Jeff Arena
129cc6f052 Fix issue with cross-context object comparison in case of local deletes. 2012-11-08 14:24:24 -05:00
Jeff Arena
9d40138129 Change the default value for deletesOrphanedObjects to YES in RKManagedObjectRequestOperation 2012-11-08 13:58:10 -05:00
Blake Watters
e85cf659c0 Improve Request Descriptor registration and lookup behaviors:
* Add assertion to object manager when you attempt to register an overlapping request descriptor
* Improve search algorithm to handle subclass matches
2012-11-05 23:10:57 -05:00
Blake Watters
28c8262b0d Port commented out unit tests from 0.10.x to latest development sources to nail down issues with targetObject behaviors 2012-11-05 18:38:24 -05:00
Blake Watters
e7505df56c Fix retain cycles detected by Xcode 4.6 static analyzer 2012-11-05 18:38:23 -05:00
Jeff Arena
2612604df3 Fix accept header issue with multipart requests. 2012-11-03 11:37:54 -04:00
Blake Watters
94318d1cb2 Add support for returning fetched objects when a 304 'Not Modified' response is loaded. closes #1006 2012-10-28 21:44:42 -04:00
Blake Watters
5cab23b3af Fix autoreleasepool error under iOS 5.x. fixes #1008 2012-10-28 20:32:10 -04:00
Blake Watters
de016e22f3 Refetch the mapping results from the original managed object context before returning to the caller. fixes #1011
Eliminate the thread safe invocation class.
2012-10-28 20:22:53 -04:00
Blake Watters
337d078942 nil out the mapping result in the event we have encountered an error 2012-10-28 19:39:14 -04:00
Blake Watters
d71893bf43 Remove errantly committed logging statement 2012-10-27 18:08:15 -04:00