Commit Graph

42 Commits

Author SHA1 Message Date
Blake Watters
75fbe7df92 Style tweak in dispatch_async of completion blocks 2013-04-10 17:46:02 -04: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
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
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
f1a35bb884 Style tweak 2013-01-10 19:54:18 -05:00
Blake Watters
70180022be Add support for customizing the RKObjectRequestOperation and RKManagedObjectRequestOperation instances built through the object manager using a registration API very similar to that of AFHTTPClient. closes #1131 2013-01-08 10:49:49 -05:00
Blake Watters
c08909761e Adjust completion block implementation for RKPaginator to enable completion block to be invoked when used without a strong reference. fixes #1119 fixes #1093 2013-01-01 22:21:47 -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
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
89d0294dcd Expose access to the RKMapperOperationDelegate to RKObjectRequestOperation subclasses. closes #1009 2012-11-29 23:35:45 -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
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
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
Blake Watters
9fa32fb08c Formatting tweak 2012-10-27 17:48:00 -04:00
Blake Watters
e457aba0fa Fix issue with nil arguments to success/failure block introduced earlier today 2012-10-27 16:41:46 -04:00
Blake Watters
d2dc222766 FIx inappropriate use of __block when we mean __weak 2012-10-27 10:25:14 -04:00
Blake Watters
f96fee87b6 Add a decent description method to the object request operations 2012-10-22 19:29:58 -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
384ff80845 Add support for spinning the Network Activity Indicator while object request operations are executing. Add notifications for tracking object request operation lifecycle. 2012-10-17 22:35:13 -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
dc57e585a9 Use OS_OBJECT_USE_OBJC to conditionally compile dispatch retain/release based on compatibility with ARC of target compiler 2012-10-05 19:22:56 -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
Jeff Arena
a88f58db55 Remove avoidsNetworkAccess property in favor of leveraging NSURLCache capabilities under the hood. 2012-09-28 13:41:28 -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
fd16081797 Merge pull request #950 from aharren/feature/reboot-networking-layer
Use embedded variant of LibComponentLogging with prefix RK
2012-09-27 16:13:42 -07:00
Blake Watters
47965f361c Disable the avoidsNetworkAccess flag by default 2012-09-27 17:04:11 -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
458354484a Fix null dereference static analyzer warnings 2012-09-27 11:47:30 -04:00
Blake Watters
6815ba6444 API refresh for mapping layer. Converted RKObjectMapper to RKMapperOperation. Expanded documentation. 2012-09-21 17:55:32 -04:00
Blake Watters
c88855614e Export the RKErrorFromMappingResult function; eliminate dependence on RestKit.h header from RKResponseMapperOperation 2012-09-20 11:51:28 -04:00
Blake Watters
3714dd4a56 Unwind the unexpected behaviors in RKHTTPRequestOperation regarding Acceptable Content Types and Status Codes. Explicitly configure the needed types within RKObjectRequestOperation instead. 2012-09-12 21:21:46 -04:00
Blake Watters
b40e39813c License boilerplate 2012-09-12 21:18:45 -04:00
Blake Watters
e84b7e06f1 Initialize the avoidsNetworkAccess optimization based on the cachePolicy of the request. closes #928 2012-09-12 18:14:46 -04:00
Blake Watters
0379806796 Setup a default managedObjectCache instance of RKFetchRequestManagedObjectCache 2012-09-10 12:41:57 -04:00
Blake Watters
40ed221edf Merge branch 'fix/mem-leak' of https://github.com/diederich/RestKit into feature/reboot-networking-layer 2012-09-10 10:49:43 -04:00
Blake Watters
0c3f5fbc57 Log full cached response headers at Trace log level for debugging caching 2012-09-09 20:02:29 -04:00
Blake Watters
e5aed512a7 Add new optimization to permit RKObjectRequestOperation to avoid the network and use an existing cached response. Update initialization paths for RKObjectRequestOperation to work with requests instead of request operations. 2012-09-09 18:25:43 -04:00
Stephan Diederich
bdf03466d0 fix mem leak
release the retained dispatch queue in dealloc
2012-09-09 20:33:23 +02:00
Blake Watters
3eda5832cb Migrating files between modules to better reflect logical grouping with AFNetworking in the mix 2012-09-03 16:51:13 -04:00