Blake Watters
f96fee87b6
Add a decent description method to the object request operations
2012-10-22 19:29:58 -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
c7ce86e9ac
Improve docs on success/failure blocks
2012-10-20 10:51: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
0738f59231
Added assertion to trap very nasty Core Data mapping error in which existingObjectWithID:error: returns an object in another context, indicating that the object graph has been poisoned, most likely by obtaining a permanent managed object ID from the wrong context.
2012-10-19 17:53:09 -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
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
68cebc96af
Added convenience function for getting a fetch request from an array of fetch request blocks
2012-10-17 22:34:09 -04:00
Blake Watters
feb998ea84
Added support for truncating the length of logged request and response bodies via the 'RKLogMaxLength' environment variable to avoid getting hammered with output on the Trace level
2012-10-17 22:33:31 -04:00
Blake Watters
f2bc809502
Update to reflect change to designated initializer in superclass preventing the appropriate default value for savesToPersistentStore: to be set. refs #1000
2012-10-17 17:08:31 -04:00
Blake Watters
bc50e95036
Fix invalid references to requestOperation. refs #997
2012-10-16 11:59:39 -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
342c57213b
Updates to relationship connection execution system for better encapsulation and reuse.
...
* Reworked execution of relationship connection operations to use dependencies instead of queue suspension.
* Migrates responsibility for connecting relationships from `RKManagedObjectRequestOperation` into `RKManagedObjectResponseMapperOperation`. This ensures that you get a mapped and connected object graph back from the response mapper if you are using it outside of a request operation.
* Add `parentOperation` to managed object mapping data source to establish dependencies.
2012-10-15 16:06:22 -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
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
3cc5ab9825
Fix inappropriate logging message regarding redirects
2012-10-14 13:51:38 -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
c522326a98
Remove SystemConfiguration import for RKObjectManager. fixes #985
2012-10-06 01:05:55 -04:00
Blake Watters
66f0c34b5d
Add conditional compilation for System Configuration header to avoid build error if SystemConfiguration is not pulled. refs #985
2012-10-06 00:07:38 -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
9ab37a7617
Finish header docs for RKObjectManager
2012-10-05 23:12:27 -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
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
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
b9b34bf3dd
FIx nasty problem with HTTP method being dropped from earlier headers cleanup
2012-10-05 16:54:30 -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
4060441abb
Fix issue with exact substring path patterns failing to match
2012-10-04 22:26:43 -04:00
Blake Watters
25e1f9ed4d
Don't send parameterization of the object with DELETE request's either. Update docs to reflect this. refs #947
2012-10-04 19:25:32 -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
82ff81222a
Docs touch ups
2012-10-04 18:31:10 -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
Blake Watters
174372dcf5
Fix a number of warnings about potential dereference of null pointer
2012-10-02 15:52:45 -04:00
Blake Watters
b41e56607a
Migrate warning to the bottom of the document to clean up HTML formatting
2012-10-02 14:38:59 -04:00
Blake Watters
dc06c890a4
Find/replace renamed pathMatcher method signatures. closes #968
2012-10-02 13:57:35 -04:00
Jeff Arena
5b372f4cea
Fix issues with passing NSErrors into blocks inappropriately.
2012-10-02 12:54:32 -04:00
Blake Watters
f467fa20b1
Merge pull request #965 from dmishe/doc_fixes
...
Doc fixes
2012-10-02 09:25:07 -07: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
2b7eca1fb4
Default savesToPersistentStore to YES
2012-10-01 23:11:03 -04:00
Blake Watters
d6cd6d7bba
Add configuration for controlling persistent to the parent context or the persistent store
2012-10-01 22:41:08 -04:00
Dmitry Shevchenko
2310b5111d
Fixed a typo
2012-10-01 21:06:13 -05:00
Blake Watters
c10321751c
Rename primaryManagedObjectContext to persistentStoreManagedObjectContext since nobody can keep its role straight
2012-09-30 22:47:26 -04:00
Blake Watters
5cae20aabc
Add note about route types during batch operation creation
2012-09-30 19:53:24 -04:00
Blake Watters
2280674f5a
Touch up docs for batched object request operations
2012-09-30 19:30:35 -04:00
Blake Watters
8c34f0996b
Enable the response mapper to read the objectID from the targetObject if the target object ID is nil.
2012-09-30 19:30:35 -04:00
Jeff Arena
c301060ab8
Add APIs to RKObjectManager for use in firing batches of operations.
2012-09-30 13:43:12 -04:00