Commit Graph

230 Commits

Author SHA1 Message Date
Blake Watters
c2e8932cfa Simplified to a single header search path 2012-02-13 14:32:47 -05:00
Blake Watters
b0957d5da6 Eliminated rsync of headers in favor of Three20 style header search paths.
Due to issues related to archive builds and flakiness with configurations other
than Debug and Release, it is impossible to use the automatic include/ build path
to avoid adding header search paths. Switching to requiring a fixed set is simpler
and eliminates the need for the rsync process.
2012-02-13 13:27:22 -05:00
Blake Watters
4142ffdb42 Reorganization and cleanups of Unit Tests
* Reorganized tests to accommodate split into Logic & Application.
* Eliminated 'Spec' naming in favor of 'Test' as the suite is entirely based on SenTest.
* Pulled majority of testing support classes up into the library and documented them.
* Introduced RKApplicationTests app for running the RKTableController UI tests
2012-02-10 17:32:23 -05:00
Blake Watters
8dbd2e8ef0 Cleanup missing files in project 2012-02-10 16:30:59 -05:00
Blake Watters
3d0f0ab39e Introduced the RKTableController component for iOS.
RKTableController provides a flexible, integrated system for driving iOS table views using
the RestKit object mapping engine. Local domain objects can be mapped into table cells within a
collection or presented for editing as part of a form. There are three flavors of table controllers
available:

* Static Tables: RKTableController can be used to render simple static tables that are composed of RKTableItems
presented in RKTableSections. Table items can quickly be built and added to a table without a backing model
or can have content object mapped into them for presentation.
* Network Tables: RKTableController can also render a table with the results of a network load. The typical use
case here is to have RestKit retrieve a JSON/XML payload from your remote system and then render the content into
a table.
* Core Data Tables: RKFetchedResultsTableController can efficiently drive a table view using objects pulled from a
Core Data managed object context. Typical use-cases here are for the presentation of large collections that are
pulled from a remote system, offering offline access, or speeding up a UI by using Core Data as a fast local cache.

