Blake Watters
2d281e60d3
Investigated issues surrounding inability to change HTTP AUTH credentials thoroughly. fixes #250 , #237 , #127
...
These issues has been open for some time. I have added thorough unit test coverage
for scenarios of mutating the HTTP AUTH credentials on the RKClient and on individual
RKRequest instances. Everything seems to work fine.
Also added RKAuthenticationExample to RKCatalog for testing. Needs to be updated with
support for using OAuth.
2011-09-27 23:59:06 -04:00
Blake Watters
eb887e38c6
Refactored OAuth support for merge into master. fixes #84 , #211
...
Cleaned up @rodchile's excellent work integration OAuth 1.0 and 2.0 into RestKit. Changes
are as follows:
* Introduced new RKRequestAuthenticationType to replace the forceBasicAuthentication and other
methods for influencing how authorization works.
* Moved TDOAuth code into Vendor/
* Renamed authorization code flow classes and delegate methods for clarity.
2011-09-20 15:52:17 -04:00
Blake Watters
144533cdd5
Renamed RKObjectDynamicMapping to RKDynamicObjectMapping to better mesh with Cocoa idioms. fixes #354
...
The old class name has been aliased for backwards compatibility.
2011-09-20 13:18:09 -04:00
Blake Watters
0c96aedc85
Fix use of reserved 'class' keyword that breaks import into Objective-C++. fixes #355
...
Added basic spec file that imports the public headers into an Objective-C++ source file.
2011-09-20 13:04:29 -04:00
Blake Watters
e535f3abf0
Removed unnecessary InflectionSupport
2011-09-20 12:36:39 -04:00
Blake Watters
70c73f2981
Fixed issue with order dependence in Core Data connections. fixes #173
...
Since OM 2.0 connection of relationships happened during the object mapping operation
instead of aggregately at the end of the process. In this commit, we have introduced a lightweight
queue for deferring portions of the mapping operation until a larger aggregate mapping has completed.
The changes are as follows:
* Introduced RKMappingOperationQueue for queueing portions of mapping. This is a synchronous queue modeled off
of NSOperationQueue that does NOT use threading (for Core Data friendliness).
* RKObjectMappingOperation now has a RKMappingOperationQueue queue property that defaults to nil
* RKObjectMappingOperation instances built via RKObjectMapper will has a mapping operation queue
assigned to the property.
* If a queue is present, RKManagedObjectMappingOperation will use it to defer the connection of relationships.
* At the end of an RKObjectMapper process, the mapping operation queue used by all mapping operations created
during the process will be executed. This allows all relationships to be connected after all object creation
has completed.
The queue is general purpose, though currently only used for the connection of relationships.
2011-09-20 12:02:50 -04:00
Greg Combs
e33d9e519a
Unfortunately introduced an error while fixing #342 in commit a1b2201 in the RKObjectMappingProvider where retrieving mappings by class was broken, partially, yet passed unit tests. This fixes the bug and covers the gap in the tests.
2011-09-18 21:06:19 -05:00
Björn Jonsson
90ef91e890
Fix of RKObjectMappingOperation does not respect forceCollectionMapping (Issue 341)
...
Includes test cases and fixtures
2011-09-14 22:50:03 +02:00
Greg Combs
9ce25f5689
Added RKDotNetDateFormatter to translate back and forth between NSDate and strings like /Date(1234567890123-0500)/ Also includes header docs and specs. Fixes #264
2011-09-09 03:26:46 -05:00
Greg Combs
e38562ffce
Introduces RKPathMatcher. This is basically a dressed up front end to jverkoey/SOCKit. Using this will make it very easy to do complex things with patterns, resource paths, and object property interpolation thereof. Whereas RKMakePathWithObject() once took parenthesized parameters like "/stuff/(things)" it now uses colons like "/stuff/:things". It has specs and updated header docs where appropriate. Closes #305 .
2011-09-06 15:51:18 -05:00
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