Commit Graph

  • e6e528fcf1 Improved the flexibility of the block loaders significantly by allowing them to override the object mapping and routing selection. Made sendObject:method:delegate:block private and introduced public sendObject:delegate:block method instead. Wrote some basic specs for overriding the router. Blake Watters 2011-07-28 13:54:39 -04:00
  • 1eb6ae24a6 Added objc formatting tag to paragraph in Handling Dynamic Nesting Attributes section pkthor 2011-07-27 20:20:58 -06:00
  • d46dcef8fe RKJSONParserSBJSON serializes itself instead of the object rehos 2011-07-27 21:29:37 +03:00
  • afc6167554 Merge pull request #248 from dhilus/master Blake Watters 2011-07-27 05:44:33 -07:00
  • d5cc021014 Merging SSL certificate validation support from #131 Blake Watters 2011-07-27 08:40:33 -04:00
  • bd29ee038b Added non-underscored class name for NSCFBoolean matches in transformation from Boolean to String Blake Watters 2011-07-27 08:00:15 -04:00
  • 6e87cd5ffd Add missing release for rootKeyPath ivar Blake Watters 2011-07-27 07:59:08 -04:00
  • 1a4191be11 Merge branch 'master' of git://github.com/RestKit/RestKit Cameron Royal 2011-07-27 10:11:29 +08:00
  • 2bdf855fbe finalizeLoad:error: call added in handleResponseError thus avoiding non finalized requests when receiving 40x HTTP response to requests. Rémy SAISSY 2011-07-26 17:45:39 +02:00
  • b9d29b8759 Use the actual class instead of hardcoded RKObjectManager class in objectManagerWithBaseURL: rehos 2011-07-26 16:01:43 +03:00
  • ee5457105e Fix memory leak of mapping provider Blake Watters 2011-07-25 17:58:03 -04:00
  • 32e08d31a6 Fix issues with login/logout on discussion board and show off new block helpers and URL mutation in the DBUser class. fixes #214 Blake Watters 2011-07-24 19:16:16 -04:00
  • 7c6507cacf Update the mutable URL request when switching out the URL or resourcePath Blake Watters 2011-07-24 19:15:45 -04:00
  • 406c5a1f7c Added support for mutating URL and resourcePath on RKRequest and RKObjectLoader. closes #242 Blake Watters 2011-07-24 16:51:19 -04:00
  • 7ac588fccc Added missing bracket Blake Watters 2011-07-24 12:31:54 -04:00
  • a0cb33d391 Updates comments on inferMappingsFromObjectTypes and add documentation to the Object Mapping document. Defaulted it to off as it can complicate things for KVC mappable data. Blake Watters 2011-07-24 12:28:42 -04:00
  • 3a5354c4a0 Added specs around behavior of empty mappable payloads and RKObjectLoaderDelegate invocations. Fixed issue where empty hashes ({}) would result in no delegate methods being invoked. fixes #225 Blake Watters 2011-07-24 01:25:50 -04:00
  • 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. Blake Watters 2011-07-23 23:44:21 -04:00
  • 80366afa84 Added Object Mapping block helpers to RKObjectManager and RKObjectMapping. These enable you to perform ad-hoc object mapping very easily. Extended RKObjectRouter to match on superclasses if no specific route is found. This is helpful when using mocked objects with frameworks like Kiwi. fixes #238 Blake Watters 2011-07-23 23:04:16 -04:00
  • 06e2f6665d Updated testing Doc to use bundle exec Blake Watters 2011-07-22 08:24:20 -04:00
  • d12568580d Merge pull request #234 from GateGuru/unit-testing-and-queue-fixes Blake Watters 2011-07-22 05:15:01 -07:00
  • 611167b968 Merge pull request #236 from victorkryukov/patch-7 Blake Watters 2011-07-22 05:13:02 -07:00
  • c88bb0fa49 Fix RestKit XCode project to reflect recent UISpecRunner changes Victor Kryukov 2011-07-22 14:27:23 +04:00
  • 9990f3ee51 First attempt at recursive implementation of URLEncodedString Cameron Royal 2011-07-22 17:09:42 +08:00
  • 205f1140af Dropped UISpec in favor of slimmed down UISpecRunner extraction. Killed off the submodule to simplify testing. Blake Watters 2011-07-21 22:14:21 -04:00
  • f1b0815e1a Fixes to some violations of the contracts around delegate methods and background threads Blake Watters 2011-07-21 22:01:47 -04:00
  • b778af11d7 Fix for issue where authentication challenges without credentials would cause stream errors when coupled with an RKParams (NSInputStream) based params payload Blake Watters 2011-07-21 21:47:02 -04:00
  • 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. Blake Watters 2011-07-21 11:33:17 -04:00
  • 611ad2199f Merge branch 'master' of github.com:RestKit/RestKit Blake Watters 2011-07-21 11:17:26 -04:00
  • ae29401841 Added specs for zero-length Content-Length header when params is nil or empty Blake Watters 2011-07-20 21:55:10 -04:00
  • 67648a24a0 Merge pull request #213 from victorkryukov/patch-4 Blake Watters 2011-07-20 19:27:10 -07:00
  • bd8bd34895 Replaced slow rm -f && cp copy header approach with more efficient cp. Greatly speeds up rebuilds on large codebases. Blake Watters 2011-07-20 17:25:39 -04:00
  • 443dc6aa4c Really make the headers Public and not just Project. Blake Watters 2011-07-20 08:35:45 -04:00
  • ba8237509d Moved remaining Core Data headers to public so they can be imported easily. Blake Watters 2011-07-20 00:24:20 -04:00
  • fa5232a918 Merge pull request #216 from jwang/patch-1 Blake Watters 2011-07-19 19:59:39 -07:00
  • bc33f3ffb9 README links for submodules updated. John Wang 2011-07-18 00:17:03 -07:00
  • a40dcba0f9 Preserve trailing slash in resource path Victor Kryukov 2011-07-16 18:39:44 +04:00
  • 40eb842dcc Store new objects by lookupValue instead of primaryKeyValue. This avoids creation of duplicated objects the are manufactured by findOrCreateInstanceOfEntity: Blake Watters 2011-07-07 22:40:46 -04:00
  • e31061b561 Re-emphasize not checking the recursive checkbox Blake Watters 2011-07-07 10:22:46 -04:00
  • 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. Blake Watters 2011-07-07 09:53:46 -04:00
  • 6de429051b Merge pull request 196 Blake Watters 2011-07-06 22:09:01 -04:00
  • 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 Blake Watters 2011-07-06 22:01:10 -04:00
  • 42067b9036 Avoid exception from nil errors during object loader error reporting. fixes #191 Blake Watters 2011-07-06 17:04:18 -04:00
  • c7d8d0db3b Fix and test coverage for base URLs containing a path Blake Watters 2011-07-06 15:57:05 -04:00
  • 6376274900 Fixes for URL encoding of paramters in GET request. closes #193 Blake Watters 2011-07-06 15:26:44 -04:00
  • 2b8379cac3 Fix for missing prototype warnings due to not including void in the parameters list for C functions that take no arguments. Blake Watters 2011-07-06 10:10:21 -04:00
  • 82ce444489 Unwind nil behavior introduced in previous commit and add test coverage for asObject behaviors. Blake Watters 2011-07-05 17:22:27 -04:00
  • dddc4c3d0a Fix for crash when coercing an empty object mapping result set into a singular result with asObject. closes #190 Blake Watters 2011-07-05 16:56:34 -04:00
  • e86507f4ed Bug fix for potential invocation of setObject:forKey: with a nil key value Blake Watters 2011-07-05 16:30:16 -04:00
  • 348e86cbc8 Fix for inappropriate suspension of the main queue when using an IP address instead of a hostname. Blake Watters 2011-07-05 16:22:12 -04:00
  • 1014656328 modified README.md to allow the #import lines to be recognized as a code block Gal Steinitz 2011-07-03 23:30:23 -07:00
  • 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 Blake Watters 2011-07-02 15:03:08 -04:00
  • 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. Blake Watters 2011-07-02 11:04:56 -04:00
  • 213ad291b6 Merge branch 'master' of github.com:twotoasters/RestKit Blake Watters 2011-07-02 00:33:02 -04:00
  • 5e8b7e85c3 Updating README Blake Watters 2011-07-01 19:23:05 -04:00
  • c7d5f3e821 Merge pull request #187 from bmctigue/patch-1 Blake Watters 2011-07-01 13:52:51 -07:00
  • f1fdbe96ca Adjusted seed database code so the seed database is saved with the default seed database name. bmctigue 2011-07-01 11:42:24 -07:00
  • aa6102f022 Cleaning up analyzer warnings in the cache Blake Watters 2011-07-01 10:00:18 -04:00
  • bea40036a9 Fixing breakage and log silence on Twitter Core Data seeding example. Blake Watters 2011-07-01 09:25:56 -04:00
  • b24ca81deb Adding an "Ad Hoc" configuration to side-step the Archive build problem. Blake Watters 2011-07-01 07:57:54 -04:00
  • 72f26690ed Fixing crash from over-release of RKParams. Blake Watters 2011-06-30 17:19:12 -04:00
  • a78b4c654d Added special 'App' logging component for logging messages via RKLog() from your app. closes #183 Blake Watters 2011-06-30 15:11:58 -04:00
  • 1c7f90c6ad Added build conditional to ensure RestKit builds for OS X Blake Watters 2011-06-30 13:59:30 -04:00
  • 6f4058749c Updated appledoc binary Blake Watters 2011-06-30 13:59:28 -04:00
  • 3b89382da7 Fix broken test around creation of request serialization Blake Watters 2011-06-30 13:11:31 -04:00
  • ce445a284e fix indentation Jeremy Ellison 2011-06-30 10:46:48 -04:00
  • 8ce9bb83a5 Fix crash when trying to call HTTPBody on params objects that do no respond to it. Solution is to not cache _params objects using HTTPBodyStreams in stead of HTTPBody. Jeremy Ellison 2011-06-29 12:36:18 -04:00
  • eea75bdb3c Allow Timeout caching and ETag caching to play nice with each other. Update the internal cache date when we get a 304 back. Jeremy Ellison 2011-06-28 11:44:55 -04:00
  • 67a6df359d add missing spec module Jeremy Ellison 2011-06-27 12:52:10 -04:00
  • ffe46ffeaa If the RKObjectLoaderTTModel wants to load without Disk cache (TTURLRequestCachePolicyDisk), tell the object loader not to use the RK cache. Jeremy Ellison 2011-06-27 12:51:16 -04:00
  • f98566b837 Implement Timeout Based Caches Jeremy Ellison 2011-06-27 12:39:17 -04:00
  • 16f6f004b5 Merge branch 'master' of github.com:twotoasters/RestKit Blake Watters 2011-06-30 12:53:22 -04:00
  • 403bf29f57 Added helper functions to RKObjectSerializer to map local objects into json Duncan Lewis 2011-06-30 12:28:23 -04:00
  • 42d4849f41 Fixing invalid instantiation of reachability observer Blake Watters 2011-06-30 10:37:37 -04:00
  • 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 Blake Watters 2011-06-30 10:32:44 -04:00
  • 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 Blake Watters 2011-06-30 09:37:53 -04:00
  • e18c1f2811 Merge pull request #181 from dhilus/master Blake Watters 2011-06-30 05:18:13 -07:00
  • 69460fdc4f YAJLGenOptionsIncludeNone -> YAJLGenOptionsIncludeUnsupportedTypes thus enabling NSURL properties to be serialized as string. Rémy SAISSY 2011-06-30 09:40:41 +02:00
  • 2e7adbdc1e Restore the managed object cache functionality and add test coverage so it does not break again. fixes #167 Blake Watters 2011-06-29 22:08:35 -04:00
  • d57b784c30 Don't delete the managed object unless we were responsible for saving it in the first place. closes #125 Blake Watters 2011-06-29 21:04:17 -04:00
  • 5a2f937a52 Reworked notifications for consistency with Cocoa idioms. Simplified code paths through the queue. Tweaked the logging for easier info at the Debug level without having to drop down to Trace. Blake Watters 2011-06-29 16:18:18 -04:00
  • 853704b2fd Rework notifications to allow request queue to observe only the requests it dispatches instead of all of them. Fixes incorrectly decrementing loading count. Blake Watters 2011-06-29 15:36:10 -04:00
  • 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 Blake Watters 2011-06-29 15:07:43 -04:00
  • 41071ad61a Added Key-Value validation checking during object mapping operation. If you return NO it will continue mapping but skip that key path. If you set the error it will error out of object mapping operation. Issue #166 Scott Penrose 2011-06-27 16:27:14 -04:00
  • 4b4d3d1af6 Remove dead RKRailsRouter code. fixes #178 Blake Watters 2011-06-29 14:08:21 -04:00
  • c97af0802b Added new spec for RKURL. Implemented encoding of plus characters. fixes #170 Blake Watters 2011-06-29 13:59:40 -04:00
  • 852d7f1dab Upgrade to LibComponentLogging 1.1.3. closes #163 Blake Watters 2011-06-29 13:43:57 -04:00
  • 93d84bc463 Added comments about cache Blake Watters 2011-06-29 13:42:19 -04:00
  • 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 Blake Watters 2011-06-29 13:28:14 -04:00
  • 537a9d2fd1 Removed NSAssert and added logging about cases in which there is no error object or a collection is coerced into a single result. closes #159 Blake Watters 2011-06-28 19:41:30 -04:00
  • 8fe8e5cc75 Rework queue iteration to use a while loop and maintain a count of dequeued requests to ensure finite iteration. refs #164 Blake Watters 2011-06-28 19:20:17 -04:00
  • 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 Blake Watters 2011-06-28 18:18:49 -04:00
  • b9ceef340e Merge branch 'master' of github.com:twotoasters/RestKit Blake Watters 2011-06-28 15:31:55 -04:00
  • 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 Blake Watters 2011-06-28 15:22:04 -04:00
  • d72ed28000 Merge pull request #176 from hotwoofy/master Blake Watters 2011-06-28 11:42:40 -07:00
  • 851df3bcba Changed signature of willMapData: to allow you to completely replace the mappableData. Blake Watters 2011-06-28 11:46:03 -04:00
  • c982cac037 Retrieve parsers using MIME type, not content type. Thom Lawrence 2011-06-28 15:58:14 +01:00
  • 0949337749 Allow modification of the data in objectLoader:willMapData: by creating a mutable copy of the parsed data if the delegate method is implemented. Blake Watters 2011-06-27 16:37:55 -04:00
  • e4320f7ea9 Added error reporting when RKManagedObjectLoader fails to save the object context. This was silently masking validation failures post-mapping. Blake Watters 2011-06-24 15:59:40 -04:00
  • 5dff3088e2 Added trace logging for Response body Blake Watters 2011-06-24 10:23:54 -04:00