Blake Watters
54007c78d4
Reworked Brendan Ribera's contributions around time zone handling to eliminate the use of transient
...
NSDateFormatters, added a preferredDateFormatter for use when serializing dates to strings,
replaced the use of the description method for date encoding to strings with invocation of the
preferredDateFormatter, added new attribute transformation strategy from NSDate -> NSString properties
(also using the preferred date formatter), and provided customization support for date handling globally
and on a per-mapping basis. closes #200 , closes #313 , closes #309 , closes #308
2011-09-05 17:25:43 -04:00
Blake Watters
5f090f0478
Re-enabled copy headers task and added new install image for configuring the include/ path since Xcode is behaving poorly without it for folks on the mailing list.
2011-09-04 16:38:05 -04:00
Blake Watters
f88e3dc0cb
Added test coverage for parsing XML from the national weather service. fixes #298
2011-09-03 18:32:54 -04:00
Blake Watters
d9d0f7a650
Eliminated the global sharedQueue in favor of allowing each RKClient to own its a private queue. This eliminates problems where multiple clients are tracking reachability notifications and mutating the suspension state on a single queue. If you want to use a single queue across multiple RKClient instances, you can assign a single queue to both and worry about suspension and reachability yourself. fixes #278
2011-09-03 15:52:45 -04:00
Blake Watters
32461e916f
Added support for parsing XML containing CDATA content. fixes #327
2011-09-03 14:30:07 -04:00
Greg Combs
de6c611338
Added RKFixCategoryBug.h to the YAJL target, in order to successfully compile without errors.
2011-09-02 00:52:02 -05:00
Blake Watters
ef11b13c8e
Reworked installation and build process to eliminate the need to configure the Header and Library search paths. Updated all example projects to match. This makes the use of the DerivedData directory a requirement going forward. fixes #323
2011-09-01 21:54:45 -04:00
Blake Watters
b96940cc64
Eliminated requirement to use -all_load linker flag. Fixed breakage in OS X builds due to ivar/property name disagreement. Removed references to all_load from the install docs. fixes #239
2011-09-01 20:52:46 -04:00
Blake Watters
7ca39d8127
Rename spec target. Remove .orig file hanging out in git
2011-08-29 20:35:24 -04:00
Blake Watters
edd3c8a065
Added test coverage for parsing orders XML. fixes #255
2011-08-27 21:12:17 -04:00
Jeff Arena
aceb75200a
Fix for issues setting many-to-many relationships on NSManagedObjects, as well as some additional test coverage for the issue. fixes #271
2011-08-27 21:00:19 -04:00
Blake Watters
3832ec7b9f
Added new unit tests for XML support and merged fixes from @Edubits pull request #262 and changes from @cellcortex #314 . Attributes and nesting should behave better. closes #262 , #314
2011-08-27 18:44:46 -04:00
Blake Watters
84032d9aa6
De-emphasized the use of the sharedQueue and improved management of queue suspension state when changing out the baseURL on RKClient. This should prevent the queue from becoming suspended beyond the life of an RKClient that suspended it. Queues are now also properties on a per-client and per-request basis, so it is easier to segregated parts of your app into different queues. The relationship between RKRequest and RKRequestQueue should be decoupled at some point.
2011-08-18 11:48:37 -04:00
Blake Watters
d81079168c
Expanded rake validate task to build all the example projects. fixes #300
2011-08-16 21:11:21 -04:00
Blake Watters
2e430644d9
Added support for using NSEntityDescription to lookup property types for NSManagedObject attribute and relationships. This enables mapping type transformations on mappings defined against Core Data entities instead of concrete subclasses. fixes #233
2011-08-14 23:21:51 -04:00
Blake Watters
4e03ba7bef
Renamed Polymorphic mapping to dynamic mapping after consulting with the community. Dropped abstract superclass in favor of a RKObjectMappingDefinition protocol. Caught missing cases with dynamic object mapping + targetObject. Updated docs and method signatures to reflect the updates.
2011-07-31 19:37:42 -04:00
Blake Watters
670234b775
Added support for polymorphic object mapping (Github #105 , #244 ). This enables you to dynamically map objects to different destination classes or using different mapping strategies via configuration or callbacks. See Docs/Object Mapping.md for details.
...
Other changes include:
* Eliminated the RKObjectFactory protocol and implementations. Object mapping instances themselves are
now responsible for instantiating target objects for mapping.
* Introduced RKObjectAbstractMapping superclass for RKObjectMapping and RKObjectPolymorphicMapping.
* Updated example applications to use block object loaders (RKTwitter and RKTwitterCoreData)
* Refactored method signatures of RKObjectMapper, RKObjectMapping, and RKObjectMappingProvider to reflect the
existence of abstract mapping types. This was necessary to make polymorphic mappings integrate cleanly.
* Fixed overlap in RestKit error domains between network and object mapping. fixes #208
2011-07-30 16:00:36 -04:00
Evan Cordell
072e1ee58b
Made the appropriate changes to the RestKit project to load NextiveJSON, added record to RKParserRegistry
2011-07-28 18:00:41 -04:00
Evan Cordell
f73888e4a3
Added NextiveJSON as a JSON parser.
2011-07-28 17:53:19 -04:00
Blake Watters
570b13ca07
Updated Object Mapping documentation, added support for inferring object mappings based off of the type of the object used in postObject:, putObject:, etc. Made KVC validation optional.
2011-07-23 23:47:03 -04:00
Blake Watters
d12568580d
Merge pull request #234 from GateGuru/unit-testing-and-queue-fixes
...
Unit testing and queue fixes
2011-07-22 05:15:01 -07:00
Victor Kryukov
c88bb0fa49
Fix RestKit XCode project to reflect recent UISpecRunner changes
2011-07-22 14:27:23 +04:00
Blake Watters
7246afc998
Fixes to enable RestKit Core Data to be easily unit tested from a Unit Testing bundle. Improved thread safety in the request queue and fixed an issue where requests dispatched from background threads would not get callback methods due to thread termination. The request queue now guarantees requests are sent from the main thread.
2011-07-21 11:33:17 -04:00
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