Blake Watters
ae29401841
Added specs for zero-length Content-Length header when params is nil or empty
2011-07-20 22:56:22 -04:00
Blake Watters
bd8bd34895
Replaced slow rm -f && cp copy header approach with more efficient cp. Greatly speeds up rebuilds on large codebases.
2011-07-20 17:25:39 -04:00
Blake Watters
443dc6aa4c
Really make the headers Public and not just Project.
2011-07-20 08:35:45 -04:00
Blake Watters
ba8237509d
Moved remaining Core Data headers to public so they can be imported easily.
2011-07-20 00:24:20 -04:00
Blake Watters
40eb842dcc
Store new objects by lookupValue instead of primaryKeyValue. This avoids creation of duplicated objects the are manufactured by findOrCreateInstanceOfEntity:
2011-07-07 22:40:46 -04:00
Blake Watters
73fb461a8b
Reworked object mapping behaviors to better accommodate situations where the server side responds with a successful status code and a payload that does not contain any mappable attributes or relationships. We now consider this to be successful. If a mapping operation is performed that does not result in any mappings being applied, it will return NO without setting an error. If an instance of RKObjectMapper is invoked that does not find any mappable content in the payload, this will result in an unmappable content error. The object loader guards against this by not attempting to map any empty payloads. This should ensure that you only get the unmappable content error if you have asked RK to load and map a payload it cannot find an object mapping for.
2011-07-07 09:53:46 -04:00
Blake Watters
c171bed7d3
Don't generate an unmappable content error if a successful status code is returned along with an empty response body. This enables the use of the status code to indicate success without any content for mapping. In these cases, we wrap the targetObject of the loader into a RKObjectMappingResult at the @"" keyPath so that the delegates are invoked as expected. closes #189
2011-07-06 22:01:10 -04:00
Blake Watters
6376274900
Fixes for URL encoding of paramters in GET request. closes #193
2011-07-06 15:27:40 -04:00
Blake Watters
dddc4c3d0a
Fix for crash when coercing an empty object mapping result set into a singular result with asObject. closes #190
2011-07-05 16:56:34 -04:00
Blake Watters
348e86cbc8
Fix for inappropriate suspension of the main queue when using an IP address instead of a hostname.
2011-07-05 16:23:38 -04:00
Blake Watters
f0e8e8d44f
Coerce primary keys to strings in the thread-local lookup cache to handle lookups for numeric or string keys coming back in the JSON
2011-07-02 15:03:08 -04:00
Blake Watters
546eb627cd
Respect the root keyPath when constructing a temporary object mapping provider. Covers the case where an object mapping targeting nested content is being directly specified.
2011-07-02 11:04:56 -04:00
Blake Watters
b24ca81deb
Adding an "Ad Hoc" configuration to side-step the Archive build problem.
2011-07-01 07:57:54 -04:00
Blake Watters
72f26690ed
Fixing crash from over-release of RKParams.
2011-06-30 17:19:12 -04:00
Blake Watters
3b89382da7
Fix broken test around creation of request serialization
2011-06-30 13:11:31 -04:00
Blake Watters
7053a8ca97
Add support for sending objects of one type and getting back another. Target object has been disambiguated into sourceObject and targetObject
...
and act independently with regards to serialization and destination mapping. When you leverage the getObject:mapResponseWith: flavor of methods,
the type of your sourceObject is checked with the destination type of the object mapping. If they agree, it is assumed that you are trying to update
the object with the results of the mapping and targetObject is set appropriately. If they do not match, the targetObject is set to nil so that new
objects will be loaded. closes #161 , #168
2011-06-30 10:33:39 -04:00
Blake Watters
2ac45f5ccc
Refactored object loaders to provide easier support for non-nested JSON responses. There are new flavors of getObject:, postObject:, etc.
...
that allow the developer to explicitly specify the object mapping to use for processing the response. closes #168
2011-06-30 10:33:39 -04:00
Blake Watters
e18c1f2811
Merge pull request #181 from dhilus/master
...
YAJL serialization option modified so NSURL properties are serialized as String.
2011-06-30 05:18:13 -07:00
Rémy SAISSY
69460fdc4f
YAJLGenOptionsIncludeNone -> YAJLGenOptionsIncludeUnsupportedTypes thus enabling NSURL properties to be serialized as string.
2011-06-30 09:40:41 +02:00
Blake Watters
2e7adbdc1e
Restore the managed object cache functionality and add test coverage so it does not break again. fixes #167
2011-06-29 22:08:35 -04:00
Blake Watters
d57b784c30
Don't delete the managed object unless we were responsible for saving it in the first place. closes #125
2011-06-29 21:04:17 -04:00
Blake Watters
6faa525344
Added specs and support for either failing out the mapping operation or skipping over an attribute depending on key/value validation response. If NO is returned and a validation error is returned, the mapping operation will fail. If NO is returned without an error, the attribute will be skipped and a warning will be logged. You can also mutate the values. closes #166
2011-06-29 15:07:43 -04:00
Blake Watters
4b4d3d1af6
Remove dead RKRailsRouter code. fixes #178
2011-06-29 14:08:21 -04:00
Blake Watters
c97af0802b
Added new spec for RKURL. Implemented encoding of plus characters. fixes #170
2011-06-29 13:59:40 -04:00
Blake Watters
2a8ece97c1
Improvements to reachability, the request queue, logging throughout the network layer, decoupling of components via notifications, reliability improvements for unit tests in the cache layer. Improved thread-local cleanup routines inside the managed object store. Changing base URL's is now more reliable. fixes #171 , #158 , #113 , #104 , #102
2011-06-29 13:28:14 -04:00
Blake Watters
1cfa273224
Added new logging to the RKRequestQueue for inspecting what is happening. Eliminated use of copy during iteration of the request queue to avoid issues with re-entrant invocations of the queue resulting in the queue becoming starved. Fixed a number of flaky tests by making the RKSpec helpers stub out network availability. closes #164
2011-06-28 18:18:49 -04:00
Blake Watters
3dfbaf1810
Updated to support setting default value instead of nil when an attribute is missing in the payload. For Core Data backed models, we consult the entity definition to obtain the default value. closes #117
2011-06-28 15:22:04 -04:00
Blake Watters
851df3bcba
Changed signature of willMapData: to allow you to completely replace the mappableData.
2011-06-28 11:46:03 -04:00
Blake Watters
0949337749
Allow modification of the data in objectLoader:willMapData: by creating a mutable copy of the parsed data if the delegate method is implemented.
2011-06-27 16:37:55 -04:00
Blake Watters
0ca4a0feea
Added unit tests to loaders to investigate loading an array bug reports
2011-06-23 08:49:20 -04:00
Blake Watters
64db97ce60
Helper methods for retrieving attribute and relationship mappings by attribute/relationship keyPath. Useful for customizing serialization mappings that were built using inverseMapping.
2011-06-22 10:43:42 -04:00
Blake Watters
8ad1a84281
Reworked object loader to check if a response is mappable even if it is an error. We had an assertion failure that could be triggered by trying to load a remote error payload in a non-mappable format (i.e. text/html).
2011-06-21 13:27:15 -04:00
Blake Watters
3204682f72
Added object mapping management to the mapping provider for folks who don't have keyPaths. Deprecated setMapping:forKeyPath: in favor of setObjectMapping:forKeyPath: for consistency with the other method signatures.
2011-06-20 10:49:40 -04:00
Jeremy Ellison
de684989db
Fix memory leaks in -reset on RKObjectLoader and RKManagedObjectLoader.
2011-06-20 09:12:56 -04:00
Blake Watters
3bf4b7bc0f
Implemented nested mapping for structures similar to the BuildBot JSON structure. fixes #112
2011-06-17 15:36:28 -04:00
Jeremy Ellison
9073b25988
Merge branch 'master' of github.com:twotoasters/RestKit into restkit-sprint
2011-06-16 19:06:25 -04:00
Duncan Lewis
718c67039a
Project updates
2011-06-16 18:29:22 -04:00
Blake Watters
323d5e30b1
Add support for mapping from NSNumber to NSDate by coercing to a time interval since 1970. fixes #141
2011-06-16 17:33:21 -04:00
Blake Watters
3dd7361116
Pushing code up for Jeremy
2011-06-16 17:11:13 -04:00
Blake Watters
a75ace87d0
Deprecated RKObjectManager methods that use queryParams. Added NSString category for achieving the same results without bloating the API
2011-06-16 17:04:34 -04:00
Blake Watters
e65ea71b20
Updates to make parsedBody: implementation ready for merge. Migrated all remaining specs to RKSpec so failures don't cause crashes when you use the Hamcrest helpers. closes #153
2011-06-15 10:47:45 -04:00
Blake Watters
2493828414
Make imports of RKParser relative so they resolve correctly outside of the library project
2011-06-13 08:33:34 -04:00
Blake Watters
a41917af66
Ensure parsers are in the public dir
2011-06-12 18:52:11 -04:00
Blake Watters
ce9f49a061
Move Three20 headers into Public
2011-06-12 15:01:55 -04:00
Blake Watters
8e5fa664e8
Cleaned up miscellaneous artifacts from squashing object mapping 2.0
2011-06-11 20:34:10 -04:00
Blake Watters
8aef0a36b5
UISpec update
2011-06-11 20:27:34 -04:00
Blake Watters
27ea307816
Fix crash in RKCatalog. Suppress warning about symbol visibility during linking.
2011-06-11 20:27:33 -04:00
Blake Watters
dafe3486e9
Added cache component to logging. Chased down some mystery failing tests. Added thorough logging to RKRequestCache.
2011-06-11 20:27:33 -04:00
Blake Watters
9299cabc11
Implemented flexible logging solution utilizing the excellent LibComponentLogging library.
2011-06-11 20:25:28 -04:00
Blake Watters
69ded29245
Improved Three20 integration by leveraging object mapping to instantiate TTTableItems
2011-06-11 19:33:42 -04:00