Commit Graph

183 Commits

Author SHA1 Message Date
Jeff Arena
37ae82c695 Add additional default date formatter to handle rails dates. 2012-10-24 13:23:54 -04:00
Blake Watters
f93a044561 Add error condition when attempting to map an RKEntityMapping containing connection mappings with a nil managed object cache.
* Add support for the data source to fail mapping operation with an error.
* Clean up error handling within RKMappingOperation
2012-10-21 15:47:16 -04:00
Blake Watters
ef46ff2d1d Add assertion that gives the developer a hint of how to fix an attempt to add an array of attribute mappings that already exist in another mapping 2012-10-20 17:43:49 -04:00
Blake Watters
08110ca300 Implement support for cancellation and prioritization of response mapping operations using an operation queue global to all object request operations.
* Passes through cancellation from object request operation to HTTP request operation and response mapping operation. closes #993
* Performs all object mapping within an NSOperationQueue to enable constraining of mapping activities.
* Add default mapping queue with concurrency limit of 1 operation.
* Migrate deserialization of the response body into a serial dispatch queue to ensure that only one parse occurs at a time.
2012-10-20 00:13:48 -04:00
Blake Watters
e748e5bfce Don't throw an exception if doing a simple attribute mapping with a nil data source. closes #1005 2012-10-18 15:17:57 -04:00
Blake Watters
f69c2976e2 Fix bug with dynamic parameterization when the concrete mapping includes a date.
Instead of relying on reference to the RKMapping, which could be dynamic, traverse from the attribute mapping back to its parent to obtain the appropraite date formatter.
2012-10-18 14:38:36 -04:00
Blake Watters
f5ed351a89 Remove dead delegate 2012-10-18 12:18:45 -04:00
Blake Watters
1f3f2646b5 Port a few test cases to Expecta syntax 2012-10-18 12:14:34 -04:00
Blake Watters
fb6db948e1 Implement support for using dynamic mapping during parameterization with a Request Descriptor. closes #684 2012-10-18 12:14:16 -04:00
Blake Watters
330e63a2d2 Add test coverage for default value of savesToPersistentStore attributes. closes #1000 2012-10-17 17:49:08 -04:00
Blake Watters
9d617c6c7b Add support for disconnecting relationships when mapping a related keypath whose value is equal to [NSNull null]. fixes #862 2012-10-16 20:48:27 -04:00
Jeff Arena
53f4105e57 Split out simple and keyPath attribute mappings to allow relationship mappings to run before keyPath mappings. 2012-10-16 18:07:36 -04:00
Blake Watters
f4bfdb389b Add support for the registration of HTTP request operation subclasses on the manager to support easy customization of request operation handling. refs #997 2012-10-16 11:25:00 -04:00
Blake Watters
d6c429e735 Add tests clarifying issue regarding relativePath vs. relativeString. closes #996 2012-10-15 23:22:27 -04:00
Blake Watters
64e9c7cb6d Add support for mapping attributes to deeply nested keyPaths on NSMutableDictionary. fixes #882 2012-10-15 22:00:14 -04:00
Blake Watters
1811d5250d Ensure the fetch request blocks are given a relative URL if possible to make path matching easier 2012-10-14 16:03:12 -04:00
Blake Watters
4ee29df72f Ensure cancellation works with path patterns against baseURL's that include a path 2012-10-14 15:32:08 -04:00
Blake Watters
d823217993 Add assertions to prevent attempts to create request descriptor objects with inappropriate mappings. fixes #976 2012-10-14 14:57:02 -04:00
Blake Watters
1beb11ac1b Moving tests around 2012-10-14 13:51:39 -04:00
Blake Watters
f3ece00743 Rework path based response descriptor matching and expand test coverage. Eliminate path normalization. fixes #987 2012-10-14 13:51:39 -04:00
Blake Watters
4a7ed3cbd3 Rename test files to align with classes 2012-10-14 13:51:39 -04:00
Blake Watters
8ae402e297 Add test coverage and fixed invalid error reporting when processing a client error that is empty and unmappable (i.e. {}). refs #983, closes #978 2012-10-06 01:54:12 -04:00
Blake Watters
a4a788b889 Wrap requestWithMethod:path:parameters: instead of reimplementing it. closes #959 2012-10-05 23:26:21 -04:00
Blake Watters
e3bc2e6077 Update serialization tests broken sue to upstream URL encoding changes from AFNetworking 2012-10-05 21:53:52 -04:00
Blake Watters
2f0f5279c2 Reworking test environment imports when Kiwi has been imported to suppress warning 2012-10-05 21:49:45 -04:00
Blake Watters
224de85fb3 Respect rootKeyPath when returning empty dictionary in response to unmappable representation error 2012-10-05 21:48:19 -04:00
Blake Watters
877ce255b5 Expand test coverage and fix situations where requests would unexpectedly initialize incorrectly without error
* RKObjectParameterization now returns an empty dictionary if mapping produces an unmappable representation error (no mappable attributes/relationships found)
* Log errors if request construction results in an NSError and return nil
* Ensure errors are passed back up through object parameterization instead of just returning nil
* Reset the serialization MIME Type registry during RKTestFactory set up to ensure it is in a sane state
* Convert Hamcrest matchers to Expecta in the object mapper tests to fix infinite recursion on test failure (will need to completely phase out Hamcrest soon)
2012-10-05 19:16:55 -04:00
Blake Watters
17f9a1af8b Normalize the path pattern instead of throwing an assertion 2012-10-05 16:29:25 -04:00
Blake Watters
635b6257d1 Expose default headers as a property and rework intiialization logic to respect the AFHTTPClient instance with which the object manager was initialized. Update docs to reflect the changes. Add tests for initialization code paths. 2012-10-05 14:24:32 -04:00
Blake Watters
0dc21fb95d Add caching helpers to the RKTestHelpers interface 2012-10-05 14:22:56 -04:00
Blake Watters
fb7f074b23 Use path normalization instead of prefix matching to solve issue with failure to match path patterns with trailing slashes. Expand tests 2012-10-05 13:46:52 -04:00
Blake Watters
61a0a05b29 Drop ISO8601DateFormatter dependency since it has a time zone handling bug and switch to RK specific fork. fixes #971
* ARCify the ISO8601DateFormatter
2012-10-04 23:00:01 -04:00
Blake Watters
4060441abb Fix issue with exact substring path patterns failing to match 2012-10-04 22:26:43 -04:00
Blake Watters
af234936ee Don't send object parameters when performing a getObject: closes #947 2012-10-04 19:20:58 -04:00
Blake Watters
5b844653a3 Add another test for more complex parsing query string parsing scenario 2012-10-04 19:04:46 -04:00
Blake Watters
a85e209d54 Fix crash when identical keys appear in a URL encoded string that is decoded into a dictionary. Add test coverage 2012-10-04 18:31:51 -04:00
Blake Watters
cf5ef24fe9 Eliminate use of associated objects on NSURL in favor of a smarter RKResponseDescriptor class to solve the relative URL problem. refs #966
Instead, fall back to treating all URL's as strings for matching purposes and manually performing relative URL testing. Adds `matchesURL:` and `matchesResponse:` methods to `RKResponseDescriptor`.
2012-10-04 14:11:05 -04:00
Jeff Arena
77d738b91e Add additional test coverage to DELETE to handle cases where a 204 is returned, instead of a 200. 2012-10-02 11:10:25 -04:00
Jeff Arena
fc36d69475 Fix error with local delete of managed object after performing a successful DELETE operation. 2012-10-02 11:00:20 -04:00
Blake Watters
73bd1f0869 Add support for asynchrous search indexing, cancellation of indexing operations, waiting on indexing to complete. Expand documentation surrounding the indexing context. 2012-10-01 17:37:36 -04:00
Blake Watters
c10321751c Rename primaryManagedObjectContext to persistentStoreManagedObjectContext since nobody can keep its role straight 2012-09-30 22:47:26 -04:00
Jeff Arena
c301060ab8 Add APIs to RKObjectManager for use in firing batches of operations. 2012-09-30 13:43:12 -04:00
Blake Watters
03439f2464 Fix test breakage from changes around shared factory objects 2012-09-29 17:54:52 -04:00
Blake Watters
42cdcce76e Add basic tests for connection operation 2012-09-29 17:54:51 -04:00
Jeff Arena
9cd78c2385 Adjust search indexing to use a new indexingContext 2012-09-29 15:20:48 -04:00
Blake Watters
adc1d178fa Add cancellation API to RKObjectManager.
* Introduces `cancelAllObjectRequestOperationsWithMethod:pathPattern:`
* Make RKObjectRequestOperation cancel underlying request operation when cancelled
2012-09-27 22:33:19 -04:00
Blake Watters
e591547d90 Cleanup RKPathMatcher initializers to start with pathMatcher so they are easier to guess for auto-complete. 2012-09-27 22:31:48 -04:00
Arne Harren
bc7c65f03b Switch to an embedded variant of LibComponentLogging with prefix RK 2012-09-27 21:47:36 +02:00
Blake Watters
d195ea873c Port passing Logic Test coverage to ARC 2012-09-26 11:35:16 -04:00
Blake Watters
fee0c0dac0 Fix all remaining broken tests 2012-09-25 21:18:39 -04:00