Skip to content
Browse files

Moving towards a more framework-ish way.

This commit adds two new classes and a new protocol:

* TKPostsRequest: Responsible for retrieve and parse Tumblr posts, based on options passed.
* TKPostsResponse: Response created by TKPostsRequest after it successfully retrieved and parsed Tumblr posts.
* TKPostsRequestDelegate: Protocol a class should implement to be a TKPostsRequest delegate.
  • Loading branch information...
1 parent 3293242 commit 207be2daa9b4c202f8a9895342ec731240a0df88 @isutton committed
View
58 TKPostsRequest.h
@@ -0,0 +1,58 @@
+//
+// Copyright (c) 2011 TumblrKit
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+#import "TKRequest.h"
+
+@class TKPostsRequest;
+@class TKPostsResponse;
+@class TKPost;
+
+@protocol TKPostsRequestDelegate <NSObject>
+
+- (void)postsRequest:(TKPostsRequest *)request didReceiveResponse:(TKPostsResponse *)response;
+- (void)postsRequest:(TKPostsRequest *)request didFailWithError:(NSError *)error;
+
+@end
+
+@interface TKPostsRequest : TKRequest <NSXMLParserDelegate>
+{
+ @private
+ NSDictionary *_options;
+ NSMutableArray *_receivedPosts;
+ NSXMLParser *_parser;
+ NSString *_currentElementName;
+ TKPost *_currentPost;
+}
+
+#pragma mark - API
+
+@property (nonatomic, assign) id<TKPostsRequestDelegate> delegate;
+@property (readonly) NSDictionary *options;
+
+- (id)initWithOptions:(NSDictionary *)options delegate:(id<TKPostsRequestDelegate>)delegate;
+
+@end
+
+extern NSString *TKPostsRequestDomainKey;
+extern NSString *TKPostsRequestPostIDKey;
+extern NSString *TKPostsRequestStartAtIndexKey;
+extern NSString *TKPostsRequestNumberOfPostsKey;
View
146 TKPostsRequest.m
@@ -0,0 +1,146 @@
+//
+// Copyright (c) 2011 TumblrKit
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+#import "TKPostsRequest.h"
+#import "TKPostsResponse.h"
+#import "TKPost.h"
+
+@implementation TKPostsRequest
+
+@synthesize delegate = _delegate;
+
+#pragma mark - NSObject
+
+- (void)dealloc;
+{
+ [_receivedPosts release]; _receivedPosts = nil;
+ [_options release]; _options = nil;
+ [_parser release]; _parser = nil;
+ [super dealloc];
+}
+
+#pragma mark - NSXMLParserDelegate
+
+- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict;
+{
+ _currentElementName = elementName;
+
+ if ([elementName isEqualToString:@"post"])
+ _currentPost = [[TKPost postWithAttributes:attributeDict] retain];
+}
+
+- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName;
+{
+ if ([elementName isEqualToString:@"post"]) {
+ [_receivedPosts addObject:_currentPost];
+ [_currentPost release];
+ }
+}
+
+- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string;
+{
+ static NSDictionary *elementToSelectorDict = nil;
+
+ if (!elementToSelectorDict) {
+ elementToSelectorDict = [[NSDictionary alloc] initWithObjectsAndKeys:
+ @"appendToText:", @"text",
+ @"appendToCaption:",@"caption",
+ @"appendToPlayer:", @"player",
+ @"appendToBody:", @"body",
+ @"setURLWithString:", @"url",
+ nil];
+ }
+
+ NSString *key = [[_currentElementName componentsSeparatedByString:@"-"] lastObject];
+ SEL selector = NSSelectorFromString([elementToSelectorDict objectForKey:key]);
+ if (selector && [_currentPost respondsToSelector:selector]) {
+ [_currentPost performSelector:selector withObject:string];
+ }
+}
+
+- (void)parserDidEndDocument:(NSXMLParser *)parser;
+{
+ [_currentPost release]; _currentPost = nil;
+ TKPostsResponse *response = [[[TKPostsResponse alloc] initWithPosts:_receivedPosts] autorelease];
+ [self.delegate postsRequest:self didReceiveResponse:response];
+}
+
+#pragma mark - TKRequest
+
+- (NSURL *)URL;
+{
+ NSMutableDictionary *options = [_options mutableCopy];
+ NSString *domain = [options objectForKey:TKPostsRequestDomainKey];
+ [options removeObjectForKey:TKPostsRequestDomainKey];
+ NSMutableString *URLString = [NSMutableString stringWithFormat:@"http://%@/api/read?", domain];
+
+ NSMutableArray *queryStringArray = [NSMutableArray array];
+ for (NSString *key in [options allKeys]) {
+ NSString *value = [options objectForKey:key];
+ [queryStringArray addObject:[NSString stringWithFormat:@"%@=%@", key, value]];
+ }
+
+ [URLString appendString:[queryStringArray componentsJoinedByString:@"&"]];
+ NSURL *URL = [NSURL URLWithString:URLString];
+ return URL;
+}
+
+- (void)connectionDidFinishLoadingData:(NSData *)data;
+{
+ _parser = [[NSXMLParser alloc] initWithData:data];
+ [_parser setDelegate:self];
+ [_parser parse];
+}
+
+- (void)connectionDidFailWithError:(NSError *)error;
+{
+ [self.delegate postsRequest:self didFailWithError:error];
+}
+
+#pragma mark - API
+
+- (id)initWithOptions:(NSDictionary *)options delegate:(id<TKPostsRequestDelegate>)delegate;
+{
+ if (!(self = [self init]))
+ return nil;
+
+ if (![options objectForKey:TKPostsRequestDomainKey])
+ [NSException raise:@"TKPostsRequestDomainKey is mandatory" format:@"TKPostsRequestDomainKey is mandatory"];
+
+ _receivedPosts = [[NSMutableArray alloc] init];
+ _options = [options retain];
+ _delegate = delegate;
+
+ return self;
+}
+
+- (NSDictionary *)options;
+{
+ return _options;
+}
+
+@end
+
+NSString const * TKPostsRequestDomainKey = @"domain";
+NSString const * TKPostsRequestPostIDKey = @"id";
+NSString const * TKPostsRequestStartAtIndexKey = @"start";
+NSString const * TKPostsRequestNumberOfPostsKey = @"num";
View
31 TKPostsResponse.h
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2011 TumblrKit
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+@interface TKPostsResponse : NSObject
+
+@property (nonatomic, retain) NSArray *posts;
+
+#pragma mark - API
+
+- (id)initWithPosts:(NSArray *)posts;
+
+@end
View
49 TKPostsResponse.m
@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2011 TumblrKit
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+#import "TKPostsResponse.h"
+
+@implementation TKPostsResponse
+
+@synthesize posts = _posts;
+
+#pragma mark - NSObject
+
+- (void)dealloc;
+{
+ [_posts release]; _posts = nil;
+ [super dealloc];
+}
+
+#pragma mark - API
+
+- (id)initWithPosts:(NSArray *)posts;
+{
+ if (!(self = [self init]))
+ return nil;
+
+ _posts = [posts retain];
+
+ return self;
+}
+
+@end
View
47 Test.m → TKRequest.h
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2010, 2011 TumblrKit
+// Copyright (c) 2011 TumblrKit
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -20,31 +20,36 @@
// THE SOFTWARE.
//
-#import <Cocoa/Cocoa.h>
-#import "TKTumblr.h"
-#import "TKTumblrConnection.h"
-#import "TKTumblrRequest.h"
-#import "TKTumblrResponse.h"
+@class TKRequest;
+@protocol TKRequestable <NSObject>
-int main(int argc, char **argv) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+@optional
+- (void)connectionDidFinishLoadingData:(NSData *)data;
+- (void)connectionDidFailWithError:(NSError *)error;
- TKTumblrRequest *req = [[TKTumblrRequest alloc] initWithURL:[NSURL URLWithString:@"http://igorsutton.com"]];
- req.postFilter = TKPostFilterText;
- req.startIndex = 2;
- req.numberOfPosts = 1;
- req.postType = TKPostTypeLink;
+@optional
+- (NSData *)HTTPBody;
- TKTumblrConnection *conn = [[TKTumblrConnection alloc] init];
+@required
+- (NSURL *)URL;
- TKTumblrResponse *res = nil;
- NSError *error = nil;
+@end
- [conn sendSynchronousRequest:req returningResponse:&res error:&error];
+#if TARGET_OS_MAC
+@interface TKRequest : NSObject <TKRequestable,NSURLConnectionDelegate>
+#elif TARGET_OS_IPHONE
+@interface TKRequest : NSObject <TKRequestable,NSURLConnectionDelegate,NSURLConnectionDataDelegate>
+#endif
+{
+ @protected
+ NSURLConnection *_connection;
+ NSMutableData *_receivedData;
+}
- Log(@"%@", res.posts);
- Log(@"%@", [req URLForWrite]);
+#pragma mark - API
- [pool drain];
-}
+- (void)start;
+- (void)cancel;
+
+@end
View
96 TKRequest.m
@@ -0,0 +1,96 @@
+//
+// Copyright (c) 2011 TumblrKit
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+#import "TKRequest.h"
+
+#pragma GCC diagnostic ignored "-Wprotocol"
+
+@implementation TKRequest
+
+#pragma mark - NSObject
+
+- (id)init;
+{
+ if (!(self = [super init]))
+ return nil;
+
+ _receivedData = [[NSMutableData alloc] init];
+
+ return self;
+}
+
+- (void)dealloc;
+{
+ [self cancel];
+ [_receivedData release]; _receivedData = nil;
+ [super dealloc];
+}
+
+#pragma mark - NSURLConnectionDelegate
+
+- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error;
+{
+ [self connectionDidFailWithError:error];
+}
+
+#pragma mark - NSURLConnectionDataDelegate
+
+- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response;
+{
+ NSLog(@"%@", response);
+}
+
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;
+{
+ [_receivedData appendData:data];
+}
+
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection;
+{
+ [self connectionDidFinishLoadingData:_receivedData];
+}
+
+#pragma mark - API
+
+- (void)start;
+{
+ NSAssert(!_connection, @"start can't be called twice without being cancelled.");
+ NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:[self URL]];
+
+ if ([self respondsToSelector:@selector(HTTPBody)]) {
+ theRequest.HTTPMethod = @"POST";
+ theRequest.HTTPBody = self.HTTPBody;
+ }
+ else {
+ theRequest.HTTPMethod = @"GET";
+ }
+
+ _connection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
+}
+
+- (void)cancel;
+{
+ [_connection cancel];
+ [_connection release]; _connection = nil;
+}
+
+@end
View
22 TumblrKit Tests for Mac/TumblrKit Tests for Mac-Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.qiih.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
View
7 TumblrKit Tests for Mac/TumblrKit Tests for Mac-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'TumblrKit Tests for Mac' target in the 'TumblrKit Tests for Mac' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
View
17 TumblrKit Tests for Mac/TumblrKit_Tests_for_Mac.h
@@ -0,0 +1,17 @@
+//
+// TumblrKit_Tests_for_Mac.h
+// TumblrKit Tests for Mac
+//
+// Created by Igor Sutton on 12/14/11.
+// Copyright (c) 2011 igorsutton.com. All rights reserved.
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+#import "TKPostsRequest.h"
+
+@interface TumblrKit_Tests_for_Mac : SenTestCase <TKPostsRequestDelegate>
+{
+ BOOL _testIsDone;
+}
+
+@end
View
112 TumblrKit Tests for Mac/TumblrKit_Tests_for_Mac.m
@@ -0,0 +1,112 @@
+//
+// TumblrKit_Tests_for_Mac.m
+// TumblrKit Tests for Mac
+//
+// Created by Igor Sutton on 12/14/11.
+// Copyright (c) 2011 igorsutton.com. All rights reserved.
+//
+
+#import "TumblrKit_Tests_for_Mac.h"
+#import "TKPost.h"
+#import "TKPostsResponse.h"
+
+@implementation TumblrKit_Tests_for_Mac
+
+- (void)setUp;
+{
+ _testIsDone = NO;
+ [super setUp];
+}
+
+- (void)tearDown;
+{
+ [super tearDown];
+}
+
+- (void)testPostsRequest001;
+{
+ NSMutableDictionary *options = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"tumblrkit-test.tumblr.com", TKPostsRequestDomainKey, nil];
+ TKPostsRequest *request = [[[TKPostsRequest alloc] initWithOptions:options delegate:self] autorelease];
+ STAssertEqualObjects([[request URL] absoluteString], @"http://tumblrkit-test.tumblr.com/api/read?", @"");
+
+ [options setObject:[NSNumber numberWithInt:10] forKey:TKPostsRequestNumberOfPostsKey];
+ request = [[[TKPostsRequest alloc] initWithOptions:options delegate:self] autorelease];
+ STAssertEqualObjects([[request URL] absoluteString], @"http://tumblrkit-test.tumblr.com/api/read?num=10", nil);
+
+ [options setObject:[NSNumber numberWithInt:10] forKey:TKPostsRequestStartAtIndexKey];
+ request = [[[TKPostsRequest alloc] initWithOptions:options delegate:self] autorelease];
+ STAssertEqualObjects([[request URL] absoluteString], @"http://tumblrkit-test.tumblr.com/api/read?num=10&start=10", nil);
+
+ [options setObject:[NSNumber numberWithInt:10] forKey:TKPostsRequestPostIDKey];
+ request = [[[TKPostsRequest alloc] initWithOptions:options delegate:self] autorelease];
+ STAssertEqualObjects([[request URL] absoluteString], @"http://tumblrkit-test.tumblr.com/api/read?num=10&id=10&start=10", nil);
+}
+
+- (void)testPostsRequest002;
+{
+ NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
+ @"tumblrkit-test.tumblr.com", TKPostsRequestDomainKey,
+ [NSNumber numberWithInt:10], TKPostsRequestNumberOfPostsKey,
+ nil];
+ TKPostsRequest *request = [[[TKPostsRequest alloc] initWithOptions:options delegate:self] autorelease];
+ [request start];
+
+ while (!_testIsDone)
+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:1.0]];
+
+}
+
+- (void)testPostsRequest003;
+{
+ NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
+ @"tumblrkit-test.tumblr.com", TKPostsRequestDomainKey,
+ [NSNumber numberWithInt:10], TKPostsRequestNumberOfPostsKey,
+ [NSNumber numberWithInt:5], TKPostsRequestStartAtIndexKey,
+ nil];
+
+ TKPostsRequest *request = [[[TKPostsRequest alloc] initWithOptions:options delegate:self] autorelease];
+ [request start];
+
+ while (!_testIsDone)
+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:1.0]];
+}
+
+- (void)testPostsRequest004;
+{
+ NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
+ @"tumblrkit-test.tumblr.com", TKPostsRequestDomainKey,
+ [NSNumber numberWithLong:8819125974], TKPostsRequestPostIDKey,
+ nil];
+
+ TKPostsRequest *request = [[[TKPostsRequest alloc] initWithOptions:options delegate:self] autorelease];
+ [request start];
+
+ while (!_testIsDone)
+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:1.0]];
+}
+
+#pragma mark - TKPostsRequestDelegate
+
+- (void)postsRequest:(TKPostsRequest *)request didReceiveResponse:(TKPostsResponse *)response;
+{
+ _testIsDone = YES;
+
+ if ([request.options objectForKey:TKPostsRequestNumberOfPostsKey])
+ STAssertEquals([[request.options objectForKey:TKPostsRequestNumberOfPostsKey] intValue], (int)[response.posts count], nil);
+
+ if ([request.options objectForKey:TKPostsRequestPostIDKey]) {
+ STAssertEquals((int)[response.posts count], 1, nil);
+ TKPost *post = [response.posts objectAtIndex:0];
+ NSNumber *postID = [NSNumber numberWithLong:[post.postID longLongValue]];
+ STAssertEquals([request.options objectForKey:TKPostsRequestPostIDKey], postID, nil);
+ }
+}
+
+- (void)postsRequest:(TKPostsRequest *)request didFailWithError:(NSError *)error;
+{
+ _testIsDone = YES;
+
+ STFail(@"%@", error);
+}
+
+@end
View
2 TumblrKit Tests for Mac/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
235 TumblrKit.xcodeproj/project.pbxproj
@@ -26,7 +26,6 @@
8279034F1497E5860018F19E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 827902FF1497E4600018F19E /* Cocoa.framework */; };
827903551497E5860018F19E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 827903531497E5860018F19E /* InfoPlist.strings */; };
827903591497E5860018F19E /* TumblrKit_for_Mac.m in Sources */ = {isa = PBXBuildFile; fileRef = 827903581497E5860018F19E /* TumblrKit_for_Mac.m */; };
- 827E46DE11EB1BDD00684466 /* Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 827E46DD11EB1BDD00684466 /* Test.m */; };
82F798F31497E78A00920028 /* NSDictionary+TumblrKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 82B09F41123664CD0006D003 /* NSDictionary+TumblrKit.m */; };
82F798F41497E78A00920028 /* NSString+TumblrKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 826CD95D11EDDAD600F5CB24 /* NSString+TumblrKit.m */; };
82F798F51497E78A00920028 /* TKPost.m in Sources */ = {isa = PBXBuildFile; fileRef = 827E467711EB0D9100684466 /* TKPost.m */; };
@@ -40,8 +39,33 @@
82F798FE1497E7A400920028 /* TKTumblrReadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 82B0A018123675EF0006D003 /* TKTumblrReadRequest.m */; };
82F798FF1497E7A400920028 /* TKTumblelog.m in Sources */ = {isa = PBXBuildFile; fileRef = 821DE1CE1237D09300B6A45D /* TKTumblelog.m */; };
82F799011497E7E700920028 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 827902F71497E2A90018F19E /* UIKit.framework */; };
+ 82F799051497ED7A00920028 /* TKRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F799031497ED4E00920028 /* TKRequest.m */; };
+ 82F799081497F27300920028 /* TKPostsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 82F799061497F27300920028 /* TKPostsRequest.h */; };
+ 82F799091497F27300920028 /* TKPostsRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 82F799061497F27300920028 /* TKPostsRequest.h */; };
+ 82F7990A1497F27300920028 /* TKPostsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F799071497F27300920028 /* TKPostsRequest.m */; };
+ 82F7990B1497F27300920028 /* TKPostsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F799071497F27300920028 /* TKPostsRequest.m */; };
+ 82F7990F1499244800920028 /* TKRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F799031497ED4E00920028 /* TKRequest.m */; };
+ 82F79917149924E900920028 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 82F79916149924E900920028 /* SenTestingKit.framework */; };
+ 82F79918149924E900920028 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 827902FF1497E4600018F19E /* Cocoa.framework */; };
+ 82F7991E149924E900920028 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 82F7991C149924E900920028 /* InfoPlist.strings */; };
+ 82F79921149924E900920028 /* TumblrKit_Tests_for_Mac.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F79920149924E900920028 /* TumblrKit_Tests_for_Mac.m */; };
+ 82F799281499266E00920028 /* TumblrKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8279034E1497E5860018F19E /* TumblrKit.framework */; };
+ 82F7992B14992ED100920028 /* TKPostsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 82F7992914992ED100920028 /* TKPostsResponse.h */; };
+ 82F7992C14992ED100920028 /* TKPostsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 82F7992914992ED100920028 /* TKPostsResponse.h */; };
+ 82F7992D14992ED100920028 /* TKPostsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F7992A14992ED100920028 /* TKPostsResponse.m */; };
+ 82F7992E14992ED100920028 /* TKPostsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F7992A14992ED100920028 /* TKPostsResponse.m */; };
/* End PBXBuildFile section */
+/* Begin PBXContainerItemProxy section */
+ 82F79926149924FA00920028 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 8279034D1497E5860018F19E;
+ remoteInfo = "TumblrKit for Mac";
+ };
+/* End PBXContainerItemProxy section */
+
/* Begin PBXFileReference section */
0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -68,8 +92,6 @@
827903581497E5860018F19E /* TumblrKit_for_Mac.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TumblrKit_for_Mac.m; sourceTree = "<group>"; };
827E467611EB0D9100684466 /* TKPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKPost.h; sourceTree = "<group>"; };
827E467711EB0D9100684466 /* TKPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKPost.m; sourceTree = "<group>"; };
- 827E46D611EB1BA000684466 /* Test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Test; sourceTree = BUILT_PRODUCTS_DIR; };
- 827E46DD11EB1BDD00684466 /* Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Test.m; sourceTree = "<group>"; };
82A53DD011ED938C006BA92A /* TKTumblr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKTumblr.h; sourceTree = "<group>"; };
82B09EAF123643A70006D003 /* TKTumblr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKTumblr.m; sourceTree = "<group>"; };
82B09F40123664CD0006D003 /* NSDictionary+TumblrKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+TumblrKit.h"; sourceTree = "<group>"; };
@@ -77,6 +99,19 @@
82B0A017123675EF0006D003 /* TKTumblrReadRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKTumblrReadRequest.h; sourceTree = "<group>"; };
82B0A018123675EF0006D003 /* TKTumblrReadRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKTumblrReadRequest.m; sourceTree = "<group>"; };
82B0A044123678940006D003 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
+ 82F799021497ED4E00920028 /* TKRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKRequest.h; sourceTree = "<group>"; };
+ 82F799031497ED4E00920028 /* TKRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKRequest.m; sourceTree = "<group>"; };
+ 82F799061497F27300920028 /* TKPostsRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKPostsRequest.h; sourceTree = "<group>"; };
+ 82F799071497F27300920028 /* TKPostsRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKPostsRequest.m; sourceTree = "<group>"; };
+ 82F79915149924E900920028 /* TumblrKit Tests for Mac.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TumblrKit Tests for Mac.octest"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 82F79916149924E900920028 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+ 82F7991B149924E900920028 /* TumblrKit Tests for Mac-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TumblrKit Tests for Mac-Info.plist"; sourceTree = "<group>"; };
+ 82F7991D149924E900920028 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 82F7991F149924E900920028 /* TumblrKit_Tests_for_Mac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TumblrKit_Tests_for_Mac.h; sourceTree = "<group>"; };
+ 82F79920149924E900920028 /* TumblrKit_Tests_for_Mac.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TumblrKit_Tests_for_Mac.m; sourceTree = "<group>"; };
+ 82F79922149924E900920028 /* TumblrKit Tests for Mac-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TumblrKit Tests for Mac-Prefix.pch"; sourceTree = "<group>"; };
+ 82F7992914992ED100920028 /* TKPostsResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKPostsResponse.h; sourceTree = "<group>"; };
+ 82F7992A14992ED100920028 /* TKPostsResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKPostsResponse.m; sourceTree = "<group>"; };
8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -98,10 +133,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 827E46D411EB1BA000684466 /* Frameworks */ = {
+ 82F79911149924E900920028 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 82F79917149924E900920028 /* SenTestingKit.framework in Frameworks */,
+ 82F799281499266E00920028 /* TumblrKit.framework in Frameworks */,
+ 82F79918149924E900920028 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -111,9 +149,9 @@
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
- 827E46D611EB1BA000684466 /* Test */,
8279032A1497E53E0018F19E /* libTumblrKit.a */,
8279034E1497E5860018F19E /* TumblrKit.framework */,
+ 82F79915149924E900920028 /* TumblrKit Tests for Mac.octest */,
);
name = Products;
sourceTree = "<group>";
@@ -127,6 +165,7 @@
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
8279032C1497E53E0018F19E /* TumblrKit for iOS */,
827903501497E5860018F19E /* TumblrKit for Mac */,
+ 82F79919149924E900920028 /* TumblrKit Tests for Mac */,
827902D514979B0C0018F19E /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
);
@@ -165,6 +204,12 @@
82B0A018123675EF0006D003 /* TKTumblrReadRequest.m */,
821DE1CD1237D09300B6A45D /* TKTumblelog.h */,
821DE1CE1237D09300B6A45D /* TKTumblelog.m */,
+ 82F799021497ED4E00920028 /* TKRequest.h */,
+ 82F799031497ED4E00920028 /* TKRequest.m */,
+ 82F799061497F27300920028 /* TKPostsRequest.h */,
+ 82F799071497F27300920028 /* TKPostsRequest.m */,
+ 82F7992914992ED100920028 /* TKPostsResponse.h */,
+ 82F7992A14992ED100920028 /* TKPostsResponse.m */,
);
name = Classes;
sourceTree = "<group>";
@@ -188,7 +233,6 @@
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
- 827E46DD11EB1BDD00684466 /* Test.m */,
);
name = "Other Sources";
sourceTree = "<group>";
@@ -198,6 +242,7 @@
children = (
827902D614979B0C0018F19E /* Foundation.framework */,
827902FF1497E4600018F19E /* Cocoa.framework */,
+ 82F79916149924E900920028 /* SenTestingKit.framework */,
827903011497E4600018F19E /* Other Frameworks */,
);
name = Frameworks;
@@ -262,6 +307,26 @@
name = "TumblrKit Additions";
sourceTree = "<group>";
};
+ 82F79919149924E900920028 /* TumblrKit Tests for Mac */ = {
+ isa = PBXGroup;
+ children = (
+ 82F7991F149924E900920028 /* TumblrKit_Tests_for_Mac.h */,
+ 82F79920149924E900920028 /* TumblrKit_Tests_for_Mac.m */,
+ 82F7991A149924E900920028 /* Supporting Files */,
+ );
+ path = "TumblrKit Tests for Mac";
+ sourceTree = "<group>";
+ };
+ 82F7991A149924E900920028 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 82F7991B149924E900920028 /* TumblrKit Tests for Mac-Info.plist */,
+ 82F7991C149924E900920028 /* InfoPlist.strings */,
+ 82F79922149924E900920028 /* TumblrKit Tests for Mac-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -269,6 +334,8 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ 82F799081497F27300920028 /* TKPostsRequest.h in Headers */,
+ 82F7992B14992ED100920028 /* TKPostsResponse.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -276,6 +343,8 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ 82F799091497F27300920028 /* TKPostsRequest.h in Headers */,
+ 82F7992C14992ED100920028 /* TKPostsResponse.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -317,21 +386,24 @@
productReference = 8279034E1497E5860018F19E /* TumblrKit.framework */;
productType = "com.apple.product-type.framework";
};
- 827E46D511EB1BA000684466 /* Test */ = {
+ 82F79914149924E900920028 /* TumblrKit Tests for Mac */ = {
isa = PBXNativeTarget;
- buildConfigurationList = 827E46DA11EB1BBF00684466 /* Build configuration list for PBXNativeTarget "Test" */;
+ buildConfigurationList = 82F79923149924E900920028 /* Build configuration list for PBXNativeTarget "TumblrKit Tests for Mac" */;
buildPhases = (
- 827E46D311EB1BA000684466 /* Sources */,
- 827E46D411EB1BA000684466 /* Frameworks */,
+ 82F79910149924E900920028 /* Sources */,
+ 82F79911149924E900920028 /* Frameworks */,
+ 82F79912149924E900920028 /* Resources */,
+ 82F79913149924E900920028 /* ShellScript */,
);
buildRules = (
);
dependencies = (
+ 82F79927149924FA00920028 /* PBXTargetDependency */,
);
- name = Test;
- productName = Test;
- productReference = 827E46D611EB1BA000684466 /* Test */;
- productType = "com.apple.product-type.tool";
+ name = "TumblrKit Tests for Mac";
+ productName = "TumblrKit Tests for Mac";
+ productReference = 82F79915149924E900920028 /* TumblrKit Tests for Mac.octest */;
+ productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
@@ -358,10 +430,10 @@
projectDirPath = "";
projectRoot = "";
targets = (
- 827E46D511EB1BA000684466 /* Test */,
82B09E70123543700006D003 /* Documentation */,
827903291497E53E0018F19E /* TumblrKit for iOS */,
8279034D1497E5860018F19E /* TumblrKit for Mac */,
+ 82F79914149924E900920028 /* TumblrKit Tests for Mac */,
);
};
/* End PBXProject section */
@@ -375,6 +447,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 82F79912149924E900920028 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 82F7991E149924E900920028 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
@@ -391,6 +471,19 @@
shellPath = /bin/sh;
shellScript = "# Build the doxygen documentation for the project and load the docset into Xcode.\n\n# Use the following to adjust the value of the $DOXYGEN_PATH User-Defined Setting:\n# Binary install location: /Applications/Doxygen.app/Contents/Resources/doxygen\n# Source build install location: /usr/local/bin/doxygen\n\n# If the config file doesn't exist, run 'doxygen -g $SOURCE_ROOT/doxygen.config' to \n# a get default file.\n\nif ! [ -f $SOURCE_ROOT/doxygen.config ] \nthen \n echo doxygen config file does not exist\n $DOXYGEN_PATH -g $SOURCE_ROOT/doxygen.config\nfi\n\n# Append the proper input/output directories and docset info to the config file.\n# This works even though values are assigned higher up in the file. Easier than sed.\n\ncp -a $SOURCE_ROOT/doxygen.config $TEMP_DIR/doxygen.config\n\necho \"INPUT = $SOURCE_ROOT\" >> $TEMP_DIR/doxygen.config\necho \"OUTPUT_DIRECTORY = $SOURCE_ROOT/DoxygenDocs.docset\" >> $TEMP_DIR/doxygen.config\necho \"GENERATE_DOCSET = YES\" >> $TEMP_DIR/doxygen.config\necho \"DOCSET_BUNDLE_ID = com.mycompany.DoxygenExample\" >> $TEMP_DIR/doxygen.config\n\n# Run doxygen on the updated config file.\n# Note: doxygen creates a Makefile that does most of the heavy lifting.\n\n$DOXYGEN_PATH $TEMP_DIR/doxygen.config\n\n# make will invoke docsetutil. Take a look at the Makefile to see how this is done.\n\nmake -C $SOURCE_ROOT/DoxygenDocs.docset/html install\n\n# Construct a temporary applescript file to tell Xcode to load a docset.\n\nrm -f $TEMP_DIR/loadDocSet.scpt\n\necho \"tell application \\\"Xcode\\\"\" >> $TEMP_DIR/loadDocSet.scpt\necho \"load documentation set with path \\\"/Users/$USER/Library/Developer/Shared/Documentation/DocSets/\\\"\" \n >> $TEMP_DIR/loadDocSet.scpt\necho \"end tell\" >> $TEMP_DIR/loadDocSet.scpt\n\n# Run the load-docset applescript command.\n\nosascript $TEMP_DIR/loadDocSet.scpt\n\nexit 0";
};
+ 82F79913149924E900920028 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -398,6 +491,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 82F799051497ED7A00920028 /* TKRequest.m in Sources */,
82F798F31497E78A00920028 /* NSDictionary+TumblrKit.m in Sources */,
82F798F41497E78A00920028 /* NSString+TumblrKit.m in Sources */,
82F798F51497E78A00920028 /* TKPost.m in Sources */,
@@ -405,6 +499,8 @@
82F798F71497E78A00920028 /* TKTumblrReadRequest.m in Sources */,
82F798F81497E78A00920028 /* TKTumblelog.m in Sources */,
827903311497E53E0018F19E /* TumblrKit_for_iOS.m in Sources */,
+ 82F7990A1497F27300920028 /* TKPostsRequest.m in Sources */,
+ 82F7992D14992ED100920028 /* TKPostsResponse.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -412,6 +508,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 82F7990F1499244800920028 /* TKRequest.m in Sources */,
82F798FA1497E7A400920028 /* NSDictionary+TumblrKit.m in Sources */,
82F798FB1497E7A400920028 /* NSString+TumblrKit.m in Sources */,
82F798FC1497E7A400920028 /* TKPost.m in Sources */,
@@ -419,19 +516,29 @@
82F798FE1497E7A400920028 /* TKTumblrReadRequest.m in Sources */,
82F798FF1497E7A400920028 /* TKTumblelog.m in Sources */,
827903591497E5860018F19E /* TumblrKit_for_Mac.m in Sources */,
+ 82F7990B1497F27300920028 /* TKPostsRequest.m in Sources */,
+ 82F7992E14992ED100920028 /* TKPostsResponse.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
- 827E46D311EB1BA000684466 /* Sources */ = {
+ 82F79910149924E900920028 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 827E46DE11EB1BDD00684466 /* Test.m in Sources */,
+ 82F79921149924E900920028 /* TumblrKit_Tests_for_Mac.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
+/* Begin PBXTargetDependency section */
+ 82F79927149924FA00920028 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 8279034D1497E5860018F19E /* TumblrKit for Mac */;
+ targetProxy = 82F79926149924FA00920028 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
/* Begin PBXVariantGroup section */
089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
@@ -449,6 +556,14 @@
name = InfoPlist.strings;
sourceTree = "<group>";
};
+ 82F7991C149924E900920028 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 82F7991D149924E900920028 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
@@ -576,67 +691,72 @@
};
name = Release;
};
- 827E46D811EB1BA100684466 /* Debug */ = {
+ 82B09E71123543700006D003 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
+ DOXYGEN_PATH = /Applications/Doxygen.app/Contents/Resources/doxygen;
GCC_DYNAMIC_NO_PIC = NO;
- GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
- INSTALL_PATH = /usr/local/bin;
- OTHER_LDFLAGS = (
- "-framework",
- Foundation,
- "-framework",
- AppKit,
- );
- PRODUCT_NAME = Test;
+ PRODUCT_NAME = Documentation;
};
name = Debug;
};
- 827E46D911EB1BA100684466 /* Release */ = {
+ 82B09E72123543700006D003 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_MODEL_TUNING = G5;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
- INSTALL_PATH = /usr/local/bin;
- OTHER_LDFLAGS = (
- "-framework",
- Foundation,
- "-framework",
- AppKit,
- );
- PRODUCT_NAME = Test;
+ DOXYGEN_PATH = /Applications/Doxygen.app/Contents/Resources/doxygen;
+ PRODUCT_NAME = Documentation;
ZERO_LINK = NO;
};
name = Release;
};
- 82B09E71123543700006D003 /* Debug */ = {
+ 82F79924149924E900920028 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COPY_PHASE_STRIP = NO;
- DOXYGEN_PATH = /Applications/Doxygen.app/Contents/Resources/doxygen;
+ FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
GCC_DYNAMIC_NO_PIC = NO;
- GCC_OPTIMIZATION_LEVEL = 0;
- PRODUCT_NAME = Documentation;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "TumblrKit Tests for Mac/TumblrKit Tests for Mac-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ INFOPLIST_FILE = "TumblrKit Tests for Mac/TumblrKit Tests for Mac-Info.plist";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = octest;
};
name = Debug;
};
- 82B09E72123543700006D003 /* Release */ = {
+ 82F79925149924E900920028 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- DOXYGEN_PATH = /Applications/Doxygen.app/Contents/Resources/doxygen;
- PRODUCT_NAME = Documentation;
- ZERO_LINK = NO;
+ FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "TumblrKit Tests for Mac/TumblrKit Tests for Mac-Prefix.pch";
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ INFOPLIST_FILE = "TumblrKit Tests for Mac/TumblrKit Tests for Mac-Info.plist";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = octest;
};
name = Release;
};
@@ -670,23 +790,22 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 827E46DA11EB1BBF00684466 /* Build configuration list for PBXNativeTarget "Test" */ = {
+ 82B09E781235438A0006D003 /* Build configuration list for PBXAggregateTarget "Documentation" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- 827E46D811EB1BA100684466 /* Debug */,
- 827E46D911EB1BA100684466 /* Release */,
+ 82B09E71123543700006D003 /* Debug */,
+ 82B09E72123543700006D003 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 82B09E781235438A0006D003 /* Build configuration list for PBXAggregateTarget "Documentation" */ = {
+ 82F79923149924E900920028 /* Build configuration list for PBXNativeTarget "TumblrKit Tests for Mac" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- 82B09E71123543700006D003 /* Debug */,
- 82B09E72123543700006D003 /* Release */,
+ 82F79924149924E900920028 /* Debug */,
+ 82F79925149924E900920028 /* Release */,
);
defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};

0 comments on commit 207be2d

Please sign in to comment.
Something went wrong with that request. Please try again.