Christopher Swasey
b3c5ba62d2
Replace the XMLParser with one based on Insert-Witty-Name/XMLReader
2012-01-24 12:01:47 -05:00
Blake Watters
a719843c91
Drop the client prefix from the SSL validation properties added to RKRequest
2012-01-24 11:47:31 -05:00
Brian Morton
7174937bb8
Remove duplicate timer creation. Fixes #517 .
2012-01-24 11:10:17 -05:00
Brian Morton
b2c4b2f677
Move RKRequest timeoutTimer creation to a helper method so that we can test the number of times it is invoked.
2012-01-24 11:10:17 -05:00
Blake Watters
9e0149fc0f
Deprecate RKMakePathWithObjectAddingEscapes and cleanup usage within the Router
2012-01-24 09:51:05 -05:00
Christopher Swasey
7ea39690c5
Decouple RKResponse from sharedClient Fixes #430
2012-01-23 18:21:22 -05:00
Jeff Arena
5b9445cef0
Slight refactor of RKObjectPropertyInspector to expose a previously private, instance method as a public, class method, for use in processing transformable attributes in the associated CoreData category. Fixes #498 .
2012-01-23 18:10:06 -05:00
Jeff Arena
7bf04e49ec
Fix memory leaks in newly introduced queue code. Fixes #521 . Fixes #522 .
2012-01-23 17:52:29 -05:00
Brian Morton
b0fd4d4981
Remove duplicate timer creation. Fixes #517 .
2012-01-23 10:33:13 -05:00
Brian Morton
7c84d89bdf
Move RKRequest timeoutTimer creation to a helper method so that we can test the number of times it is invoked.
2012-01-23 10:33:07 -05:00
Jeff Arena
aac9abc0ad
Audit uses of setValue:forKey: in mapping operations and replace with setValue:forKeyPath: where appropriate. Fixes #421 .
2012-01-21 13:11:35 -05:00
Jeff Arena
774f32d7db
Remove use of stringByAppendingPathComponent: in RKURL init so as to handle cases where the resourcePath is longer than 1024 characters (which should never happen). Fixes #321 .
2012-01-20 16:44:10 -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
Jeff Arena
700456c8eb
Add support for serializing NSOrderedSet. Fixes #514 .
2012-01-20 14:27:19 -05:00
Jeff Arena
c0cd23a14d
Add setBody:forMIMEType: method to RKRequest. Fixes #227 .
2012-01-20 14:09:25 -05:00
Christopher Swasey
b1f4e1ffe5
RKObjectMappingOperation#parseDateFromString now transforms string representations of integers into dates as if they were unix timestamps
2012-01-20 12:59:16 -05:00
Jeff Arena
37f40d0d3a
Add cacheTimeoutInterval as a settable property on RKClient and allow RKRequests to inherit the RKClient value when appropriate. Fixes #217
2012-01-20 12:40:50 -05:00
Jeff Arena
53ce2260bd
Fixes #428 , related to a misspelling in the request:didReceiveData:totalBytesReceived:totalBytesExpectedToReceive:
2012-01-20 12:13:40 -05:00
Jeff Arena
db0646ed19
Change NSNumber -> NSDate transformation to use doubleValue instead of intValue to ensure we do not lose precision on date conversion. Fixes #455 .
2012-01-20 11:57:47 -05:00
Jeff Arena
507dfb0cfe
Copy our requestQueue array prior to fast enumeration to ensure no mutations of the underlying array occur while we are looping
2012-01-20 11:52:37 -05:00
Jeff Arena
6e80ae62ae
Fix for #486
2012-01-20 11:45:04 -05:00
Jeff Arena
fa44916184
Merge pull request #505 from spenrose/xml-attributes-bug
...
This fixes a bug where attributes of a object would also get added to parent object.
2012-01-20 08:36:51 -08:00
Jeff Arena
dbb12b37a8
Fix a few issues with broken tests
2012-01-20 11:29:17 -05:00
Blake Watters
5a92a661a8
Fix spelling errors for Cacheing -> Caching
2012-01-20 10:21:56 -05:00
Blake Watters
4b46ada794
Copy the error mapping to the temporary mapping provider to ensure error handling is correct.
2012-01-20 10:21:56 -05:00
Blake Watters
d69adccdd6
Added block callback handlers and tests for RKObjectPaginator.
2012-01-20 10:21:56 -05:00
Blake Watters
1d27f7bbbe
Refactored object manager API's to de-emphasize delegates and removal duplication of blocks and delegates. Added block callbacks to RKObjectLoader.
2012-01-20 10:21:56 -05:00
Blake Watters
4bd12ea987
Apply rootKeyPath within the mapper rather than the object loader
2012-01-20 10:21:19 -05:00
Blake Watters
7c5ad95816
Updated all example projects to reflect changes.
2012-01-20 10:21:19 -05:00
Blake Watters
560032fd6d
Additional documentation and miscellaneous test coverage.
2012-01-20 10:21:19 -05:00
Blake Watters
7a1dfd0857
Added support for selecting object mapping using pattern matching on resourcePath.
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
31dcb31188
Authored full documentation for the RKURL class
2012-01-20 10:21:18 -05:00
Blake Watters
89b02e7550
Refactored paginator to use RKURL rather than relying on its own baseURL and resource path. Expanded paginator documentation.
2012-01-20 10:21:18 -05:00
Blake Watters
415ef5a193
Cleaned up all broken specs related to RKObjectPaginator and RKURL changes
2012-01-20 10:21:18 -05:00
Blake Watters
412b0f9756
Work in progress on cleanup
2012-01-20 10:21:18 -05:00
Ray Fix
8ac6f66f99
Add an assert to prevent weird errors.
2012-01-20 10:21:18 -05:00
Ray Fix
ab3ec5495f
Leaks brought to my attention by the static analyzer.
2012-01-20 10:21:18 -05:00
Ray Fix
3d03959d06
Polish RKObjectPaginator.
...
Initialization
I need the object paginator's object loaders to
know about the various header settings of
the RKClient when it constructs them. However,
the paginator should not depend on an RKObjectManager.
The proposed solution is to pass a block that lets
an outsider custom configure the object loaders
that get created. The object manager shows how
it is done.
Error Handling
We don't want to have a separate set of error handling
if using a paginator versus using an RKObjectLoader.
When an error is encountered, the paginator should
allow access to the underlying RKObjectRequest that
produced the error.
Cleanup
The contained object loader needs to nil out the delegate
before going away.
NSLogs changed to RKLog
Pagination computation
The page count can be computed when the pagination
parameters are mapped. Note you must use the ceil
operation to compute this value. If there are 3.1 pages
that means there are 4 pages.
2012-01-20 10:21:18 -05:00
Blake Watters
fb41eb73ec
Work in progress on responsibility cleanup
2012-01-20 10:21:18 -05:00
Blake Watters
254553dc7c
Initial implementation of RKObjectPaginator
2012-01-20 10:21:18 -05:00
Marlon Andrade
377d350259
adding treatment for dates before jan 1st 1970
2012-01-20 09:36:22 -05:00
Brian Morton
035e7732b8
Add RKRequestConnectionTimeoutError to throw when our connection timeout has been exceeded.
2012-01-20 09:20:09 -05:00
Brian Morton
90716335f5
Add support for timing out an RKRequest via a timeoutTimer and a timeout property.
...
* Add timeoutInterval property on RKRequest with a default value of 120.0
* Add timeout method that is called by the timer when the timeout interval has been exceeded to cancel the request and return an error via didFailLoadWithError:
* Add invalidateTimeoutTimer method that is called by RKResponse when the NSURLConnection begins receiving data.
* Add call to invalidateTimeoutTimer in RKRequest cancelAndInformDelegate: so we don't have a dangling timer.
* Add timer creation to sendAsynchronously and sendSynchronously
2012-01-20 09:19:45 -05:00
Brian Morton
8051fbd9ab
Invalidate the RKRequest timer in RKResponse when the NSURLConnection begins receiving data.
2012-01-20 09:17:26 -05:00
Brian Morton
8946f4d702
Add timeoutInterval property to RKClient so that it can be passed on to RKRequest.
2012-01-20 09:17:16 -05:00
Brian Morton
dab403a9c1
Responsibly invalidate the timeoutTimer when the RKRequest is deallocated. Move location of timer creation for asynchronous request.
2012-01-20 09:17:00 -05:00
Brian Morton
15d05f1493
Move the invalidateTimeoutTimer call in RKResponse from didReceiveData to didReceiveResponse and didFailWithError so we are sure its always called and as early as possible.
2012-01-20 09:15:35 -05:00
Scott Penrose
c6fd924b73
This fixes a bug where attributes of a object would also get added to parent object.
...
XML to parse
```
<exchange_rate type="XML_RATE_TYPE_EBNK_MIDDLE" valid_from="2011-08-03 00:00:00.0">
<currency name="AUD" quota="1" rate="18.416"/>
<currency name="HRK" quota="1" rate="3.25017"/>
<currency name="DKK" quota="1" rate="3.251"/>
</exchange_rate>
```
BEFORE FIX
```
<CFBasicHash 0xab93140 [0x520b38]>{type = mutable dict, count = 1,
entries =>
0 : <CFString 0xabacac0 [0x520b38]>{contents = "exchange_rate"} = <CFBasicHash 0xaba99e0 [0x520b38]>{type = mutable dict, count = 6,
entries =>
0 : <CFString 0xabc1e40 [0x520b38]>{contents = "currency"} = (
{
name = AUD;
quota = 1;
rate = "18.416";
},
{
name = HRK;
quota = 1;
rate = "3.25017";
},
{
name = DKK;
quota = 1;
rate = "3.251";
}
)
1 : <CFString 0xaba9940 [0x520b38]>{contents = "name"} = <CFString 0xaba9960 [0x520b38]>{contents = "DKK"}
2 : <CFString 0xaba9990 [0x520b38]>{contents = "rate"} = <CFString 0xaba99c0 [0x520b38]>{contents = "3.251"}
3 : <CFString 0xaba9980 [0x520b38]>{contents = "quota"} = <CFString 0xaba99a0 [0x520b38]>{contents = "1"}
4 : <CFString 0xab93180 [0x520b38]>{contents = "type"} = <CFString 0xab931b0 [0x520b38]>{contents = "XML_RATE_TYPE_EBNK_MIDDLE"}
5 : <CFString 0xab93190 [0x520b38]>{contents = "valid_from"} = <CFString 0xab93220 [0x520b38]>{contents = "2011-08-03 00:00:00.0"}
}
}
```
AFTER FIX
```
<CFBasicHash 0xa689830 [0x520b38]>{type = mutable dict, count = 1,
entries =>
0 : <CFString 0xa6816a0 [0x520b38]>{contents = "exchange_rate"} = <CFBasicHash 0xa6897c0 [0x520b38]>{type = mutable dict, count = 3,
entries =>
0 : <CFString 0xa692100 [0x520b38]>{contents = "valid_from"} = <CFString 0xa692190 [0x520b38]>{contents = "2011-08-03 00:00:00.0"}
1 : <CFString 0xa680860 [0x520b38]>{contents = "currency"} = (
{
name = AUD;
quota = 1;
rate = "18.416";
},
{
name = HRK;
quota = 1;
rate = "3.25017";
},
{
name = DKK;
quota = 1;
rate = "3.251";
}
)
2 : <CFString 0xa6920f0 [0x520b38]>{contents = "type"} = <CFString 0xa692120 [0x520b38]>{contents = "XML_RATE_TYPE_EBNK_MIDDLE"}
}
}
```
2012-01-14 17:12:17 -05:00