RKTableController supports a number of bells and whistles including integrated searching/filtering and pull to refresh.
2012-02-10 16:30:54 -05:00
Blake Watters
e169cbca3d Migrated new files into Public/ headers for Framework target 2012-02-07 18:04:57 -05:00
Christopher Swasey
b3c5ba62d2 Replace the XMLParser with one based on Insert-Witty-Name/XMLReader 2012-01-24 12:01:47 -05:00
Jeff Arena
86c87cfc96 Add a broken unit test demonstrating the issue described in #481. 2012-01-21 12:51:04 -05:00
Jeff Arena
1c32bd4275 Add test to ensure RKManagedObjectMappings are properly returned from RKDynamicObjectMappings. Appears to refute the bug assertions made in #457. 2012-01-20 17:04:43 -05:00
Christopher Swasey
886ec75283 Import http://boredzo.org/iso8601parser/ and add it as a defaultDateFormatter for parsing ISO8601 strings. Fixes #438 2012-01-20 15:13:45 -05:00
Blake Watters
7c5ad95816 Updated all example projects to reflect changes. 2012-01-20 10:21:19 -05:00
Blake Watters
3a8221aa08 Added support for configuring and retrieving object mapping via resource path patterns. 2012-01-20 10:21:19 -05:00
Blake Watters
6abbb34ef0 Introduced mapping contexts support.
Extended RKObjectMappingProvider to store collections of object mappings for different use cases. The framework
now stores object mappings, serialization mappings, an error mapping and a pagination mapping using the context
support. Contexts can be added to the provider via method calls or extension via a category.
2012-01-20 10:21:19 -05:00
Blake Watters
412b0f9756 Work in progress on cleanup 2012-01-20 10:21:18 -05:00
Ray Fix
b56d7ff661 Make RKObjectPaginator.h public
Without this change I was having trouble using it
in my super project.
2012-01-20 10:21:18 -05:00
Blake Watters
254553dc7c Initial implementation of RKObjectPaginator 2012-01-20 10:21:18 -05:00
Blake Watters
8363d35e30 Remove 'file' from Specs/Uploads group. This is a test asset that should not be part of the project. 2012-01-09 21:33:13 -05:00
Blake Watters
15d291bc52 Moved OS X headers to Public/ and updated README.md 2011-12-09 09:50:46 -05:00
Blake Watters
4a45a15da1 Fixed nearly all broken tests for OS X target 2011-12-09 00:30:34 -05:00
Blake Watters
ec13fb03bd Restore copying of headers to Build/RestKit 2011-12-02 09:45:13 -05:00
Blake Watters
19b1cd03f8 Fixed archs for iOS device target 2011-12-02 09:26:37 -05:00
Blake Watters
563f5e909b Updated all example projects to build against the new project. Cleaned up header imports for flattened project structure 2011-12-02 09:26:36 -05:00
Blake Watters
f5008ff9fe Cleaned up broken specs for iOS. 2011-12-02 09:26:35 -05:00
Blake Watters
5b718890ac Checking in work in progress on the library reorganization 2011-12-02 09:26:35 -05:00
Blake Watters
0763821036 Merge pull request #414 from marcopg/master
Explicitly build for arm6/7 only with the iphoneos sdk
2011-10-21 14:17:57 -07:00
Blake Watters
926b0aa259 Added YAJL API headers to Public section of target 2011-10-21 16:41:51 -04:00
Marco Pesenti Gritti
6964c2d318 Explicitly build for arm6/7 only with the iphoneos sdk
When building for the iphonesimulator sdk we still want i386. Without
this change, when building from the command line, xcode is failing
to autotodect the dependency of the application project on the RestKit
project in a workspace.
2011-10-19 15:50:31 +01:00
Blake Watters
eb9dec5953 Replaced TDOAuth with GCOAuth. fixes #407 2011-10-18 23:51:49 -04:00
Blake Watters
9624335f69 Updated YAJL-ObjC. fixes #406 2011-10-14 00:17:01 -04:00
Blake Watters
362d46e888 Moving compilers to clang 2011-10-13 23:51:16 -04:00
Blake Watters
214efd31d5 Fix issue with incorrectly built OAuth 1.0 invocation of TDOAuth. fixes #396
Began cleanup of some category methods to eliminate duplicated functionality across the library.
2011-10-12 09:55:38 -04:00
Blake Watters
be38c8a9a8 Updated project file to explicitly build for armv6 and arm7. fixes #394, closes #395
In iOS 5, Apple has removed armv6 from $ARCHS_STANDARD_32_BIT. This can
result in RestKit being built against armv7 only when you are really trying
to build against the iOS 5 SDK, be deploy to 4.x devices. App store validation
will fail in these situations.
2011-10-11 17:55:37 -04:00
Blake Watters
d94fcf665d Added sanity check that relationship mapping is not targeting a collection of collections. fixes #386
This can happen when using keyPaths to traverse an object graph and is hard to anticipate when
defining mappings. RestKit will now perform a sanity check before recursively performing
relationship object mapping operation and will log a warning if the relationship targets
a collection containing another collection. At the debug logging level, RestKit will log

The fix for such scenarios is to use KVC collection operators (such as @unionOfObjects,
@unionOfArrays, etc.) to flatten the collection out into a collection of dictionaries.
2011-10-01 11:52:51 -04:00
OpenThread
f894226908 Implemented full support for generation of cache keys on RKParams. fixes #272
* Builds on work started by @OpenFibers.
* Should eliminate all cache warnings.
* Added FileMD5Hash library for efficiently computing MD5 for files
* Extended RKParams to return composite MD5 for all attachments
* Implemented MD5 method on each RKParamsAttachment instance
* Updated RKRequest to utilize new MD5 sums and enabled cache keys for RKParams
2011-09-28 23:20:26 -04:00
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