Commit Graph

343 Commits

Author SHA1 Message Date
Blake Watters
bc355d69fd Added NSAssert statements to try and prevent accidental configuration of a Three20 model with an object loader that has already been sent. 2011-06-11 20:24:27 -04:00
Blake Watters
69ded29245 Improved Three20 integration by leveraging object mapping to instantiate TTTableItems 2011-06-11 19:33:42 -04:00
Blake Watters
7bf3e0f273 Added support for mapping boolean strings to NSNumber with values t or f in addition to true and false. refs #130 2011-06-11 19:31:21 -04:00
Blake Watters
8be34582a5 Ported DiscussionBoard to new Three20 class structure 2011-06-11 19:31:21 -04:00
Blake Watters
f2ceefa012 Merge Request Queue (See issue #75):
* Introduces RKRequestCache for cacheing responses (supports ETag conditional GET, use cache if available, use cache on error, etc.) closes #75
    * Updates to Three20 layer to eliminate need for intermediary TTTableItem classes closes #76
    * Fixes to ensure iOS 3.x compatability:
        * Switched compiler to Clang
        * Updated conditional checks for UIBackgroundTask symbols to ensure runtime safety on iOS 3.x
        * Removed unnecessary linkage against UIKit and CoreFoundation from library targets
    * Fix for issue where RKRequest objects could become stuck in infinite loop within RKRequestQueue loadNextInQueue if you start
      a request and then cancel immediately. On cancel only decrement loadCount if the request has start loading. refs #122
2011-06-11 19:28:44 -04:00
Blake Watters
9416ad9cf6 Added gcov to specs. Added HTTP Basic Authorization optimization 2011-06-11 19:27:18 -04:00
Blake Watters
f3c0995d5e Implementation of Object Mapping 2.0 design:
* Removed RestKit from inheritance hierarchy
  * Mappings are implemented as concrete classes
  * Mapper is much more flexible & powerful
  * Much more robust error handling
  * Serialization is reimplemented as an object mapping operation
  * Added ability to serialize to JSON natively
  * Reworked Core Data integration
  * Simplified the codebase substantially
2011-06-11 19:26:56 -04:00
Scott Penrose
d6bd24a350 RKRequestQueue loadNextInQueue stuck in infinite loop if you start a request and then cancel immediately. On cancel only decrement loadCount if the request has start loading. This needs to be merged into master #122 2011-05-29 00:52:16 -04:00
Blake Watters
288034e439 Merge pull request #128 from pashields/targetObject_leak
Added release for targetObject to the object loader
2011-05-27 10:55:38 -07:00
Jeremy Ellison
40b7363004 Stop leaking memory in the XML parser (call xmlFree() after xmlNodeGetContent()). 2011-05-27 13:00:23 -04:00
Pat Shields
eecf87e71a Don't leak object passed in to loader. 2011-05-27 12:46:36 -04:00
Blake Watters
e5093a38dd Merge pull request #83 from sixten/0.9-error-handling 2011-05-10 17:58:46 -07:00
Jerry Cheung
4ac85a6cb1 add -(void)prepareURLRequest to RKRequest.h to remove build warning 2011-05-08 15:13:21 -07:00
Blake Watters
4889ff9b5f Removed use of Objective-C block in new serialization code from Andras 2011-05-04 09:59:47 -04:00
Andras Hatvani
d6d92fc6d4 * Implemented relation mapping in RKDynamicRouter
* Added specs covering the functionality
2011-05-04 12:27:50 +02:00
Blake Watters
2c6f8ff8e9 Merge branch '0.9' of github.com:twotoasters/RestKit into 0.9 2011-05-02 21:00:03 -04:00
Blake Watters
4321da03b1 Expanded specs and began migrating all the content for testing out in the Fixtures directory. Fixtures is now the root for the Sinatra app and there are new helpers in RKSpecEnvironment.m. Added specs for several users use cases from the mailing list. Introduced a new warning when attempting to map did not set any properties. 2011-05-02 20:57:18 -04:00
Greg Combs
d780586da4 Deleting persistent store will now permit using a store seed. 2011-05-01 20:49:32 -05:00
Sixten Otto
40c4940ea6 Minor improvements to error handling behavior 2011-04-28 10:38:08 -07:00
Blake Watters
87d0cd13de Added support for registering object class mappings as keyPaths in addition to element names. closes #82 2011-04-28 13:09:50 -04:00
Blake Watters
308b6c5dd2 Updates to RKObjectLoader to fix issues where keyPath was not always respected and willSendForObjectLoader: not invoked as expected. Expanded spec coverage to fix these issues. fixes #80, fixes #81 2011-04-28 00:05:55 -04:00
Blake Watters
a1aa5fce94 Merged pull request #63 from andr8w/target-object-keypath.
Minor changes to use keyPath and willSendWithObjectLoader when a targetObject is set.
2011-04-27 20:02:29 -07:00
Blake Watters
ff2367d284 Moved query path appending to RKPathAppendQueryParams for convenience. Deprecated RKClient flavor. 2011-04-27 09:05:18 -04:00
Blake Watters
dede096d61 Fixed missing semi-colon from warnings cleanup. Added Three20 and RKCatalog to the rake validate task. 2011-04-22 14:45:48 -04:00
Blake Watters
738df05ef5 Initialize file name attachments to an empty string. Fixes #66 2011-04-22 12:08:01 -04:00
Blake Watters
2841d0ba15 Rearrange the notifications to avoid crash during service unavailable condition. fixes #65 2011-04-22 12:06:45 -04:00
Blake Watters
c35d0bab1d Implemented substantial catalog example application covering advanced usage of RestKit:
* Cleaned up remaining warnings about if (self = [super init])
* RKParamsExample - Highlights multi-part uploads
* RKRequestQueueExample - Working with the request queue
* RKBackgroundRequestExample - Examples of using the background policies for backgrounding requests
* RKReachabilityExample - Shows how to work with the reachability observer
* RKRelationshipMappingExample - Shows how to map related objects from JSON into an object graph
* RKCoreDataExample - Shows the basics of using RestKit's Core Data examples

Also rearranged dispatch of RKRequest delegate method for didStartLoad: to ensure requeue callbacks get invoked in a timely manner. refs #62
2011-04-22 11:28:56 -04:00
Andrew Newdel
e277e636f8 Add a modified handleTargetObject implementation from RKManagedObjectLoader to give RKObject a chance to respond to willSendWithObjectLoader. 2011-04-21 19:32:29 -04:00
Andrew Newdel
bbce5abfd4 Use the keyPath property to map a subset of the response for a single target object. 2011-04-21 19:24:41 -04:00
Blake Watters
acf7352b40 Added support for mapping an array of objects when given a target object class and element registration is being used as well. fixes #60 2011-04-20 16:17:00 -04:00
Blake Watters
f55073ecce Merge branch 'master' of https://github.com/Vossy/RestKit into 59-url-mapping-support 2011-04-20 08:29:00 -04:00
Justin Voss
952096b289 Added support for mapping NSURL properties. Fixes #52 2011-04-19 19:14:52 -05:00
Blake Watters
71f392acc5 Added note about portions extracted from Apple's Reachability sample 2011-04-19 15:41:56 -04:00
Robert McNally
b7df8e1f0a Eliminate use of 'class' in method signatures. It is a reserved word in Objective-C++. Replaced with 'objectClass'. fixes #58 2011-04-19 14:22:04 -04:00
Blake Watters
1437026e43 Fail out build process when run_command encounters non-zero exit status. Fixed OS X compile issues introduced by automatic network activity indicator. refs #57 2011-04-19 13:13:34 -04:00
Blake Watters
381ccadbe2 Added support for spinning the Network activity indicator when busy 2011-04-19 09:59:57 -04:00
Blake Watters
7837e245d9 Implemented support and tests for queue processing delegate methods. 2011-04-19 09:38:25 -04:00
Chad Podoski
f44abbee27 Generalize RKRequestQueue and add NSDecimalNumber type support to RKObjectMapper. refs #50 2011-04-18 17:21:01 -04:00
Blake Watters
695c262d6e Added Appledoc markup to RKClient 2011-04-14 22:57:42 -04:00
Blake Watters
9af6a59c79 Initial implementation of documentation generation using the Appledoc parser. refs #48
* Cleaned up various mismatches in method signatures that were preventing documentation generation
* Removed naked ampersands from comments as they cause XML parser failures during docset generation via appledoc
2011-04-14 22:55:58 -04:00
Blake Watters
7d85a2bf4d Added specs and fix for requests not being fire when background policy is requeue or cancel. Fixes gh-45 2011-04-14 13:44:26 -04:00
Blake Watters
9593612aab Closes gh-47. Initial implementation of OS X build integrating changes submitted by Felix Holmgren (https://github.com/Felixyz/RestKit).
* Factored out display of alerts into RKAlert interface that hides the differences between UIKit and OS X Cocoa.
* Added macosx to supported platforms to enable build on OS X.
* Configured project to use conditional architectures to enable building on OS X and iOS from the same targets.
* Implemented a bare-bones OS X example app.
* Create `rake build` task for building RestKit against iOS and OS X SDK for quick testing.
2011-04-12 21:02:25 -04:00
Sixten Otto
cef335d02b Allow storage in non-Documents directories
Add a new class method that takes a directory parameter, and add a corresponding parameter to the private initializer. The other class methods pass nil for that new parameter. The value for the pathToStoreFile property is now calculated in the initializer, and stored in an instance variable.
2011-04-12 20:02:48 -04:00
Sixten Otto
ecb0a5bd5e Improve RKManagedObjectStore's error handling
Add RKManagedObjectStoreDelegate protocol and a delegate property. Right now, all of the notifications are of errors/failures. Some code has been restructured so that return values are always consulted BEFORE the error parameter is examined.
2011-04-12 20:02:37 -04:00
Blake Watters
9dcd7f3022 Removed superclass call to didFinishLoad: in RKObjectLoader. Was resulting in duplicated dispatch of life-cycle requests. Fixes #44 2011-04-12 19:11:31 -04:00
Peter Marks
35171084d1 [Story #11961455] Implements support for sending nested objects back to the remote server for processing:
* Introduce RKObjectMappable#relationshipsToSerialize to define nested relationships to post
* New helper methods for working with relationship serializations.
* Extended Rails router to serialize nested objects according to Rails idioms
2011-04-05 22:18:10 -04:00
Blake Watters
a648d26460 [#11477593] Implemented background request policies and Specs. This provides functionality for continuing a request in the background using an iOS background task.
Introduces four modes for handling background requests:
* RKRequestBackgroundPolicyNone - The default behavior replicating pre-background behavior. No special action is taken with regards to backgrounding.
* RKRequestBackgroundPolicyCancel - On transition to the background, requests with this policy set will be cancelled automatically and the delegate informed.
* RKRequestBackgroundPolicyContinue - Requests with this policy will be continued in the background after the app has been transitioned.
* RKRequestBackgroundPolicyRequeue - Requests with this policy will be cancelled and then immediately placed onto the queue for processing the next time the app is returned to the foreground.
2011-04-05 13:06:06 -04:00
Blake Watters
7589060e6d Merge branch '0.9' of github.com:twotoasters/RestKit into 0.9 2011-04-05 10:06:43 -04:00
Jeremy Ellison
322599e14a Updates from development of Go Try It On v2.0:
* Updates YAJL Parser not to raise an exception and crash when it encounters invalid JSON. The other parsers need to be aligned with this behavior and the delegate methods updated. See Pivotal Story: https://www.pivotaltracker.com/story/show/11925617
* Added requestDidCancel: delegate invocation for tracking cancellation of requests.
* Ensure that the request queue timer is cleared during indeterminate deferral of request loads.
2011-04-05 10:02:34 -04:00
Blake Watters
c23eac631d remove unconnected timeout constant 2011-04-04 19:43:21 -04:00