From 7669acf509efcfc30f950540cefb2e4e7125fdb5 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 21 Apr 2014 17:01:49 -0500 Subject: [PATCH 1/2] WIP --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index e914b01b4..d6edacd3b 100644 --- a/README.markdown +++ b/README.markdown @@ -2,7 +2,7 @@ Modern development is highly asynchronous; isn’t it about time iOS developers PromiseKit is not just a Promises implementation, it is also a collection of helper functions that make the typical asynchronous patterns we use in iOS development delightful *too*. -PromiseKit is also designed to be integrated into other CocoaPods. If your library has asyncronous operations and you like PromiseKit, then add an opt-in subspec that provides Promises for your users. HOWTO provided later in this README. +PromiseKit is also designed to be integrated into other CocoaPods. If your library has asynchronous operations and you like PromiseKit, then add an opt-in subspec that provides Promises for your users. Documentation to help you integrate PromiseKit into your own pods is provided later in this README. #Using PromiseKit From da9ffce91491723215bfe289acc5303c75b08c8d Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 22 Apr 2014 08:23:08 +0200 Subject: [PATCH 2/2] Fix string formats --- README.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index d6edacd3b..399d19dee 100644 --- a/README.markdown +++ b/README.markdown @@ -34,7 +34,7 @@ Synchronous code is clean code. For example, showing a gravatar image: ```objc NSString *md5 = md5(email); -NSString *url = [@"http://gravatar.com/avatar/%@" stringByAppendingString:md5]; +NSString *url = [@"http://gravatar.com/avatar/" stringByAppendingString:md5]; NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]]; self.imageView.image = [UIImage imageWithData:data]; ``` @@ -47,7 +47,7 @@ The asynchronous analog suffers from *rightward-drift*: ```objc dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSString *md5 = md5(email); - NSString *url = [@"http://gravatar.com/avatar/%@" stringByAppendingString:md5]; + NSString *url = [@"http://gravatar.com/avatar/" stringByAppendingString:md5]; NSURLRequest *rq = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; [NSURLConnection sendAsynchronousRequest:rq queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { UIImage *gravatarImage = [UIImage imageWithData:data]; @@ -84,7 +84,7 @@ Synchronous code has simple, clean error handling: ```objc @try { NSString *md5 = md5(email); - NSString *url = [@"http://gravatar.com/avatar/%@" stringByAppendingString:md5]; + NSString *url = [@"http://gravatar.com/avatar/" stringByAppendingString:md5]; NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]]; self.imageView.image = [UIImage imageWithData:data]; } @catch (NSError *error) { @@ -102,7 +102,7 @@ void (^errorHandler)(NSError *) = ^(NSError *error){ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ @try { NSString *md5 = md5(email); - NSString *url = [@"http://gravatar.com/avatar/%@" stringByAppendingString:md5]; + NSString *url = [@"http://gravatar.com/avatar/" stringByAppendingString:md5]; NSURLRequest *rq = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; [NSURLConnection sendAsynchronousRequest:rq queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {