Commit Graph

91 Commits

Author SHA1 Message Date
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
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
Sixten Otto
40c4940ea6 Minor improvements to error handling behavior 2011-04-28 10:38:08 -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
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
Blake Watters
71f392acc5 Added note about portions extracted from Apple's Reachability sample 2011-04-19 15:41:56 -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
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
Blake Watters
c90ec2770d Finished cleanup of HTTP AUTH and XML Support. Ready to tag 0.9.1 2011-03-28 23:29:06 -04:00
Blake Watters
5411f54d02 Implemented lightweight authentication scheme setup. Enables HTTP Digest AUTH 2011-03-27 01:19:37 -04:00
Jeff Arena
797904d5a1 use copy of requests array when use fast enumeration in loadNextInQueue; add autorelease pools to methods that copy the request array to ensure we immediately clean up our copies upon completion 2011-03-23 08:33:33 -07:00
Blake Watters
483df33a37 Merge branch 'twotoasters_0.9' of https://github.com/GateGuru/RestKit into GateGuru-twotoasters_0.9 2011-03-19 22:52:07 -04:00
Blake Watters
88a1b013fc Merge remote branch 'origin/0.9' into core-data-cleanup
Conflicts:
	Code/CoreData/CoreData.h
	Code/CoreData/RKManagedObjectStore.h
	Code/CoreData/RKManagedObjectStore.m
	Code/CoreData/RKObjectSeeder.h
	Code/CoreData/RKObjectSeeder.m
	Code/ObjectMapping/RKObjectLoader.m
	Code/ObjectMapping/RKObjectManager.m
	Code/ObjectMapping/RKObjectMapper.m
	RestKit.xcodeproj/project.pbxproj
2011-03-19 21:26:13 -04:00
Jeff Arena
30b7c0d5d9 removed schedule/unschedule of reachability observer based on application active/inactive notifications 2011-03-17 17:53:18 -07:00
Blake Watters
779f3befb7 Merge Kevin Lord's patch for ignoring request body on a GET request 2011-03-09 15:34:01 -05:00
Blake Watters
5b1c5dae7e Inform the delegate on synchronous requests 2011-03-08 11:36:31 -05:00
Blake Watters
e03c6d3d10 Fixed crash during dealloc of RKClient due to initialization of baseURL observer using a blank host. Updated the object mapper to support class/keypath when loading a single object. Some updates to the UISpec harness to get things working again. 2011-02-25 14:42:50 -05:00
Blake Watters
c495073497 Merge branch 'master' of github.com:twotoasters/RestKit into core-data-cleanup
Conflicts:
	.gitignore
2011-02-21 20:25:01 -05:00
Blake Watters
bf48cf6559 More Xcode 4 crap 2011-02-15 20:25:22 -05:00
Blake Watters
2aec89b14c More cleanups. Have a bug in the refactored object loader 2011-02-13 03:33:37 -05:00
Blake Watters
0ea0a9b6d9 Cleaning up some TODO's and such 2011-02-13 02:59:37 -05:00
Blake Watters
44e424850a Ooops. Use the IP from the hostname rather than the local wireless interface 2011-02-01 19:38:11 -05:00
Blake Watters
bff66e60cc Fixed bug where reachability did not work when initialized with an IP address in the base URL 2011-02-01 19:30:07 -05:00
daniel
20747ffa27 Merge branch 'master' of github.com:twotoasters/RestKit into new-example 2011-01-21 14:54:40 -05:00
Blake Watters
bf1cadc72e Implemented RKMakePathWithObject. Cleaned up some TODO's 2011-01-20 11:24:47 -05:00
Blake Watters
8f863b4c50 Numerous cleanups to the DiscussionBoard example. Need to finish working through cleanups to the authentication process and polish off documentation. Should be ready for merge tomorrow night. 2011-01-18 23:25:19 -05:00
Blake Watters
319f7355af Working on new example 2011-01-16 21:43:21 -05:00
Jeremy Ellison
7177c88182 rename internal didStartLoading method name 2011-01-12 15:27:45 -05:00
Jeremy Ellison
6a5ee2af7e Revert "Remove per-file copyrights"
This reverts commit 91e7c6bb5e.
2011-01-12 15:27:19 -05:00
Jeremy Ellison
91e7c6bb5e Remove per-file copyrights 2011-01-12 15:05:22 -05:00
Jeremy Ellison
634185f48a RKResponse should start loading on didReceiveData: or didSendBodyData, whichever is called first.
This prevents didSendData RKRequestDelegate method from being called before didStartLoading.

Remove goOffline and goOnline support from RKObjectManager. This did not work in the current implementation.
2011-01-12 13:20:26 -05:00
Jeff Arena
d3a1059d68 fix bug with content type accessors in cases where the content type response header is nil 2011-01-10 16:10:30 -08:00
Blake Watters
35ae5c8717 Updated signatures to include RKRequestDelegate protocol 2011-01-10 16:29:58 -05:00