20 Commits

Author SHA1 Message Date
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
a2ca2ec937 Fix crash when serializing NSDate properties mapped at nested keypaths. fixes #1134 2013-01-17 11:01:24 -05:00
Blake Watters
259e6c2fe5 Fix all test breakage in OS X Framework tests 2013-01-15 09:07:44 -05:00
Blake Watters
422768f6b1 Add support for dynamic nesting key serialization. closes #684 2013-01-03 23:02:49 -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
138bbddfcd Switch the default date formatter to ISO-8601. closes #1069, refs #1010 2012-12-11 21:51:53 -05:00
Blake Watters
ae6b58d7bc Add support for parameterizing NSSet. refs #1010 2012-12-11 21:31:40 -05:00
Blake Watters
f3a853e871 Drop RK prefix from entity names 2012-11-23 22:19:12 -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
Jeff Arena
c7ae6c389e Fix a few broken specs. 2012-11-08 13:47:26 -05: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
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
64e9c7cb6d Add support for mapping attributes to deeply nested keyPaths on NSMutableDictionary. fixes #882 2012-10-15 22:00:14 -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
e3bc2e6077 Update serialization tests broken sue to upstream URL encoding changes from AFNetworking 2012-10-05 21:53:52 -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
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
Blake Watters
d214626c83 Port RKObjectSerializer tests to RKObjectParameterization 2012-09-25 17:13:04 -04:00