115 Commits

Author SHA1 Message Date
Blake Watters
499071925b Added test cases attempting to reproduce duplicated objects issue. refs #1228 2013-03-17 16:17:05 -04:00
Blake Watters
420d140484 Fix test breakage under Mac OS X 2013-03-16 18:04:27 -04:00
Blake Watters
a0a0adf7d1 Make deletion of newly inserted objects that fail validation configurable. closes #1281 2013-03-16 15:26:04 -04:00
Blake Watters
34b8a30b06 Improve RKPathMatcher so that it only evaluates a path match positively if the number of slashes in the source string matches the number of slashes in the pattern. closes #1212, closes #1192 2013-03-10 16:37:35 -04:00
Blake Watters
2581d21762 Add test case covering deletion of object before use in managed object request operation. refs #1252 2013-03-10 13:30:47 -04:00
Blake Watters
dd74867c79 Fix issue where targetObject was not set appropriately when mapping a non-managed object via RKManagedObjectResponseMapperOperation. fixes #1268 2013-03-10 13:12:17 -04:00
Blake Watters
59ced3b32a Obtain a permanent NSManagedObjectID when adding a newly created NSManagedObject to the RKInMemoryManagedObjectCache to avoid potential for duplicated objects during concurrent mapping. refs #1260 2013-03-10 11:48:31 -04:00
Blake Watters
ca3828f6ef Add workaround for logging crash under iOS 5. closes #1256 2013-03-10 00:28:21 -05:00
Blake Watters
fd265420b9 Add support for RKRequestMethodAny in relationship routes. fixes #1205 2013-03-09 23:35:47 -05:00
Blake Watters
cb108d28ba Fix broken test coverage for 304 (Not Modified) optimization 2013-03-09 10:15:21 -05:00
Blake Watters
318f9659f6 Move management of RKResponseHasBeenMapped to RKObjectRequestOperation instead of RKManagedObjectRequestOperation. Add unit tests. 2013-03-07 14:39:31 -05:00
Blake Watters
d47a0c9ffd Add support for retrying RKObjectRequestOperation and RKManagedObjectRequestOperation by conforming to NSCopying. closes #1224 2013-03-07 13:55:11 -05:00
Jeff Arena
948209b254 Remove wasNotModified method in favor of setting a flag on cached response entries to determine if mapping can be skipped. 2013-03-07 13:08:30 -05:00
Blake Watters
9a011357c5 Disable intermittently failing concurrency test until we can tackle it post 0.20.0 2013-02-07 12:47:56 -05:00
Blake Watters
0364d6c67b Integrate support for metadata mapping routing data. refs #1174 2013-01-24 23:16:48 -05:00
Blake Watters
4c39918fdb Implement support for flexible metdata mapping. closes #582, #688
* Metadata mapping is implemented via an `NSProxy` object that stands in for the `sourceObject` of each `RKMappingOperation`
* Key paths that are prefixed with `@metadata.` are mapped against the `metadata` dictionary of the operation, else they hit the `sourceObject`.
* Metadata is implemented by merging a dictionary of data in from `RKObjectRequestOperation`, through to `RKResponseMapperOperation`, into `RKMapperOperation`, and all the way down into the `RKMappingOperation`, where it is available to each object. By convention, metdata is namespaced into subdictionaries.
2013-01-24 16:31:19 -05:00
Blake Watters
cd877860fd Tweak docs, add test cases for mapping a response with a descriptor that does not specify any attributes/relationships 2013-01-23 15:26:52 -05:00
Johannes Plunien
4ae497afb1 Add test to verify managedObjectContext on empty results. 2013-01-21 20:33:56 +01:00
Blake Watters
2cf73d2436 Fix failed assertion when constructing an unprocessable response error for 5xx errors. closes #1169 2013-01-18 18:57:34 -05:00
Blake Watters
3d52c459aa Add test case for empty 5xx response. refs #1169 2013-01-18 17:51:56 -05:00
Blake Watters
f2abd1e107 Add test coverage verifying fix for crash during cyclic graph traversal in RKManagedObjectRequestOperation. closes #1142 2013-01-17 18:47:02 -05:00
Blake Watters
bcbbd65fbe Fix issue in which managed objects that are the children of non-managed objects were refetched and assigned as a collection rather than as a singular value. fixes #1118 2013-01-16 17:49:32 -05:00
Johannes Plunien
62af9290d4 Add test case for unexpected NSSet. #1118 2013-01-16 14:01:39 -05:00
Blake Watters
a8f3887b26 Fix bug with status code handling when statusCodes is nil for any response descriptor. 2013-01-16 13:57:24 -05:00
Blake Watters
c26739ce6b Fix issues with mapping errors from 5xx payloads. Ensure acceptableStatusCodes tracks the status codes configured in the response descriptors. fixes #1157 2013-01-16 12:38:44 -05:00
Blake Watters
259e6c2fe5 Fix all test breakage in OS X Framework tests 2013-01-15 09:07:44 -05:00
Blake Watters
840b37a4f9 Fix bug in mapper delegate configuration and add missing test coverage for response mapper operation and both object request operation classes. closes #1156 2013-01-14 14:23:32 -05:00
Blake Watters
f4b805ff52 Fix issues with implementation of error override in RKHTTPRequestOperation. fixes #1140 2013-01-09 22:42:39 -05:00
Blake Watters
905048f737 Fix issue where unsaved managed object POST'd to the server with unsaved changes are not persisted if no mapping occurs. fixes #1130 2013-01-07 19:56:14 -05:00
Blake Watters
3d1bb617e7 Fix test breakage when your ISP returns a custom HTTP response page for an invalid host 2013-01-07 14:19:57 -05:00
Blake Watters
896eef1a1b Add test case for failure to load due to unsupported URL. refs #1122 2013-01-03 22:06:26 -05:00
Blake Watters
1423f77a51 Add test case for failure to load due to invalid hostname. refs #1122 2013-01-03 22:03:01 -05:00
Blake Watters
879ffd73e6 Add support for deleting Core Data managed objects that fail validation out of the mapping context. This enables you to silently drop mapping for managed objects that fail validation. fixes #691 closes #694 2013-01-01 23:56:58 -05:00
Blake Watters
312b382f25 Add test and fix for invalid key path exceptions with dynamic mappings. refs #1111 2012-12-30 00:01:50 -05:00
Blake Watters
6493282772 Rework implementation of managed object deletion and refetching to use the refreshed visitor implementation. refs #1111, #1113 2012-12-29 17:28:31 -05:00
Blake Watters
84c6822d25 Implement Tarjan's algorithm to efficiently traverse the RKResponseDescriptors within the RKManagedObjectRequestOperation and compute the key paths to all managed objects. refs #1113, refs #1112 2012-12-28 00:29:27 -05:00
Blake Watters
5c21e52829 Update Dynamic Mapping API's to match the rest of the 0.20.x style. Introduce support for predicate based dynamic matching.
* Rename RKDynamicMappingMatcher to RKObjectMappingMatcher since it is not strictly coupled to dynamic mapping and works with object mappings.
* Rework matchers into using a class cluster style to enable flexible subclassing to introduce additional matchers.
2012-12-27 22:16:40 -05:00
Blake Watters
b858f2753f Grow up support for mapping to primitives by avoiding crashes due to null conversions. fixes #1043, fixes #741, fixes #703 2012-12-26 14:40:59 -05:00
Blake Watters
ea304c5ec4 Update test to run against local test server instead of restkit.org 2012-12-24 18:00:20 -05:00
Blake Watters
0a033596da Relax the use of use an the informal procotol for the errorMessage property in favor of the description method. closes #1104, closes #1087, closes #1095
* Change contract to the use the `description` method instead of `errorMessage`. This makes it work with any class out of the box
* Add import for RKErrorMessage to the Support.h header so it is immediately available
* Fix incorrect keyPath in the README.md
* Add additional notes about how the errors are constructed to the README
2012-12-22 19:03:30 -05:00
Blake Watters
0cc9ce671e Improve the error messages for failure to match any key paths in the mapper 2012-12-20 22:16:42 -05:00
Blake Watters
ef038aed73 Add a unit test for concurrent mapping of managed object request operations targetting the same unique Core Data objects. closes #1079 2012-12-19 23:02:52 -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
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
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
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
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
d79dec118a Greatly improve error output when all response descriptors fail to match. closes #1060 2012-12-07 17:39:02 -05:00