├── .gitignore ├── AMYServer Tests ├── AMYMocktailResponseTests.m ├── AMYServer Tests-Info.plist ├── AMYServer Tests-Prefix.pch ├── AMYServerTests.m ├── ExampleServer.h ├── ExampleServer.m ├── bad-json.tail ├── bad-json.tail.defaults.json ├── bad-mustache.tail ├── en.lproj │ └── InfoPlist.strings ├── invalid-header.tail ├── not-enough-lines.tail ├── successful-login.tail ├── successful-login.tail.defaults.json ├── xml.tail └── xml.tail.defaults.json ├── AMYServer.podspec ├── AMYServer.xcodeproj └── project.pbxproj ├── AMYServer.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── AMYServer.xccheckout ├── AMYServer ├── AMYRequest.h ├── AMYRequest.m ├── AMYServer-Prefix.pch ├── AMYServer.h ├── AMYServer.m ├── _AMYMocktailResponse.h ├── _AMYMocktailResponse.m ├── _AMYURLProtocol.h └── _AMYURLProtocol.m ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── GRMustache │ ├── LICENSE │ ├── README.md │ └── src │ │ └── classes │ │ ├── Compiling │ │ ├── Expressions │ │ │ ├── GRMustacheExpression.m │ │ │ ├── GRMustacheExpressionVisitor_private.h │ │ │ ├── GRMustacheExpression_private.h │ │ │ ├── GRMustacheFilteredExpression.m │ │ │ ├── GRMustacheFilteredExpression_private.h │ │ │ ├── GRMustacheIdentifierExpression.m │ │ │ ├── GRMustacheIdentifierExpression_private.h │ │ │ ├── GRMustacheImplicitIteratorExpression.m │ │ │ ├── GRMustacheImplicitIteratorExpression_private.h │ │ │ ├── GRMustacheScopedExpression.m │ │ │ └── GRMustacheScopedExpression_private.h │ │ ├── GRMustacheCompiler.m │ │ ├── GRMustacheCompiler_private.h │ │ └── TemplateAST │ │ │ ├── GRMustacheInheritablePartialNode.m │ │ │ ├── GRMustacheInheritablePartialNode_private.h │ │ │ ├── GRMustacheInheritableSectionNode.m │ │ │ ├── GRMustacheInheritableSectionNode_private.h │ │ │ ├── GRMustachePartialNode.m │ │ │ ├── GRMustachePartialNode_private.h │ │ │ ├── GRMustacheSectionTag.m │ │ │ ├── GRMustacheSectionTag_private.h │ │ │ ├── GRMustacheTag.h │ │ │ ├── GRMustacheTag.m │ │ │ ├── GRMustacheTag_private.h │ │ │ ├── GRMustacheTemplateAST.m │ │ │ ├── GRMustacheTemplateASTNode_private.h │ │ │ ├── GRMustacheTemplateASTVisitor_private.h │ │ │ ├── GRMustacheTemplateAST_private.h │ │ │ ├── GRMustacheTextNode.m │ │ │ ├── GRMustacheTextNode_private.h │ │ │ ├── GRMustacheVariableTag.m │ │ │ └── GRMustacheVariableTag_private.h │ │ ├── Configuration │ │ ├── GRMustacheConfiguration.h │ │ ├── GRMustacheConfiguration.m │ │ └── GRMustacheConfiguration_private.h │ │ ├── GRMustache.h │ │ ├── GRMustache.m │ │ ├── GRMustacheVersion.h │ │ ├── GRMustache_private.h │ │ ├── Parsing │ │ ├── GRMustacheExpressionParser.m │ │ ├── GRMustacheExpressionParser_private.h │ │ ├── GRMustacheTemplateParser.m │ │ ├── GRMustacheTemplateParser_private.h │ │ ├── GRMustacheToken.m │ │ └── GRMustacheToken_private.h │ │ ├── Rendering │ │ ├── GRMustacheContext.h │ │ ├── GRMustacheContext.m │ │ ├── GRMustacheContext_private.h │ │ ├── GRMustacheExpressionInvocation.m │ │ ├── GRMustacheExpressionInvocation_private.h │ │ ├── GRMustacheFilter.h │ │ ├── GRMustacheFilter.m │ │ ├── GRMustacheFilter_private.h │ │ ├── GRMustacheKeyAccess.m │ │ ├── GRMustacheKeyAccess_private.h │ │ ├── GRMustacheRendering.h │ │ ├── GRMustacheRendering.m │ │ ├── GRMustacheRenderingEngine.m │ │ ├── GRMustacheRenderingEngine_private.h │ │ ├── GRMustacheRendering_private.h │ │ ├── GRMustacheSafeKeyAccess.h │ │ └── GRMustacheTagDelegate.h │ │ ├── Services │ │ ├── GRMustacheExpressionGenerator.m │ │ ├── GRMustacheExpressionGenerator_private.h │ │ ├── GRMustacheTemplateGenerator.m │ │ ├── GRMustacheTemplateGenerator_private.h │ │ ├── NSFormatter+GRMustache.h │ │ ├── NSFormatter+GRMustache.m │ │ ├── NSValueTransformer+GRMustache.h │ │ ├── NSValueTransformer+GRMustache.m │ │ └── StandardLibrary │ │ │ ├── GRMustacheEachFilter.m │ │ │ ├── GRMustacheEachFilter_private.h │ │ │ ├── GRMustacheHTMLLibrary.m │ │ │ ├── GRMustacheHTMLLibrary_private.h │ │ │ ├── GRMustacheJavascriptLibrary.m │ │ │ ├── GRMustacheJavascriptLibrary_private.h │ │ │ ├── GRMustacheLocalizer.h │ │ │ ├── GRMustacheLocalizer.m │ │ │ ├── GRMustacheStandardLibrary.m │ │ │ ├── GRMustacheStandardLibrary_private.h │ │ │ ├── GRMustacheURLLibrary.m │ │ │ └── GRMustacheURLLibrary_private.h │ │ ├── Shared │ │ ├── GRMustacheAvailabilityMacros.h │ │ ├── GRMustacheAvailabilityMacros_private.h │ │ ├── GRMustacheBuffer_private.h │ │ ├── GRMustacheContentType.h │ │ ├── GRMustacheError.h │ │ ├── GRMustacheError.m │ │ ├── GRMustacheTranslateCharacters.m │ │ └── GRMustacheTranslateCharacters_private.h │ │ └── Templates │ │ ├── GRMustacheTemplate.h │ │ ├── GRMustacheTemplate.m │ │ ├── GRMustacheTemplateRepository.h │ │ ├── GRMustacheTemplateRepository.m │ │ ├── GRMustacheTemplateRepository_private.h │ │ └── GRMustacheTemplate_private.h ├── Headers │ ├── Private │ │ ├── GRMustache │ │ │ ├── GRMustache.h │ │ │ ├── GRMustacheAvailabilityMacros.h │ │ │ ├── GRMustacheAvailabilityMacros_private.h │ │ │ ├── GRMustacheBuffer_private.h │ │ │ ├── GRMustacheCompiler_private.h │ │ │ ├── GRMustacheConfiguration.h │ │ │ ├── GRMustacheConfiguration_private.h │ │ │ ├── GRMustacheContentType.h │ │ │ ├── GRMustacheContext.h │ │ │ ├── GRMustacheContext_private.h │ │ │ ├── GRMustacheEachFilter_private.h │ │ │ ├── GRMustacheError.h │ │ │ ├── GRMustacheExpressionGenerator_private.h │ │ │ ├── GRMustacheExpressionInvocation_private.h │ │ │ ├── GRMustacheExpressionParser_private.h │ │ │ ├── GRMustacheExpressionVisitor_private.h │ │ │ ├── GRMustacheExpression_private.h │ │ │ ├── GRMustacheFilter.h │ │ │ ├── GRMustacheFilter_private.h │ │ │ ├── GRMustacheFilteredExpression_private.h │ │ │ ├── GRMustacheHTMLLibrary_private.h │ │ │ ├── GRMustacheIdentifierExpression_private.h │ │ │ ├── GRMustacheImplicitIteratorExpression_private.h │ │ │ ├── GRMustacheInheritablePartialNode_private.h │ │ │ ├── GRMustacheInheritableSectionNode_private.h │ │ │ ├── GRMustacheJavascriptLibrary_private.h │ │ │ ├── GRMustacheKeyAccess_private.h │ │ │ ├── GRMustacheLocalizer.h │ │ │ ├── GRMustachePartialNode_private.h │ │ │ ├── GRMustacheRendering.h │ │ │ ├── GRMustacheRenderingEngine_private.h │ │ │ ├── GRMustacheRendering_private.h │ │ │ ├── GRMustacheSafeKeyAccess.h │ │ │ ├── GRMustacheScopedExpression_private.h │ │ │ ├── GRMustacheSectionTag_private.h │ │ │ ├── GRMustacheStandardLibrary_private.h │ │ │ ├── GRMustacheTag.h │ │ │ ├── GRMustacheTagDelegate.h │ │ │ ├── GRMustacheTag_private.h │ │ │ ├── GRMustacheTemplate.h │ │ │ ├── GRMustacheTemplateASTNode_private.h │ │ │ ├── GRMustacheTemplateASTVisitor_private.h │ │ │ ├── GRMustacheTemplateAST_private.h │ │ │ ├── GRMustacheTemplateGenerator_private.h │ │ │ ├── GRMustacheTemplateParser_private.h │ │ │ ├── GRMustacheTemplateRepository.h │ │ │ ├── GRMustacheTemplateRepository_private.h │ │ │ ├── GRMustacheTemplate_private.h │ │ │ ├── GRMustacheTextNode_private.h │ │ │ ├── GRMustacheToken_private.h │ │ │ ├── GRMustacheTranslateCharacters_private.h │ │ │ ├── GRMustacheURLLibrary_private.h │ │ │ ├── GRMustacheVariableTag_private.h │ │ │ ├── GRMustacheVersion.h │ │ │ ├── GRMustache_private.h │ │ │ ├── NSFormatter+GRMustache.h │ │ │ └── NSValueTransformer+GRMustache.h │ │ ├── JRSwizzle │ │ │ └── JRSwizzle.h │ │ └── KIF │ │ │ ├── CGGeometry-KIFAdditions.h │ │ │ ├── IOHIDEvent+KIF.h │ │ │ ├── KIF.h │ │ │ ├── KIFSystemTestActor.h │ │ │ ├── KIFTestActor.h │ │ │ ├── KIFTestCase.h │ │ │ ├── KIFTestStepValidation.h │ │ │ ├── KIFTypist.h │ │ │ ├── KIFUITestActor-ConditionalTests.h │ │ │ ├── KIFUITestActor.h │ │ │ ├── LoadableCategory.h │ │ │ ├── NSBundle-KIFAdditions.h │ │ │ ├── NSError-KIFAdditions.h │ │ │ ├── NSException-KIFAdditions.h │ │ │ ├── NSFileManager-KIFAdditions.h │ │ │ ├── UIAccessibilityElement-KIFAdditions.h │ │ │ ├── UIApplication-KIFAdditions.h │ │ │ ├── UIAutomationHelper.h │ │ │ ├── UIEvent+KIFAdditions.h │ │ │ ├── UIScrollView-KIFAdditions.h │ │ │ ├── UITableView-KIFAdditions.h │ │ │ ├── UITouch-KIFAdditions.h │ │ │ ├── UIView-Debugging.h │ │ │ ├── UIView-KIFAdditions.h │ │ │ ├── UIWindow-KIFAdditions.h │ │ │ └── XCTestCase-KIFAdditions.h │ └── Public │ │ ├── GRMustache │ │ ├── GRMustache.h │ │ ├── GRMustacheAvailabilityMacros.h │ │ ├── GRMustacheConfiguration.h │ │ ├── GRMustacheContentType.h │ │ ├── GRMustacheContext.h │ │ ├── GRMustacheError.h │ │ ├── GRMustacheFilter.h │ │ ├── GRMustacheLocalizer.h │ │ ├── GRMustacheRendering.h │ │ ├── GRMustacheSafeKeyAccess.h │ │ ├── GRMustacheTag.h │ │ ├── GRMustacheTagDelegate.h │ │ ├── GRMustacheTemplate.h │ │ ├── GRMustacheTemplateRepository.h │ │ ├── GRMustacheVersion.h │ │ ├── NSFormatter+GRMustache.h │ │ └── NSValueTransformer+GRMustache.h │ │ ├── JRSwizzle │ │ └── JRSwizzle.h │ │ └── KIF │ │ ├── CGGeometry-KIFAdditions.h │ │ ├── IOHIDEvent+KIF.h │ │ ├── KIF.h │ │ ├── KIFSystemTestActor.h │ │ ├── KIFTestActor.h │ │ ├── KIFTestCase.h │ │ ├── KIFTestStepValidation.h │ │ ├── KIFTypist.h │ │ ├── KIFUITestActor-ConditionalTests.h │ │ ├── KIFUITestActor.h │ │ ├── NSBundle-KIFAdditions.h │ │ ├── NSError-KIFAdditions.h │ │ ├── NSException-KIFAdditions.h │ │ ├── NSFileManager-KIFAdditions.h │ │ ├── UIAccessibilityElement-KIFAdditions.h │ │ ├── UIApplication-KIFAdditions.h │ │ ├── UIAutomationHelper.h │ │ ├── UIScrollView-KIFAdditions.h │ │ ├── UITableView-KIFAdditions.h │ │ ├── UITouch-KIFAdditions.h │ │ ├── UIView-Debugging.h │ │ ├── UIView-KIFAdditions.h │ │ ├── UIWindow-KIFAdditions.h │ │ └── XCTestCase-KIFAdditions.h ├── JRSwizzle │ ├── JRSwizzle.h │ ├── JRSwizzle.m │ └── README.markdown ├── KIF │ ├── Additions │ │ ├── CGGeometry-KIFAdditions.h │ │ ├── CGGeometry-KIFAdditions.m │ │ ├── LoadableCategory.h │ │ ├── NSBundle-KIFAdditions.h │ │ ├── NSBundle-KIFAdditions.m │ │ ├── NSError-KIFAdditions.h │ │ ├── NSError-KIFAdditions.m │ │ ├── NSException-KIFAdditions.h │ │ ├── NSException-KIFAdditions.m │ │ ├── NSFileManager-KIFAdditions.h │ │ ├── NSFileManager-KIFAdditions.m │ │ ├── UIAccessibilityElement-KIFAdditions.h │ │ ├── UIAccessibilityElement-KIFAdditions.m │ │ ├── UIApplication-KIFAdditions.h │ │ ├── UIApplication-KIFAdditions.m │ │ ├── UIEvent+KIFAdditions.h │ │ ├── UIEvent+KIFAdditions.m │ │ ├── UIScrollView-KIFAdditions.h │ │ ├── UIScrollView-KIFAdditions.m │ │ ├── UITableView-KIFAdditions.h │ │ ├── UITableView-KIFAdditions.m │ │ ├── UITouch-KIFAdditions.h │ │ ├── UITouch-KIFAdditions.m │ │ ├── UIView-Debugging.h │ │ ├── UIView-Debugging.m │ │ ├── UIView-KIFAdditions.h │ │ ├── UIView-KIFAdditions.m │ │ ├── UIWindow-KIFAdditions.h │ │ ├── UIWindow-KIFAdditions.m │ │ ├── XCTestCase-KIFAdditions.h │ │ └── XCTestCase-KIFAdditions.m │ ├── Classes │ │ ├── IOHIDEvent+KIF.h │ │ ├── IOHIDEvent+KIF.m │ │ ├── KIF.h │ │ ├── KIFSystemTestActor.h │ │ ├── KIFSystemTestActor.m │ │ ├── KIFTestActor.h │ │ ├── KIFTestActor.m │ │ ├── KIFTestCase.h │ │ ├── KIFTestCase.m │ │ ├── KIFTestStepValidation.h │ │ ├── KIFTestStepValidation.m │ │ ├── KIFTypist.h │ │ ├── KIFTypist.m │ │ ├── KIFUITestActor-ConditionalTests.h │ │ ├── KIFUITestActor-ConditionalTests.m │ │ ├── KIFUITestActor.h │ │ ├── KIFUITestActor.m │ │ ├── UIAutomationHelper.h │ │ └── UIAutomationHelper.m │ ├── LICENSE │ └── README.md ├── Local Podspecs │ └── KIF.podspec.json ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj └── Target Support Files │ ├── GRMustache │ ├── GRMustache-dummy.m │ ├── GRMustache-prefix.pch │ └── GRMustache.xcconfig │ ├── JRSwizzle │ ├── JRSwizzle-dummy.m │ ├── JRSwizzle-prefix.pch │ └── JRSwizzle.xcconfig │ ├── KIF │ ├── KIF-dummy.m │ ├── KIF-prefix.pch │ └── KIF.xcconfig │ ├── Pods-AMYServer Tests │ ├── Pods-AMYServer Tests-acknowledgements.markdown │ ├── Pods-AMYServer Tests-acknowledgements.plist │ ├── Pods-AMYServer Tests-dummy.m │ ├── Pods-AMYServer Tests-frameworks.sh │ ├── Pods-AMYServer Tests-resources.sh │ ├── Pods-AMYServer Tests.debug.xcconfig │ └── Pods-AMYServer Tests.release.xcconfig │ └── Pods │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-frameworks.sh │ ├── Pods-resources.sh │ ├── Pods.debug.xcconfig │ └── Pods.release.xcconfig ├── README.md └── Test Host ├── AppDelegate.h ├── AppDelegate.m ├── Default-568h@2x.png ├── Default.png ├── Default@2x.png ├── Test Host-Info.plist ├── Test Host-Prefix.pch ├── ViewController.h ├── ViewController.m ├── en.lproj ├── InfoPlist.strings └── MainStoryboard.storyboard └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | xcuserdata 2 | project.xcworkspace 3 | -------------------------------------------------------------------------------- /AMYServer Tests/AMYMocktailResponseTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMYMocktailResponseTests.m 3 | // AMYServer 4 | // 5 | // Created by Brian Nickel on 8/01/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "_AMYMocktailResponse.h" 12 | #import 13 | 14 | @interface AMYMocktailResponseTests : XCTestCase 15 | @end 16 | 17 | @implementation AMYMocktailResponseTests 18 | 19 | - (void)testDefaults 20 | { 21 | _AMYMocktailResponse *response = [_AMYMocktailResponse responseFromTail:@"xml" bundle:[NSBundle KIFTestBundle] error:NULL]; 22 | NSString *body = [[NSString alloc] initWithData:[response bodyWithValues:@{} error:NULL] encoding:NSUTF8StringEncoding]; 23 | XCTAssertTrue([body rangeOfString:@""].location != NSNotFound, @"Should have found default."); 24 | XCTAssertTrue([body rangeOfString:@"v"].location != NSNotFound, @"Should have found default."); 25 | } 26 | 27 | - (void)testThatSettingOneValueDoesNotWipeOutAnother 28 | { 29 | _AMYMocktailResponse *response = [_AMYMocktailResponse responseFromTail:@"xml" bundle:[NSBundle KIFTestBundle] error:NULL]; 30 | NSString *body = [[NSString alloc] initWithData:[response bodyWithValues:@{@"a":@{@"q":@"r"}} error:NULL] encoding:NSUTF8StringEncoding]; 31 | NSLog(@"Body: %@", body); 32 | XCTAssertTrue([body rangeOfString:@""].location != NSNotFound, @"Should have found default."); 33 | XCTAssertTrue([body rangeOfString:@"v"].location != NSNotFound, @"Should have found default."); 34 | } 35 | 36 | - (void)testThatNewValuesOverrideOldOnes 37 | { 38 | _AMYMocktailResponse *response = [_AMYMocktailResponse responseFromTail:@"xml" bundle:[NSBundle KIFTestBundle] error:NULL]; 39 | NSString *body = [[NSString alloc] initWithData:[response bodyWithValues:@{@"a":@{@"b":@{@"c":@"d"}}} error:NULL] encoding:NSUTF8StringEncoding]; 40 | XCTAssertTrue([body rangeOfString:@""].location != NSNotFound, @"Should have overridden default for child."); 41 | } 42 | 43 | - (void)testThatItemsInAnArrayTreatTheFirstItemAsATemplate 44 | { 45 | _AMYMocktailResponse *response = [_AMYMocktailResponse responseFromTail:@"xml" bundle:[NSBundle KIFTestBundle] error:NULL]; 46 | NSString *body = [[NSString alloc] initWithData:[response bodyWithValues:@{@"items":@[@{@"key": @"key"}, @{@"value":@"value"}, @{}]} error:NULL] encoding:NSUTF8StringEncoding]; 47 | NSLog(@"Body: %@", body); 48 | XCTAssertTrue([body rangeOfString:@"v"].location != NSNotFound, @"Should have found 'key' in position 1."); 49 | XCTAssertTrue([body rangeOfString:@"value"].location != NSNotFound, @"Should have found 'value' in position 2."); 50 | XCTAssertTrue([body rangeOfString:@"v"].location != NSNotFound, @"Should have found default in position 3."); 51 | } 52 | 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /AMYServer Tests/AMYServer Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AMYServer Tests/AMYServer Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'AMYServer Tests' target in the 'AMYServer Tests' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /AMYServer Tests/ExampleServer.h: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleServer.h 3 | // AMYServer 4 | // 5 | // Created by Brian Nickel on 7/20/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import "AMYServer.h" 10 | 11 | #define exampleServer KIFActorWithClass(ExampleServer) 12 | 13 | @interface ExampleServer : AMYServer 14 | 15 | - (void)waitForLoginWithUsername:(NSString *)username password:(NSString *)password andRespondWithSuccess:(BOOL)success message:(NSString *)message token:(NSString *)token; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /AMYServer Tests/ExampleServer.m: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleServer.m 3 | // AMYServer 4 | // 5 | // Created by Brian Nickel on 7/20/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import "ExampleServer.h" 10 | 11 | static inline NSString *pendingRequests(ExampleServer *server) { 12 | NSMutableArray *serviceRequests = [NSMutableArray array]; 13 | for (NSURLRequest *request in server.pendingURLRequests) { 14 | [serviceRequests addObject:request.URL.lastPathComponent]; 15 | } 16 | return [serviceRequests componentsJoinedByString:@", "]; 17 | } 18 | 19 | #define waitForValueAtKeyPath(value, keypath, obj, error) KIFTestWaitCondition([value isEqual:[obj valueForKeyPath:keypath]], error, @"Waiting for %@=%@ in %@", keypath, value, obj) 20 | 21 | @implementation ExampleServer 22 | 23 | - (NSURL *)baseURL 24 | { 25 | return [NSURL URLWithString:@"https://example.com/services/"]; 26 | } 27 | 28 | - (AMYRequest *)waitForServiceRequest:(NSString *)serviceRequest withJSONDataMatchingBlock:(KIFTestStepResult (^)(id json, NSError **error))block 29 | { 30 | return [self waitForRequestMatchingBlock:^KIFTestStepResult(NSURLRequest *request, NSError **error) { 31 | 32 | KIFTestWaitCondition([request.URL.lastPathComponent isEqualToString:serviceRequest], error, @"Could not find request for %@. Found requests for %@.", serviceRequest, pendingRequests(self)); 33 | 34 | id json = [NSJSONSerialization JSONObjectWithData:request.HTTPBody options:0 error:NULL]; 35 | return block(json, error); 36 | }]; 37 | } 38 | 39 | - (void)waitForLoginWithUsername:(NSString *)username password:(NSString *)password andRespondWithSuccess:(BOOL)success message:(NSString *)message token:(NSString *)token 40 | { 41 | AMYRequest *request = [self waitForServiceRequest:@"login.json" withJSONDataMatchingBlock:^KIFTestStepResult(id json, NSError *__autoreleasing *error) { 42 | waitForValueAtKeyPath(username, @"username", json, error); 43 | waitForValueAtKeyPath(password, @"password", json, error); 44 | return KIFTestStepResultSuccess; 45 | }]; 46 | 47 | id response = @{@"success": @(success), @"message": message ?: @"", @"token" : token ?: @""}; 48 | 49 | [request respondWithStatusCode:200 headerFields:@{@"X-Application-Token": response[@"token"]}]; 50 | [request sendData:[NSJSONSerialization dataWithJSONObject:response options:0 error:NULL]]; 51 | [request close]; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /AMYServer Tests/bad-json.tail: -------------------------------------------------------------------------------- 1 | POST 2 | login.json 3 | 200 4 | application/json 5 | X-Application-Token: {{{token}}} 6 | 7 | { 8 | "success": true, 9 | "message": "{{{message}}}", 10 | "token": "{{{token}}}" 11 | } -------------------------------------------------------------------------------- /AMYServer Tests/bad-json.tail.defaults.json: -------------------------------------------------------------------------------- 1 | { message": "Salutations" } -------------------------------------------------------------------------------- /AMYServer Tests/bad-mustache.tail: -------------------------------------------------------------------------------- 1 | POST 2 | login.json 3 | 200 4 | application/json 5 | X-Application-Token: {{{token}}} 6 | 7 | { 8 | "success": true, 9 | "message": "{{message}}}", 10 | "token": "{{{token}}" 11 | } -------------------------------------------------------------------------------- /AMYServer Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /AMYServer Tests/invalid-header.tail: -------------------------------------------------------------------------------- 1 | .* 2 | .* 3 | 200 4 | text/plain 5 | Set-Cookie my-cookie 6 | 7 | Hello World -------------------------------------------------------------------------------- /AMYServer Tests/not-enough-lines.tail: -------------------------------------------------------------------------------- 1 | .* 2 | .* 3 | 200 4 | 5 | Hello World -------------------------------------------------------------------------------- /AMYServer Tests/successful-login.tail: -------------------------------------------------------------------------------- 1 | POST 2 | login.json 3 | 200 4 | application/json 5 | X-Application-Token: {{{token}}} 6 | 7 | { 8 | "success": true, 9 | "message": "{{{message}}}", 10 | "token": "{{{token}}}" 11 | } -------------------------------------------------------------------------------- /AMYServer Tests/successful-login.tail.defaults.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "Good morning, Sir" 3 | } -------------------------------------------------------------------------------- /AMYServer Tests/xml.tail: -------------------------------------------------------------------------------- 1 | .* 2 | .* 3 | 200 4 | text/xml 5 | 6 | 7 | {{#items}} 8 | {{value}} 9 | {{/items}} 10 | -------------------------------------------------------------------------------- /AMYServer Tests/xml.tail.defaults.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": { "b": { "c": "abc" } }, 3 | "items": [ { "key": "k", "value": "v" } ] 4 | } -------------------------------------------------------------------------------- /AMYServer.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "AMYServer" 3 | s.version = "2.1.2" 4 | s.summary = "AMY Mocks Your Server - A mock HTTP server for KIF." 5 | s.homepage = "https://github.com/kif-framework/AMYServer" 6 | s.license = 'Apache 2.0' 7 | s.author = { "Brian Nickel" => "brian.nickel@gmail.com" } 8 | s.source = { :git => "https://github.com/kif-framework/AMYServer.git", :tag => "v2.1.2" } 9 | s.platform = :ios, '5.1' 10 | s.requires_arc = true 11 | s.source_files = 'AMYServer' 12 | s.dependency 'GRMustache', '~> 7.0' 13 | s.dependency 'KIF', '~> 3.0' 14 | s.framework = 'XCTest' 15 | end 16 | -------------------------------------------------------------------------------- /AMYServer.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AMYServer.xcworkspace/xcshareddata/AMYServer.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectIdentifier 6 | 066580B7-F374-4637-B27D-F53F9A19FCE0 7 | IDESourceControlProjectName 8 | AMYServer 9 | IDESourceControlProjectOriginsDictionary 10 | 11 | B5B9474C-2F5B-4F69-8BE0-ED48CC872443 12 | https://github.com/bnickel/AMYServer.git 13 | 14 | IDESourceControlProjectPath 15 | AMYServer.xcworkspace 16 | IDESourceControlProjectRelativeInstallPathDictionary 17 | 18 | B5B9474C-2F5B-4F69-8BE0-ED48CC872443 19 | .. 20 | 21 | IDESourceControlProjectURL 22 | https://github.com/bnickel/AMYServer.git 23 | IDESourceControlProjectVersion 24 | 110 25 | IDESourceControlProjectWCCIdentifier 26 | B5B9474C-2F5B-4F69-8BE0-ED48CC872443 27 | IDESourceControlProjectWCConfigurations 28 | 29 | 30 | IDESourceControlRepositoryExtensionIdentifierKey 31 | public.vcs.git 32 | IDESourceControlWCCIdentifierKey 33 | B5B9474C-2F5B-4F69-8BE0-ED48CC872443 34 | IDESourceControlWCCName 35 | AMYServer 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /AMYServer/AMYRequest.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMYRequest.h 3 | // AMYServer 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class _AMYURLProtocol; 12 | 13 | @interface AMYRequest : NSObject 14 | 15 | - (instancetype)initWithProtocol:(_AMYURLProtocol *)protocol; 16 | 17 | @property (nonatomic, readonly) NSURLRequest *URLRequest; 18 | @property (nonatomic, readonly) _AMYURLProtocol *protocol; 19 | 20 | - (void)respondWithStatusCode:(NSInteger) statusCode HTTPVersion:(NSString *)HTTPVersion headerFields:(NSDictionary *)headerFields cacheStoragePolicy:(NSURLCacheStoragePolicy)cacheStoragePolicy; 21 | - (void)respondWithStatusCode:(NSInteger) statusCode headerFields:(NSDictionary *)headerFields; 22 | 23 | - (void)sendData:(NSData *)data; 24 | 25 | - (void)close; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /AMYServer/AMYRequest.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMYRequest.m 3 | // AMYServer 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import "AMYRequest.h" 10 | #import "_AMYURLProtocol.h" 11 | 12 | @implementation AMYRequest 13 | 14 | - (instancetype)initWithProtocol:(_AMYURLProtocol *)protocol 15 | { 16 | self = [super init]; 17 | if (self) { 18 | _protocol = protocol; 19 | } 20 | return self; 21 | } 22 | 23 | - (NSURLRequest *)URLRequest 24 | { 25 | return _protocol.request; 26 | } 27 | 28 | - (void)respondWithStatusCode:(NSInteger)statusCode HTTPVersion:(NSString *)HTTPVersion headerFields:(NSDictionary *)headerFields cacheStoragePolicy:(NSURLCacheStoragePolicy)cacheStoragePolicy 29 | { 30 | if ([_protocol canRespond]) { 31 | NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.URLRequest.URL statusCode:statusCode HTTPVersion:HTTPVersion headerFields:headerFields]; 32 | 33 | if ((statusCode == 301 || statusCode == 302) && headerFields[@"Location"]) { 34 | NSURLRequest *redirectRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:headerFields[@"Location"] relativeToURL:self.URLRequest.URL]]; 35 | [_protocol.client URLProtocol:_protocol wasRedirectedToRequest:redirectRequest redirectResponse:response]; 36 | } else { 37 | [_protocol.client URLProtocol:_protocol didReceiveResponse:response cacheStoragePolicy:cacheStoragePolicy]; 38 | } 39 | } 40 | } 41 | 42 | - (void)respondWithStatusCode:(NSInteger)statusCode headerFields:(NSDictionary *)headerFields 43 | { 44 | [self respondWithStatusCode:statusCode HTTPVersion:@"1.1" headerFields:headerFields cacheStoragePolicy:NSURLCacheStorageAllowedInMemoryOnly]; 45 | } 46 | 47 | - (void)sendData:(NSData *)data 48 | { 49 | if ([_protocol canRespond]) { 50 | [_protocol.client URLProtocol:_protocol didLoadData:data]; 51 | } 52 | } 53 | 54 | - (void)close 55 | { 56 | if ([_protocol canRespond]) { 57 | [_protocol.client URLProtocolDidFinishLoading:_protocol]; 58 | } 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /AMYServer/AMYServer-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'AMYServer' target in the 'AMYServer' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /AMYServer/AMYServer.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMYServer.h 3 | // AMYServer 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AMYRequest.h" 11 | 12 | @interface AMYServer : KIFTestActor 13 | 14 | @property (nonatomic, readonly) NSURL *baseURL; 15 | @property (nonatomic, readonly) NSArray *pendingURLRequests; 16 | 17 | - (AMYRequest *)waitForRequestMatchingBlock:(KIFTestStepResult (^)(NSURLRequest *request, NSError **error))block; 18 | - (void)waitForRequestMatchingMocktail:(NSString *)mocktail withHTTPBodyMatchingBlock:(KIFTestStepResult (^)(NSData *body, NSError **error))block andRespondWithValues:(NSDictionary *)values; 19 | - (void)waitForRequestMatchingMocktail:(NSString *)mocktail andRespondWithValues:(NSDictionary *)values; 20 | 21 | - (void)start; 22 | - (void)stop; 23 | - (void)closeAllRequests; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /AMYServer/_AMYMocktailResponse.h: -------------------------------------------------------------------------------- 1 | // 2 | // MocktailResponse.h 3 | // Mocktail 4 | // 5 | // Created by Matthias Plappert on 3/11/13. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | FOUNDATION_EXPORT NSString * const _AMYMocktailFileExtension; 13 | 14 | @interface _AMYMocktailResponse : NSObject 15 | 16 | + (instancetype)responseFromTail:(NSString *)tail bundle:(NSBundle *)bundle error:(NSError **)error; 17 | + (instancetype)responseFromFileAtURL:(NSURL *)url error:(NSError **)error; 18 | 19 | - (BOOL)matchesURL:(NSURL *)URL method:(NSString *)method patternLength:(NSUInteger *)patternLength; 20 | 21 | @property (nonatomic, readonly) NSDictionary *headers; 22 | @property (nonatomic, readonly) NSInteger statusCode; 23 | @property (nonatomic, readonly) NSData *body; 24 | 25 | - (NSData *)bodyWithValues:(NSDictionary *)values error:(NSError **)error; 26 | - (NSDictionary *)headersWithValues:(NSDictionary *)values error:(NSError **)error; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /AMYServer/_AMYURLProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // _AMYURLProtocol.h 3 | // AMYServer 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class AMYRequest; 13 | 14 | @interface _AMYURLProtocol : NSURLProtocol 15 | 16 | @property (nonatomic, readonly) BOOL canRespond; 17 | @property (nonatomic, readonly) BOOL cancelled; 18 | 19 | + (AMYRequest *)findAndRemoveRequestMatchingBaseURL:(NSURL *)baseURL block:(KIFTestStepResult (^)(NSURLRequest *URLRequest, NSError **error))block error:(NSError **)error; 20 | + (void)startMonitoringURL:(NSURL *)URL; 21 | + (void)stopMonitoringURL:(NSURL *)URL; 22 | + (void)closeAllRequestsWithBaseURL:(NSURL *)URL; 23 | + (NSArray *)pendingURLRequestsMatchingBaseURL:(NSURL *)baseURL; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | AMYWebServer 2 | Copyright 2013 Brian Nickel 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | pod 'KIF', '~> 3.0' 2 | pod 'GRMustache', '~> 7.0' 3 | 4 | target 'AMYServer Tests' do 5 | pod 'KIF', '~> 3.0' 6 | pod 'GRMustache', '~> 7.0' 7 | end 8 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - GRMustache (7.3.2): 3 | - JRSwizzle (~> 1.0) 4 | - JRSwizzle (1.0) 5 | - KIF (3.3.0): 6 | - KIF/Core (= 3.3.0) 7 | - KIF/Core (3.3.0) 8 | 9 | DEPENDENCIES: 10 | - GRMustache (~> 7.0) 11 | - KIF (~> 3.0) 12 | 13 | SPEC CHECKSUMS: 14 | GRMustache: ebe6104fd30a6d22c1f36af131e19e2dbf7cd292 15 | JRSwizzle: dd5ead5d913a0f29e7f558200165849f006bb1e3 16 | KIF: 0a82046d06f3648799cac522d2d0f7934214caac 17 | 18 | COCOAPODS: 0.39.0 19 | -------------------------------------------------------------------------------- /Pods/GRMustache/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Gwendal Roué 2 | 3 | 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: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | 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. 8 | -------------------------------------------------------------------------------- /Pods/GRMustache/README.md: -------------------------------------------------------------------------------- 1 | GRMustache 2 | ========== 3 | 4 | GRMustache is a [Mustache](http://mustache.github.io) template engine written in Objective-C, for both MacOS Cocoa and iOS. 5 | 6 | It ships with built-in goodies and extensibility hooks that let you avoid the strict minimalism of the genuine Mustache language when you need it. 7 | 8 | **April 22, 2015: GRMustache 7.3.2 is out.** [Release notes](RELEASE_NOTES.md) 9 | 10 | 11 | Get release announcements and usage tips: follow [@GRMustache on Twitter](http://twitter.com/GRMustache). 12 | 13 | 14 | System requirements 15 | ------------------- 16 | 17 | GRMustache targets iOS down to version 4.3, MacOS down to 10.6 Snow Leopard (without garbage collection), and only depends on the Foundation framework. 18 | 19 | **Swift developers**: You can use GRMustache from Swift, with a limitation: you can only render Objective-C objects. Instead, consider using [GRMustache.swift](https://github.com/groue/GRMustache.swift), a pure Swift implementation of GRMustache. 20 | 21 | 22 | How To 23 | ------ 24 | 25 | ### 1. Setup your Xcode project 26 | 27 | You have three options, from the simplest to the hairiest: 28 | 29 | - [CocoaPods](Guides/installation.md#option-1-cocoapods) 30 | - [Static Library](Guides/installation.md#option-2-static-library) 31 | - [Compile the raw sources](Guides/installation.md#option-3-compiling-the-raw-sources) 32 | 33 | 34 | ### 2. Start rendering templates 35 | 36 | ```objc 37 | #import "GRMustache.h" 38 | ``` 39 | 40 | One-liners: 41 | 42 | ```objc 43 | // Renders "Hello Arthur!" 44 | NSString *rendering = [GRMustacheTemplate renderObject:@{ @"name": @"Arthur" } fromString:@"Hello {{name}}!" error:NULL]; 45 | ``` 46 | 47 | ```objc 48 | // Renders the `Profile.mustache` resource of the main bundle 49 | NSString *rendering = [GRMustacheTemplate renderObject:user fromResource:@"Profile" bundle:nil error:NULL]; 50 | ``` 51 | 52 | Reuse templates in order to avoid parsing the same template several times: 53 | 54 | ```objc 55 | GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:@"Profile" bundle:nil error:nil]; 56 | rendering = [template renderObject:arthur error:NULL]; 57 | rendering = [template renderObject:barbara error:NULL]; 58 | rendering = ... 59 | ``` 60 | 61 | 62 | Documentation 63 | ------------- 64 | 65 | If you don't know Mustache, start here: http://mustache.github.io/mustache.5.html 66 | 67 | - [Guides](Guides/README.md): a guided tour of GRMustache 68 | - [Reference](http://groue.github.io/GRMustache/Reference/): all classes & protocols 69 | - [Troubleshooting](Guides/troubleshooting.md) 70 | - [FAQ](Guides/faq.md) 71 | 72 | 73 | License 74 | ------- 75 | 76 | Released under the [MIT License](LICENSE). 77 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheExpression.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheExpression_private.h" 24 | 25 | @implementation GRMustacheExpression 26 | @synthesize token=_token; 27 | 28 | - (void)dealloc 29 | { 30 | [_token release]; 31 | [super dealloc]; 32 | } 33 | 34 | - (BOOL)isEqual:(id)anObject 35 | { 36 | return [super isEqual:anObject]; 37 | } 38 | 39 | - (BOOL)acceptVisitor:(id)visitor error:(NSError **)error 40 | { 41 | return YES; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheExpressionVisitor_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | @class GRMustacheFilteredExpression; 27 | @class GRMustacheIdentifierExpression; 28 | @class GRMustacheImplicitIteratorExpression; 29 | @class GRMustacheScopedExpression; 30 | 31 | @protocol GRMustacheExpressionVisitor 32 | 33 | // Don't use these methods directly. Use -[GRMustacheExpression acceptVisitor:error:] instead 34 | - (BOOL)visitFilteredExpression:(GRMustacheFilteredExpression *)expression error:(NSError **)error GRMUSTACHE_API_INTERNAL; 35 | - (BOOL)visitIdentifierExpression:(GRMustacheIdentifierExpression *)expression error:(NSError **)error GRMUSTACHE_API_INTERNAL; 36 | - (BOOL)visitImplicitIteratorExpression:(GRMustacheImplicitIteratorExpression *)expression error:(NSError **)error GRMUSTACHE_API_INTERNAL; 37 | - (BOOL)visitScopedExpression:(GRMustacheScopedExpression *)expression error:(NSError **)error GRMUSTACHE_API_INTERNAL; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheExpression_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | @class GRMustacheToken; 27 | @protocol GRMustacheExpressionVisitor; 28 | 29 | /** 30 | * The GRMustacheExpression is the base class for objects that represent 31 | * Mustache expression such as `name`, `uppercase(name)`, or `user.name`. 32 | */ 33 | @interface GRMustacheExpression : NSObject { 34 | @private 35 | GRMustacheToken *_token; 36 | } 37 | 38 | /** 39 | * This property stores a token whose sole purpose is to help the library user 40 | * debugging his templates, using the token's ability to output its location 41 | * (`{{ foo }}` at line 23 of /path/to/template). 42 | */ 43 | @property (nonatomic, retain) GRMustacheToken *token GRMUSTACHE_API_INTERNAL; 44 | 45 | /** 46 | * Returns a Boolean value that indicates whether the receiver and a given 47 | * object are equal. 48 | * 49 | * Expressions are equal if and only if the result of their 50 | * `hasValue:withContext:protected:error:` implementation would return the same 51 | * value in a given rendering context. 52 | * 53 | * Default implementation is NSObject's one: subclasses must override. 54 | * 55 | * @param anObject The object to be compared to the receiver. 56 | * 57 | * @return YES if the receiver and anObject are equal, otherwise NO. 58 | */ 59 | - (BOOL)isEqual:(id)anObject; // no availability macro for Foundation method declaration 60 | 61 | /** 62 | * Has the visitor visit the expression. 63 | */ 64 | - (BOOL)acceptVisitor:(id)visitor error:(NSError **)error GRMUSTACHE_API_INTERNAL; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheFilteredExpression_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheExpression_private.h" 24 | 25 | /** 26 | * The GRMustacheFilteredExpression represents expressions such as 27 | * `()`. 28 | */ 29 | @interface GRMustacheFilteredExpression : GRMustacheExpression { 30 | @private 31 | GRMustacheExpression *_filterExpression; 32 | GRMustacheExpression *_argumentExpression; 33 | BOOL _curried; 34 | } 35 | 36 | @property (nonatomic, retain, readonly) GRMustacheExpression *filterExpression GRMUSTACHE_API_INTERNAL; 37 | @property (nonatomic, retain, readonly) GRMustacheExpression *argumentExpression GRMUSTACHE_API_INTERNAL; 38 | @property (nonatomic, getter=isCurried, readonly) BOOL curried GRMUSTACHE_API_INTERNAL; 39 | 40 | /** 41 | * Returns a filtered expression, given an expression that returns a filter, and 42 | * an expression that return the filter argument. 43 | * 44 | * For example, the Mustache tag `{{ f(x) }}` contains a filtered expression, 45 | * whose filterExpression is a GRMustacheIdentifierExpression (for the 46 | * identifier `f`), and whose argumentExpression is a 47 | * GRMustacheIdentifierExpression (for the identifier `x`). 48 | * 49 | * @param filterExpression An expression whose value is an object conforming 50 | * to the protocol. 51 | * @param argumentExpression An expression whose value is the argument of the 52 | * filter. 53 | * @param curried If YES, this expression must evaluate to a filter. 54 | * 55 | * @return A GRMustacheFilteredExpression. 56 | */ 57 | + (instancetype)expressionWithFilterExpression:(GRMustacheExpression *)filterExpression argumentExpression:(GRMustacheExpression *)argumentExpression curried:(BOOL)curried GRMUSTACHE_API_INTERNAL; 58 | @end 59 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheIdentifierExpression.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheIdentifierExpression_private.h" 24 | #import "GRMustacheExpressionVisitor_private.h" 25 | 26 | @implementation GRMustacheIdentifierExpression 27 | @synthesize identifier=_identifier; 28 | 29 | + (instancetype)expressionWithIdentifier:(NSString *)identifier 30 | { 31 | return [[[self alloc] initWithIdentifier:identifier] autorelease]; 32 | } 33 | 34 | - (void)dealloc 35 | { 36 | [_identifier release]; 37 | [super dealloc]; 38 | } 39 | 40 | 41 | #pragma mark - GRMustacheExpression 42 | 43 | - (BOOL)isEqual:(id)expression 44 | { 45 | if (![expression isKindOfClass:[GRMustacheIdentifierExpression class]]) { 46 | return NO; 47 | } 48 | return [_identifier isEqual:((GRMustacheIdentifierExpression *)expression).identifier]; 49 | } 50 | 51 | - (NSUInteger)hash 52 | { 53 | return [_identifier hash]; 54 | } 55 | 56 | - (BOOL)acceptVisitor:(id)visitor error:(NSError **)error 57 | { 58 | return [visitor visitIdentifierExpression:self error:error]; 59 | } 60 | 61 | 62 | #pragma mark - Private 63 | 64 | - (instancetype)initWithIdentifier:(NSString *)identifier 65 | { 66 | self = [super init]; 67 | if (self) { 68 | _identifier = [identifier retain]; 69 | } 70 | return self; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheIdentifierExpression_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheExpression_private.h" 24 | 25 | /** 26 | * The GRMustacheIdentifierExpression represents expressions such as 27 | * `identifier`. 28 | */ 29 | @interface GRMustacheIdentifierExpression : GRMustacheExpression { 30 | @private 31 | NSString *_identifier; 32 | } 33 | 34 | @property (nonatomic, retain, readonly) NSString *identifier GRMUSTACHE_API_INTERNAL; 35 | 36 | /** 37 | * Returns an identifier expression, given an identifier. 38 | * 39 | * For example, the Mustache tag `{{ name }}` contains an identifier 40 | * expression, whose identifier is `name`. 41 | * 42 | * @param identifier An identifier 43 | * 44 | * @return A GRMustacheIdentifierExpression. 45 | */ 46 | + (instancetype)expressionWithIdentifier:(NSString *)identifier GRMUSTACHE_API_INTERNAL; 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheImplicitIteratorExpression.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheImplicitIteratorExpression_private.h" 24 | #import "GRMustacheExpressionVisitor_private.h" 25 | 26 | static GRMustacheImplicitIteratorExpression *instance; 27 | 28 | @implementation GRMustacheImplicitIteratorExpression 29 | 30 | + (void)initialize 31 | { 32 | instance = [[self alloc] init]; 33 | } 34 | 35 | + (instancetype)expression 36 | { 37 | return instance; 38 | } 39 | 40 | 41 | #pragma mark - GRMustacheExpression 42 | 43 | - (BOOL)isEqual:(id)expression 44 | { 45 | return expression == instance; 46 | } 47 | 48 | - (BOOL)acceptVisitor:(id)visitor error:(NSError **)error 49 | { 50 | return [visitor visitImplicitIteratorExpression:self error:error]; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheImplicitIteratorExpression_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheExpression_private.h" 24 | 25 | /** 26 | * The GRMustacheImplicitIteratorExpression represents the `.` expression. 27 | */ 28 | @interface GRMustacheImplicitIteratorExpression : GRMustacheExpression 29 | 30 | /** 31 | * Returns an "implicit iterator" expression. 32 | * 33 | * For example, the Mustache tag `{{ . }}` contains an implicit iterator 34 | * expression. 35 | * 36 | * @return A GRMustacheImplicitIteratorExpression. 37 | */ 38 | + (instancetype)expression GRMUSTACHE_API_INTERNAL; 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheScopedExpression.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheScopedExpression_private.h" 24 | #import "GRMustacheExpressionVisitor_private.h" 25 | 26 | 27 | @implementation GRMustacheScopedExpression 28 | @synthesize baseExpression=_baseExpression; 29 | @synthesize identifier=_identifier; 30 | 31 | + (instancetype)expressionWithBaseExpression:(GRMustacheExpression *)baseExpression identifier:(NSString *)identifier 32 | { 33 | return [[[self alloc] initWithBaseExpression:baseExpression identifier:identifier] autorelease]; 34 | } 35 | 36 | - (void)dealloc 37 | { 38 | [_baseExpression release]; 39 | [_identifier release]; 40 | [super dealloc]; 41 | } 42 | 43 | 44 | #pragma mark - GRMustacheExpression 45 | 46 | - (void)setToken:(GRMustacheToken *)token 47 | { 48 | [super setToken:token]; 49 | _baseExpression.token = token; 50 | } 51 | 52 | - (BOOL)isEqual:(id)expression 53 | { 54 | if (![expression isKindOfClass:[GRMustacheScopedExpression class]]) { 55 | return NO; 56 | } 57 | if (![_baseExpression isEqual:((GRMustacheScopedExpression *)expression).baseExpression]) { 58 | return NO; 59 | } 60 | return [_identifier isEqual:((GRMustacheScopedExpression *)expression).identifier]; 61 | } 62 | 63 | - (NSUInteger)hash 64 | { 65 | return [_baseExpression hash] ^ [_identifier hash]; 66 | } 67 | 68 | - (BOOL)acceptVisitor:(id)visitor error:(NSError **)error 69 | { 70 | return [visitor visitScopedExpression:self error:error]; 71 | } 72 | 73 | 74 | #pragma mark - Private 75 | 76 | - (instancetype)initWithBaseExpression:(GRMustacheExpression *)baseExpression identifier:(NSString *)identifier 77 | { 78 | self = [super init]; 79 | if (self) { 80 | _baseExpression = [baseExpression retain]; 81 | _identifier = [identifier retain]; 82 | } 83 | return self; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/Expressions/GRMustacheScopedExpression_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheExpression_private.h" 24 | 25 | /** 26 | * The GRMustacheScopedExpression represents expressions such as 27 | * `.identifier`. 28 | */ 29 | @interface GRMustacheScopedExpression : GRMustacheExpression { 30 | @private 31 | GRMustacheExpression *_baseExpression; 32 | NSString *_identifier; 33 | } 34 | 35 | @property (nonatomic, retain, readonly) GRMustacheExpression *baseExpression GRMUSTACHE_API_INTERNAL; 36 | @property (nonatomic, retain, readonly) NSString *identifier GRMUSTACHE_API_INTERNAL; 37 | 38 | /** 39 | * Returns a scoped expression, given an expression that returns a value, and 40 | * an identifier. 41 | * 42 | * For example, the Mustache tag `{{ person.name }}` contains a scoped 43 | * expression, whose baseExpression is a GRMustacheIdentifierExpression (for the 44 | * identifier `person`), and whose identifier is `name`. 45 | * 46 | * @param baseExpression An expression. 47 | * @param identifier An identifier. 48 | * 49 | * @return A GRMustacheScopedExpression. 50 | */ 51 | + (instancetype)expressionWithBaseExpression:(GRMustacheExpression *)baseExpression identifier:(NSString *)identifier GRMUSTACHE_API_INTERNAL; 52 | @end 53 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheInheritablePartialNode_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | #import "GRMustacheTemplateASTNode_private.h" 26 | 27 | @class GRMustachePartialNode; 28 | @class GRMustacheTemplateAST; 29 | 30 | /** 31 | * A GRMustacheInheritablePartialNode is an AST node that represents inheritable 32 | * partials as `{{ { 35 | @private 36 | GRMustachePartialNode *_partialNode; 37 | GRMustacheTemplateAST *_overridingTemplateAST; 38 | } 39 | 40 | /** 41 | * The overriding AST, built from the inner content of the inheritable partial 42 | * node: 43 | * 44 | * {{< ... }} AST {{/ }} 45 | */ 46 | @property (nonatomic, retain, readonly) GRMustacheTemplateAST *overridingTemplateAST GRMUSTACHE_API_INTERNAL; 47 | 48 | /** 49 | * The partial template that is inherited: 50 | * 51 | * {{< inherited_partial_template }}...{{/ }} 52 | */ 53 | @property (nonatomic, retain, readonly) GRMustachePartialNode *partialNode GRMUSTACHE_API_INTERNAL; 54 | 55 | /** 56 | * Builds a GRMustacheInheritablePartialNode. 57 | * 58 | * @param partialNode The inherited partial. 59 | * @param templateAST The AST that overrides the inherited partial template. 60 | * 61 | * @return A GRMustacheInheritablePartialNode 62 | */ 63 | + (instancetype)inheritablePartialNodeWithPartialNode:(GRMustachePartialNode *)partialNode overridingTemplateAST:(GRMustacheTemplateAST *)overridingTemplateAST GRMUSTACHE_API_INTERNAL; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheInheritableSectionNode_private.h" 24 | #import "GRMustacheTemplateASTVisitor_private.h" 25 | 26 | @implementation GRMustacheInheritableSectionNode 27 | @synthesize name=_name; 28 | @synthesize templateAST=_templateAST; 29 | 30 | + (instancetype)inheritableSectionNodeWithName:(NSString *)name templateAST:(GRMustacheTemplateAST *)templateAST 31 | { 32 | return [[[self alloc] initWithName:name templateAST:templateAST] autorelease]; 33 | } 34 | 35 | - (void)dealloc 36 | { 37 | [_name release]; 38 | [_templateAST release]; 39 | [super dealloc]; 40 | } 41 | 42 | 43 | #pragma mark - 44 | 45 | - (BOOL)acceptTemplateASTVisitor:(id)visitor error:(NSError **)error 46 | { 47 | return [visitor visitInheritableSectionNode:self error:error]; 48 | } 49 | 50 | - (id)resolveTemplateASTNode:(id)templateASTNode 51 | { 52 | // Inheritable section can only override inheritable section 53 | if (![templateASTNode isKindOfClass:[GRMustacheInheritableSectionNode class]]) { 54 | return templateASTNode; 55 | } 56 | GRMustacheInheritableSectionNode *otherSection = (GRMustacheInheritableSectionNode *)templateASTNode; 57 | 58 | // names must match 59 | if (![otherSection.name isEqual:_name]) { 60 | return otherSection; 61 | } 62 | 63 | // OK, override with self 64 | return self; 65 | } 66 | 67 | 68 | #pragma mark - Private 69 | 70 | - (instancetype)initWithName:(NSString *)name templateAST:(GRMustacheTemplateAST *)templateAST 71 | { 72 | self = [self init]; 73 | if (self) { 74 | _name = [name retain]; 75 | _templateAST = [templateAST retain]; 76 | } 77 | return self; 78 | } 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | #import "GRMustacheTemplateASTNode_private.h" 26 | 27 | @class GRMustacheTemplateAST; 28 | 29 | /** 30 | * A GRMustacheInheritableSection is an AST node that represents inheritable 31 | * sections as `{{$name}}...{{/name}}`. 32 | */ 33 | @interface GRMustacheInheritableSectionNode : NSObject { 34 | @private 35 | NSString *_name; 36 | GRMustacheTemplateAST *_templateAST; 37 | } 38 | 39 | /** 40 | * The AST of the inner content of the section 41 | * 42 | * {{$ ... }} AST {{/ }} 43 | */ 44 | @property (nonatomic, retain, readonly) GRMustacheTemplateAST *templateAST GRMUSTACHE_API_INTERNAL; 45 | 46 | /** 47 | * The name of the inheritable section: 48 | * 49 | * {{$ name }} ... {{/ }} 50 | */ 51 | @property (nonatomic, readonly) NSString *name GRMUSTACHE_API_INTERNAL; 52 | 53 | /** 54 | * Returns a new inheritable section. 55 | * 56 | * @param name The name of the inheritable section 57 | * @param templateAST The AST of the inner content of the section 58 | * 59 | * @return a new GRMustacheInheritableSection. 60 | * 61 | * @see GRMustacheTemplateASTNode 62 | */ 63 | + (instancetype)inheritableSectionNodeWithName:(NSString *)name templateAST:(GRMustacheTemplateAST *)templateAST GRMUSTACHE_API_INTERNAL; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustachePartialNode_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheAvailabilityMacros_private.h" 24 | #import "GRMustacheTemplateASTNode_private.h" 25 | 26 | @class GRMustacheTemplateAST; 27 | 28 | /** 29 | * A GRMustachePartialNode is an AST node that represents partial tags as 30 | * `{{>name}}`. 31 | */ 32 | @interface GRMustachePartialNode : NSObject { 33 | @private 34 | NSString *_name; 35 | GRMustacheTemplateAST *_templateAST; 36 | } 37 | 38 | /** 39 | * The name of the partial: 40 | * 41 | * {{> name }} 42 | */ 43 | @property (nonatomic, retain, readonly) NSString *name GRMUSTACHE_API_INTERNAL; 44 | 45 | /** 46 | * The abstract syntax tree of the partial template. 47 | */ 48 | @property (nonatomic, retain, readonly) GRMustacheTemplateAST *templateAST GRMUSTACHE_API_INTERNAL; 49 | 50 | /** 51 | * Returns a newly created partial node. 52 | * 53 | * @param templateAST The abstract syntax tree of the partial template. 54 | * @param name The name of the partial template. 55 | * 56 | * @return a newly created partial node. 57 | */ 58 | + (instancetype)partialNodeWithTemplateAST:(GRMustacheTemplateAST *)templateAST name:(NSString *)name GRMUSTACHE_API_INTERNAL; 59 | @end 60 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheSectionTag_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheAvailabilityMacros_private.h" 24 | #import "GRMustacheTag_private.h" 25 | #import "GRMustacheContentType.h" 26 | 27 | @class GRMustacheExpression; 28 | @class GRMustacheTemplateAST; 29 | 30 | @interface GRMustacheSectionTag : GRMustacheTag { 31 | @private 32 | GRMustacheExpression *_expression; 33 | BOOL _inverted; 34 | NSString *_templateString; 35 | NSRange _innerRange; 36 | GRMustacheTemplateAST *_templateAST; 37 | } 38 | 39 | @property (nonatomic, retain, readonly) GRMustacheExpression *expression GRMUSTACHE_API_INTERNAL; 40 | @property (nonatomic, retain, readonly) GRMustacheTemplateAST *templateAST GRMUSTACHE_API_INTERNAL; 41 | 42 | 43 | /** 44 | * Builds a GRMustacheSectionTag. 45 | * 46 | * The rendering of Mustache sections depend on the value they are attached to. 47 | * The value is fetched by evaluating the _expression_ parameter against a 48 | * rendering context. 49 | * 50 | * The templateAST describes the inner content of the section 51 | * 52 | * @param expression The expression that would evaluate against a 53 | * rendering context. 54 | * @param inverted NO for {{# section }}, YES for {{^ section }}. 55 | * @param templateString A Mustache template string. 56 | * @param innerRange The range of the inner template string of the 57 | * section in _templateString_. 58 | * @param templateAST The AST of the inner content of the section. 59 | * 60 | * @return A GRMustacheSectionTag 61 | * 62 | * @see GRMustacheExpression 63 | */ 64 | + (instancetype)sectionTagWithExpression:(GRMustacheExpression *)expression inverted:(BOOL)inverted templateString:(NSString *)templateString innerRange:(NSRange)innerRange templateAST:(GRMustacheTemplateAST *)templateAST GRMUSTACHE_API_INTERNAL; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTag.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheTag_private.h" 25 | #import "GRMustacheRendering_private.h" 26 | 27 | @implementation GRMustacheTag 28 | 29 | - (GRMustacheTagType)type 30 | { 31 | [self doesNotRecognizeSelector:_cmd]; 32 | return 0; 33 | } 34 | 35 | - (GRMustacheTemplateRepository *)templateRepository 36 | { 37 | return [GRMustacheRendering currentTemplateRepository]; 38 | } 39 | 40 | - (NSString *)innerTemplateString 41 | { 42 | [self doesNotRecognizeSelector:_cmd]; 43 | return nil; 44 | } 45 | 46 | - (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error 47 | { 48 | [self doesNotRecognizeSelector:_cmd]; 49 | return nil; 50 | } 51 | 52 | - (BOOL)isInverted 53 | { 54 | [self doesNotRecognizeSelector:_cmd]; 55 | return NO; 56 | } 57 | 58 | #pragma mark - 59 | 60 | - (id)resolveTemplateASTNode:(id)templateASTNode 61 | { 62 | return templateASTNode; 63 | } 64 | 65 | - (BOOL)acceptTemplateASTVisitor:(id)visitor error:(NSError **)error 66 | { 67 | [self doesNotRecognizeSelector:_cmd]; 68 | return NO; 69 | } 70 | 71 | @end 72 | 73 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTag_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | #import "GRMustacheTemplateASTNode_private.h" 26 | 27 | @class GRMustacheContext; 28 | @class GRMustacheTemplateRepository; 29 | 30 | // Documented in GRMustacheTag.h 31 | typedef NS_ENUM(NSUInteger, GRMustacheTagType) { 32 | GRMustacheTagTypeVariable = 1 << 1 GRMUSTACHE_API_PUBLIC, 33 | GRMustacheTagTypeSection = 1 << 2 GRMUSTACHE_API_PUBLIC, 34 | } GRMUSTACHE_API_PUBLIC; 35 | 36 | // Documented in GRMustacheTag.h 37 | @interface GRMustacheTag: NSObject 38 | 39 | // Documented in GRMustacheTag.h 40 | @property (nonatomic, readonly) GRMustacheTagType type GRMUSTACHE_API_PUBLIC; 41 | 42 | // Documented in GRMustacheTag.h 43 | @property (nonatomic, readonly) NSString *innerTemplateString GRMUSTACHE_API_PUBLIC; 44 | 45 | // Documented in GRMustacheTag.h 46 | @property (nonatomic, readonly) GRMustacheTemplateRepository *templateRepository GRMUSTACHE_API_PUBLIC_BUT_DEPRECATED; 47 | 48 | // Documented in GRMustacheTag.h 49 | - (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error GRMUSTACHE_API_PUBLIC; 50 | 51 | /** 52 | * TODO 53 | */ 54 | @property (nonatomic, readonly, getter=isInverted) BOOL inverted GRMUSTACHE_API_INTERNAL; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTemplateAST.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheTemplateAST_private.h" 24 | #import "GRMustacheTemplateASTNode_private.h" 25 | #import "GRMustacheTemplateASTVisitor_private.h" 26 | 27 | @implementation GRMustacheTemplateAST 28 | @synthesize templateASTNodes=_templateASTNodes; 29 | @synthesize contentType=_contentType; 30 | 31 | - (void)dealloc 32 | { 33 | [_templateASTNodes release]; 34 | [super dealloc]; 35 | } 36 | 37 | + (instancetype)placeholderAST 38 | { 39 | return [[[self alloc] initWithASTNodes:nil contentType:GRMustacheContentTypeHTML] autorelease]; 40 | } 41 | 42 | + (instancetype)templateASTWithASTNodes:(NSArray *)templateASTNodes contentType:(GRMustacheContentType)contentType 43 | { 44 | NSAssert(templateASTNodes, @"nil templateASTNodes"); 45 | return [[[self alloc] initWithASTNodes:templateASTNodes contentType:contentType] autorelease]; 46 | } 47 | 48 | - (BOOL)isPlaceholder 49 | { 50 | return (_templateASTNodes == nil); 51 | } 52 | 53 | - (instancetype)initWithASTNodes:(NSArray *)templateASTNodes contentType:(GRMustacheContentType)contentType 54 | { 55 | self = [super init]; 56 | if (self) { 57 | _templateASTNodes = [templateASTNodes retain]; 58 | _contentType = contentType; 59 | } 60 | return self; 61 | } 62 | 63 | 64 | #pragma mark - 65 | 66 | - (BOOL)acceptTemplateASTVisitor:(id)visitor error:(NSError **)error 67 | { 68 | return [visitor visitTemplateAST:self error:error]; 69 | } 70 | 71 | - (id)resolveTemplateASTNode:(id)templateASTNode 72 | { 73 | return templateASTNode; 74 | } 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTemplateASTVisitor_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | @class GRMustacheTemplateAST; 27 | @class GRMustacheInheritablePartialNode; 28 | @class GRMustacheInheritableSectionNode; 29 | @class GRMustachePartialNode; 30 | @class GRMustacheVariableTag; 31 | @class GRMustacheSectionTag; 32 | @class GRMustacheTextNode; 33 | 34 | @protocol GRMustacheTemplateASTVisitor 35 | 36 | // Don't use these methods directly. Use -[ 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | #import "GRMustacheContentType.h" 26 | #import "GRMustacheTemplateASTVisitor_private.h" 27 | #import "GRMustacheTemplateASTNode_private.h" 28 | 29 | /** 30 | * The GRMustacheTemplateAST represents the abstract syntax tree of a template. 31 | */ 32 | @interface GRMustacheTemplateAST : NSObject { 33 | @private 34 | NSArray *_templateASTNodes; 35 | GRMustacheContentType _contentType; 36 | } 37 | 38 | /** 39 | * An NSArray containing instances 40 | * 41 | * @see GRMustacheTemplateASTNode 42 | */ 43 | @property (nonatomic, retain) NSArray *templateASTNodes GRMUSTACHE_API_INTERNAL; 44 | 45 | /** 46 | * The content type of the AST 47 | */ 48 | @property (nonatomic) GRMustacheContentType contentType GRMUSTACHE_API_INTERNAL; 49 | 50 | /** 51 | * Used by GRMustacheTemplateRepository, which uses placeholder ASTs when 52 | * building recursive templates. 53 | */ 54 | @property (nonatomic, readonly, getter = isPlaceholder) BOOL placeholder GRMUSTACHE_API_INTERNAL; 55 | 56 | /** 57 | * Returns a new allocated AST. 58 | * 59 | * @param templateASTNodes An array of instances. 60 | * @param contentType A content type 61 | * 62 | * @return A new GRMustacheTemplateAST 63 | * 64 | * @see GRMustacheTemplateASTNode 65 | */ 66 | + (instancetype)templateASTWithASTNodes:(NSArray *)templateASTNodes contentType:(GRMustacheContentType)contentType GRMUSTACHE_API_INTERNAL; 67 | 68 | /** 69 | * Returns a placeholder AST 70 | * @see placeholder 71 | */ 72 | + (instancetype)placeholderAST GRMUSTACHE_API_INTERNAL; 73 | 74 | @end 75 | 76 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTextNode.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheTextNode_private.h" 24 | #import "GRMustacheTemplateASTVisitor_private.h" 25 | 26 | @implementation GRMustacheTextNode 27 | 28 | + (instancetype)textNodeWithText:(NSString *)text 29 | { 30 | return [[[self alloc] initWithText:text] autorelease]; 31 | } 32 | 33 | - (void)dealloc 34 | { 35 | [_text release]; 36 | [super dealloc]; 37 | } 38 | 39 | - (NSString *)text 40 | { 41 | return _text; 42 | } 43 | 44 | 45 | #pragma mark - 46 | 47 | - (BOOL)acceptTemplateASTVisitor:(id)visitor error:(NSError **)error 48 | { 49 | return [visitor visitTextNode:self error:error]; 50 | } 51 | 52 | - (id)resolveTemplateASTNode:(id)templateASTNode 53 | { 54 | return templateASTNode; 55 | } 56 | 57 | 58 | #pragma mark - Private 59 | 60 | - (instancetype)initWithText:(NSString *)text 61 | { 62 | NSAssert(text, @"WTF"); 63 | self = [self init]; 64 | if (self) { 65 | _text = [text retain]; 66 | } 67 | return self; 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTextNode_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | #import "GRMustacheTemplateASTNode_private.h" 26 | 27 | /** 28 | * A GRMustacheTextNode is an AST node that represents raw text. 29 | */ 30 | @interface GRMustacheTextNode: NSObject { 31 | @private 32 | NSString *_text; 33 | } 34 | 35 | /** 36 | * The text of the text node. 37 | */ 38 | @property (nonatomic, retain, readonly) NSString *text GRMUSTACHE_API_INTERNAL; 39 | 40 | /** 41 | * Builds and returns a GRMustacheTextNode. 42 | * 43 | * @param string The string that should be rendered. 44 | * @return a GRMustacheTextNode 45 | */ 46 | + (instancetype)textNodeWithText:(NSString *)string GRMUSTACHE_API_INTERNAL; 47 | 48 | @end 49 | 50 | 51 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Compiling/TemplateAST/GRMustacheVariableTag_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheAvailabilityMacros_private.h" 24 | #import "GRMustacheTag_private.h" 25 | #import "GRMustacheContentType.h" 26 | 27 | @class GRMustacheExpression; 28 | 29 | @interface GRMustacheVariableTag : GRMustacheTag { 30 | @private 31 | GRMustacheExpression *_expression; 32 | BOOL _escapesHTML; 33 | GRMustacheContentType _contentType; 34 | } 35 | 36 | @property (nonatomic, retain, readonly) GRMustacheExpression *expression GRMUSTACHE_API_INTERNAL; 37 | @property (nonatomic, readonly) BOOL escapesHTML GRMUSTACHE_API_INTERNAL; 38 | 39 | /** 40 | * Builds and returns a GRMustacheVariableTag. 41 | * 42 | * @param expression The expression that would evaluate against a rendering 43 | * contex. 44 | * @param escapesHTML YES if the value should be escaped. 45 | * @param contentType The content type of the tag rendering. 46 | * 47 | * @return a GRMustacheVariableTag 48 | * 49 | * @see GRMustacheExpression 50 | */ 51 | + (instancetype)variableTagWithExpression:(GRMustacheExpression *)expression escapesHTML:(BOOL)escapesHTML contentType:(GRMustacheContentType)contentType GRMUSTACHE_API_INTERNAL; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/GRMustacheVersion.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | 24 | /** 25 | * The major component of GRMustache version 26 | * 27 | * @since v1.0 28 | */ 29 | #define GRMUSTACHE_MAJOR_VERSION 7 30 | 31 | /** 32 | * The minor component of GRMustache version 33 | * 34 | * @since v1.0 35 | */ 36 | #define GRMUSTACHE_MINOR_VERSION 3 37 | 38 | /** 39 | * The patch-level component of GRMustache version 40 | * 41 | * @since v1.0 42 | */ 43 | #define GRMUSTACHE_PATCH_VERSION 2 44 | 45 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/GRMustache_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | @protocol GRMustacheRendering; 27 | @class GRMustacheTag; 28 | @class GRMustacheContext; 29 | 30 | // Documented in GRMustache.h 31 | typedef struct { 32 | int major; 33 | int minor; 34 | int patch; 35 | } GRMustacheVersion; 36 | 37 | @interface GRMustache: NSObject 38 | 39 | // Documented in GRMustache.h 40 | + (GRMustacheVersion)libraryVersion GRMUSTACHE_API_PUBLIC; 41 | 42 | // Documented in GRMustache.h 43 | + (void)preventNSUndefinedKeyExceptionAttack GRMUSTACHE_API_PUBLIC; 44 | 45 | // Documented in GRMustache.h 46 | + (NSObject *)standardLibrary GRMUSTACHE_API_PUBLIC; 47 | 48 | // Documented in GRMustache.h 49 | + (id)renderingObjectForObject:(id)object GRMUSTACHE_API_PUBLIC_BUT_DEPRECATED; 50 | 51 | // Documented in GRMustache.h 52 | + (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))block GRMUSTACHE_API_PUBLIC_BUT_DEPRECATED; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Parsing/GRMustacheExpressionParser_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | @class GRMustacheExpression; 27 | 28 | @interface GRMustacheExpressionParser : NSObject 29 | 30 | /** 31 | * Returns an expression from a string. 32 | * 33 | * @param string A string. 34 | * @param empty If there is an error parsing the expression, upon return 35 | * contains YES if the string contains no expression. 36 | * @param error If there is an error parsing the expression, upon return 37 | * contains an NSError object that describes the problem. 38 | * 39 | * @return An expression, or nil if the parsing fails or if the expression is 40 | * empty. 41 | */ 42 | - (GRMustacheExpression *)parseExpression:(NSString *)string empty:(BOOL *)empty error:(NSError **)error GRMUSTACHE_API_INTERNAL; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Parsing/GRMustacheToken.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheToken_private.h" 24 | 25 | 26 | @implementation GRMustacheToken 27 | @synthesize type=_type; 28 | @synthesize templateString=_templateString; 29 | @synthesize templateID=_templateID; 30 | @synthesize line=_line; 31 | @synthesize range=_range; 32 | @synthesize tagInnerRange=_tagInnerRange; 33 | 34 | - (void)dealloc 35 | { 36 | [_templateString release]; 37 | [_templateID release]; 38 | [super dealloc]; 39 | } 40 | 41 | + (instancetype)tokenWithType:(GRMustacheTokenType)type templateString:(NSString *)templateString templateID:(id)templateID line:(NSUInteger)line range:(NSRange)range 42 | { 43 | GRMustacheToken *token = [[[self alloc] init] autorelease]; 44 | token.type = type; 45 | token.templateString = templateString; 46 | token.templateID = templateID; 47 | token.line = line; 48 | token.range = range; 49 | return token; 50 | } 51 | 52 | - (NSString *)templateSubstring 53 | { 54 | return [_templateString substringWithRange:_range]; 55 | } 56 | 57 | - (NSString *)tagInnerContent 58 | { 59 | return [_templateString substringWithRange:_tagInnerRange]; 60 | } 61 | 62 | @end 63 | 64 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Rendering/GRMustacheExpressionInvocation_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | @class GRMustacheContext; 27 | @class GRMustacheExpression; 28 | 29 | /** 30 | * TODO 31 | */ 32 | @interface GRMustacheExpressionInvocation : NSObject { 33 | @private 34 | GRMustacheContext *_context; 35 | GRMustacheExpression *_expression; 36 | id _value; 37 | BOOL _valueIsProtected; 38 | } 39 | 40 | /** 41 | * TODO 42 | */ 43 | @property (nonatomic, assign) GRMustacheContext *context GRMUSTACHE_API_INTERNAL; 44 | 45 | /** 46 | * TODO 47 | */ 48 | @property (nonatomic, assign) GRMustacheExpression *expression GRMUSTACHE_API_INTERNAL; 49 | 50 | /** 51 | * TODO 52 | */ 53 | @property (nonatomic, assign, readonly) id value GRMUSTACHE_API_INTERNAL; 54 | 55 | /** 56 | * TODO 57 | */ 58 | @property (nonatomic, readonly) BOOL valueIsProtected GRMUSTACHE_API_INTERNAL; 59 | 60 | /** 61 | * TODO 62 | */ 63 | - (BOOL)invokeReturningError:(NSError **)error GRMUSTACHE_API_INTERNAL; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Rendering/GRMustacheFilter_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | // prevent GRMustacheFilter.h to load 27 | #define GRMUSTACHE_FILTER 28 | 29 | // Documented in GRMustacheFilter.h 30 | @protocol GRMustacheFilter 31 | @required 32 | 33 | // Documented in GRMustacheFilter.h 34 | - (id)transformedValue:(id)object GRMUSTACHE_API_PUBLIC; 35 | 36 | @optional 37 | 38 | /** 39 | * Returns a new filter that uses the _object_ parameter. 40 | * 41 | * Filter currying is involved in `f(a,...)` expressions, filters with more than 42 | * one argument. 43 | * 44 | * The evaluation of `f(a,b)` is implemented as `f(a)(b)`: the filter `f` is 45 | * asked for a curried filter using argument `a`. This curried filter `g` is 46 | * then applied to `b`: 47 | * 48 | * g = f(a) 49 | * f(a,b) = g(b) 50 | */ 51 | - (id)filterByCurryingArgument:(id)object GRMUSTACHE_API_INTERNAL; 52 | @end 53 | 54 | 55 | // Documented in GRMustacheFilter.h 56 | @interface GRMustacheFilter : NSObject 57 | 58 | // Documented in GRMustacheFilter.h 59 | + (id)filterWithBlock:(id(^)(id value))block GRMUSTACHE_API_PUBLIC; 60 | 61 | // Documented in GRMustacheFilter.h 62 | + (id)variadicFilterWithBlock:(id(^)(NSArray *arguments))block GRMUSTACHE_API_PUBLIC; 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Rendering/GRMustacheKeyAccess_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | #if !defined(NS_BLOCK_ASSERTIONS) 27 | /** 28 | * This global variable is used by GRPreventNSUndefinedKeyExceptionAttackTest. 29 | */ 30 | extern BOOL GRMustacheKeyAccessDidCatchNSUndefinedKeyException; 31 | #endif 32 | 33 | /** 34 | * GRMustacheKeyAccess implements all the GRMustache key-fetching logic. 35 | */ 36 | @interface GRMustacheKeyAccess : NSObject 37 | 38 | /** 39 | * Avoids most NSUndefinedException to be raised by the invocation of 40 | * `valueForMustacheKey:inObject:`. 41 | * 42 | * @see valueForMustacheKey:inObject: 43 | */ 44 | + (void)preventNSUndefinedKeyExceptionAttack GRMUSTACHE_API_INTERNAL; 45 | 46 | /** 47 | * Sends the `objectForKeyedSubscript:` or `valueForKey:` message to object 48 | * with the provided key, and returns the result. 49 | * 50 | * If object responds to `objectForKeyedSubscript:`, `valueForKey:` is not 51 | * invoked. 52 | * 53 | * If `valueForKey:` raise an NSUndefinedKeyException, the method returns nil. 54 | * 55 | * @param key The searched key 56 | * @param object The queried object 57 | * @param unsafeKeyAccess If YES, the `valueForKey:` method will be used 58 | * without any restriction. 59 | * 60 | * @return The value that should be handled by Mustache rendering for a given 61 | * key. 62 | */ 63 | + (id)valueForMustacheKey:(NSString *)key inObject:(id)object unsafeKeyAccess:(BOOL)unsafeKeyAccess GRMUSTACHE_API_INTERNAL; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Rendering/GRMustacheRenderingEngine_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | #import "GRMustacheContentType.h" 26 | #import "GRMustacheBuffer_private.h" 27 | 28 | @class GRMustacheContext; 29 | @class GRMustacheSectionTag; 30 | @class GRMustacheExpressionInvocation; 31 | @class GRMustacheTemplateAST; 32 | 33 | /** 34 | * TODO 35 | */ 36 | @interface GRMustacheRenderingEngine : NSObject { 37 | @private 38 | GRMustacheBuffer _buffer; 39 | GRMustacheContentType _contentType; 40 | GRMustacheContext *_context; 41 | } 42 | 43 | /** 44 | * TODO 45 | */ 46 | - (NSString *)renderTemplateAST:(GRMustacheTemplateAST *)templateAST HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error GRMUSTACHE_API_INTERNAL; 47 | 48 | /** 49 | * TODO 50 | */ 51 | + (instancetype)renderingEngineWithContentType:(GRMustacheContentType)contentType context:(GRMustacheContext *)context GRMUSTACHE_API_INTERNAL; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Rendering/GRMustacheSafeKeyAccess.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros.h" 25 | 26 | 27 | /** 28 | * Your data classes should conform to the GRMustacheSafeKeyAccess protocol 29 | * to filter the keys that can be accessed by GRMustache templates. 30 | * 31 | * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/runtime/security.md 32 | */ 33 | @protocol GRMustacheSafeKeyAccess 34 | 35 | /** 36 | * List the name of the keys GRMustache can access on this class using the 37 | * `valueForKey:` method. 38 | * 39 | * When objects do not respond to this method, only declared properties can be 40 | * accessed. All properties of Core Data NSManagedObjects are also accessible, 41 | * even without property declaration. 42 | * 43 | * This method is not used for objects responding to `objectForKeyedSubscript:`. 44 | * For those objects, all keys are accessible from templates. 45 | * 46 | * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md 47 | * 48 | * @return The set of accessible keys on the class. 49 | * 50 | * @since v7.0 51 | */ 52 | + (NSSet *)safeMustacheKeys AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/GRMustacheExpressionGenerator.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheExpressionGenerator_private.h" 24 | #import "GRMustacheExpressionVisitor_private.h" 25 | #import "GRMustacheFilteredExpression_private.h" 26 | #import "GRMustacheIdentifierExpression_private.h" 27 | #import "GRMustacheImplicitIteratorExpression_private.h" 28 | #import "GRMustacheScopedExpression_private.h" 29 | 30 | 31 | @interface GRMustacheExpressionGenerator() 32 | @end 33 | 34 | @implementation GRMustacheExpressionGenerator 35 | 36 | - (NSString *)stringWithExpression:(GRMustacheExpression *)expression 37 | { 38 | [expression acceptVisitor:self error:NULL]; 39 | return _expressionString; 40 | } 41 | 42 | 43 | #pragma mark - 44 | 45 | - (BOOL)visitFilteredExpression:(GRMustacheFilteredExpression *)expression error:(NSError **)error 46 | { 47 | _expressionString = [NSString stringWithFormat:@"%@(%@)", [self stringWithExpression:expression.filterExpression], [self stringWithExpression:expression.argumentExpression]]; 48 | return YES; 49 | } 50 | 51 | - (BOOL)visitIdentifierExpression:(GRMustacheIdentifierExpression *)expression error:(NSError **)error 52 | { 53 | _expressionString = expression.identifier; 54 | return YES; 55 | } 56 | 57 | - (BOOL)visitImplicitIteratorExpression:(GRMustacheImplicitIteratorExpression *)expression error:(NSError **)error 58 | { 59 | _expressionString = @"."; 60 | return YES; 61 | } 62 | 63 | - (BOOL)visitScopedExpression:(GRMustacheScopedExpression *)expression error:(NSError **)error 64 | { 65 | _expressionString = [NSString stringWithFormat:@"%@.%@", [self stringWithExpression:expression.baseExpression], expression.identifier]; 66 | return YES; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/GRMustacheExpressionGenerator_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | @class GRMustacheExpression; 27 | 28 | @interface GRMustacheExpressionGenerator : NSObject { 29 | @private 30 | NSString *_expressionString; 31 | } 32 | 33 | - (NSString *)stringWithExpression:(GRMustacheExpression *)expression GRMUSTACHE_API_INTERNAL; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/GRMustacheTemplateGenerator_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | @class GRMustacheTemplate; 27 | @class GRMustacheTemplateRepository; 28 | @class GRMustacheExpressionGenerator; 29 | 30 | @interface GRMustacheTemplateGenerator : NSObject { 31 | @private 32 | GRMustacheTemplateRepository *_templateRepository; 33 | GRMustacheExpressionGenerator *_expressionGenerator; 34 | NSMutableString *_templateString; 35 | } 36 | 37 | @property (nonatomic, retain, readonly) GRMustacheTemplateRepository *templateRepository GRMUSTACHE_API_INTERNAL; 38 | 39 | + (instancetype)templateGeneratorWithTemplateRepository:(GRMustacheTemplateRepository *)templateRepository GRMUSTACHE_API_INTERNAL; 40 | - (NSString *)stringWithTemplate:(GRMustacheTemplate *)template GRMUSTACHE_API_INTERNAL; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/NSFormatter+GRMustache.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros.h" 25 | #import "GRMustacheRendering.h" 26 | #import "GRMustacheFilter.h" 27 | #import "GRMustacheTagDelegate.h" 28 | 29 | /** 30 | * A category on NSFormatter that allows them to be directly used in GRMustache 31 | * templates. 32 | * 33 | * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/NSFormatter.md 34 | * 35 | * All NSFormatter subclasses such as NSDateFormatter, NSNumberFormatter, and 36 | * your custom subclasses are concerned. 37 | * 38 | * ## Filter facet 39 | * 40 | * A formatter can be used as a filter, as in `{{ percent(value) }}`. Just have 41 | * your `percent` key evaluate to a formatter. 42 | * 43 | * ## Formatting all values in a section 44 | * 45 | * A formatter can be used to format all values in a section of a template: 46 | * 47 | * ``` 48 | * {{# percent }}...{{ value1 }}...{{ value2 }}...{{/ percent }} 49 | * ``` 50 | * 51 | * The formatting then applies to all inner variable tags that evaluate to a 52 | * value that can be processed by the filter (see 53 | * [NSFormatter stringForObjectValue:] documentation). 54 | * 55 | * Inner loops and boolean sections are unaffected. However their inner variable 56 | * tags are: 57 | * 58 | * ``` 59 | * {{# percent }} 60 | *   {{ value1 }}      {{! format applies }} 61 | *   {{# condition }}  {{! format does not apply }} 62 | *     {{ value2 }}    {{! format applies }} 63 | *   {{/ condition }} 64 | * {{/ percent }} 65 | * ``` 66 | * 67 | * @since v6.4 68 | */ 69 | @interface NSFormatter (GRMustache) 70 | @end 71 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/NSValueTransformer+GRMustache.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros.h" 25 | #import "GRMustacheFilter.h" 26 | 27 | /** 28 | * A category on NSValueTransformer that allows them to be directly used as 29 | * filters in GRMustache templates. 30 | * 31 | * @since v6.4 32 | */ 33 | @interface NSValueTransformer (GRMustache) 34 | @end 35 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/NSValueTransformer+GRMustache.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "NSValueTransformer+GRMustache.h" 24 | 25 | @implementation NSValueTransformer (GRMustache) 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/StandardLibrary/GRMustacheEachFilter_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheFilter_private.h" 24 | 25 | @interface GRMustacheEachFilter : NSObject 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/StandardLibrary/GRMustacheHTMLLibrary_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheRendering_private.h" 25 | #import "GRMustacheFilter_private.h" 26 | #import "GRMustacheTagDelegate.h" 27 | 28 | 29 | // ============================================================================= 30 | #pragma mark - GRMustacheHTMLEscapeFilter 31 | 32 | @interface GRMustacheHTMLEscapeFilter: NSObject 33 | @end 34 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/StandardLibrary/GRMustacheJavascriptLibrary_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheRendering_private.h" 25 | #import "GRMustacheFilter_private.h" 26 | #import "GRMustacheTagDelegate.h" 27 | 28 | 29 | // ============================================================================= 30 | #pragma mark - GRMustacheJavascriptEscaper 31 | 32 | @interface GRMustacheJavascriptEscaper: NSObject 33 | @end 34 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/StandardLibrary/GRMustacheStandardLibrary_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheFilter_private.h" 25 | 26 | 27 | // ============================================================================= 28 | #pragma mark - GRMustacheCapitalizedFilter 29 | 30 | @interface GRMustacheCapitalizedFilter: NSObject 31 | @end 32 | 33 | 34 | // ============================================================================= 35 | #pragma mark - GRMustacheLowercaseFilter 36 | 37 | @interface GRMustacheLowercaseFilter: NSObject 38 | @end 39 | 40 | 41 | // ============================================================================= 42 | #pragma mark - GRMustacheUppercaseFilter 43 | 44 | @interface GRMustacheUppercaseFilter: NSObject 45 | @end 46 | 47 | 48 | // ============================================================================= 49 | #pragma mark - GRMustacheBlankFilter 50 | 51 | @interface GRMustacheBlankFilter: NSObject 52 | @end 53 | 54 | 55 | // ============================================================================= 56 | #pragma mark - GRMustacheEmptyFilter 57 | 58 | @interface GRMustacheEmptyFilter: NSObject 59 | @end 60 | 61 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Services/StandardLibrary/GRMustacheURLLibrary_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheRendering_private.h" 25 | #import "GRMustacheFilter_private.h" 26 | #import "GRMustacheTagDelegate.h" 27 | 28 | 29 | // ============================================================================= 30 | #pragma mark - GRMustacheURLEscapeFilter 31 | 32 | @interface GRMustacheURLEscapeFilter: NSObject 33 | @end 34 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Shared/GRMustacheAvailabilityMacros_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | 24 | /* 25 | * GRMUSTACHE_API_PUBLIC 26 | * 27 | * Used on public declarations 28 | */ 29 | #define GRMUSTACHE_API_PUBLIC 30 | 31 | /* 32 | * GRMUSTACHE_API_PUBLIC_BUT_DEPRECATED 33 | * 34 | * Used on public but deprecated declarations 35 | */ 36 | #define GRMUSTACHE_API_PUBLIC_BUT_DEPRECATED UNAVAILABLE_ATTRIBUTE 37 | 38 | /* 39 | * GRMUSTACHE_API_INTERNAL 40 | * 41 | * Used on internal declaration 42 | */ 43 | #define GRMUSTACHE_API_INTERNAL 44 | 45 | /* 46 | * GRMUSTACHE_API_INTERNAL_PUBLIC_BUT_DEPRECATED 47 | * 48 | * Used on internal declaration that are publicly deprecated 49 | */ 50 | #define GRMUSTACHE_API_INTERNAL_PUBLIC_BUT_DEPRECATED 51 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Shared/GRMustacheContentType.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros.h" 25 | 26 | /** 27 | * The content type of strings rendered by templates. 28 | * 29 | * @see GRMustacheConfiguration 30 | * @see GRMustacheTemplateRepository 31 | * 32 | * @since v6.2 33 | */ 34 | typedef NS_ENUM(NSUInteger, GRMustacheContentType) { 35 | /** 36 | * The `GRMustacheContentTypeHTML` content type has templates render HTML. 37 | * HTML template escape the input of variable tags such as `{{name}}`. Use 38 | * triple mustache tags `{{{content}}}` in order to avoid the HTML-escaping. 39 | * 40 | * @since v6.2 41 | */ 42 | GRMustacheContentTypeHTML AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, 43 | 44 | /** 45 | * The `GRMustacheContentTypeText` content type has templates render text. 46 | * They do not HTML-escape their input: `{{name}}` and `{{{name}}}` have 47 | * identical renderings. 48 | * 49 | * @since v6.2 50 | */ 51 | GRMustacheContentTypeText AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, 52 | } AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; 53 | 54 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Shared/GRMustacheError.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros.h" 25 | 26 | 27 | /** 28 | * The codes of a GRMustache-generated NSError 29 | * 30 | * @since v1.0 31 | */ 32 | typedef NS_ENUM(NSInteger, GRMustacheErrorCode) { 33 | /** 34 | * The error code for parse errors. 35 | * 36 | * @since v1.0 37 | */ 38 | GRMustacheErrorCodeParseError AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, 39 | 40 | /** 41 | * The error code for not found templates and partials. 42 | * 43 | * @since v1.0 44 | */ 45 | GRMustacheErrorCodeTemplateNotFound AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, 46 | 47 | /** 48 | * The error code for not rendering errors. 49 | * 50 | * @since v6.3 51 | */ 52 | GRMustacheErrorCodeRenderingError AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, 53 | 54 | } AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; 55 | 56 | 57 | /** 58 | * The domain of a GRMustache-generated NSError 59 | * 60 | * @since v1.0 61 | */ 62 | extern NSString *const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; 63 | 64 | 65 | /** 66 | * The name of exceptions raised by GRMustache when rendering a template. 67 | * 68 | * @since v5.1 69 | */ 70 | extern NSString *const GRMustacheRenderingException AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; 71 | 72 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Shared/GRMustacheError.m: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "GRMustacheError.h" 24 | 25 | 26 | NSString * const GRMustacheErrorDomain = @"GRMustacheErrorDomain"; 27 | NSString * const GRMustacheRenderingException = @"GRMustacheRenderingException"; 28 | 29 | -------------------------------------------------------------------------------- /Pods/GRMustache/src/classes/Shared/GRMustacheTranslateCharacters_private.h: -------------------------------------------------------------------------------- 1 | // The MIT License 2 | // 3 | // Copyright (c) 2014 Gwendal Roué 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import "GRMustacheAvailabilityMacros_private.h" 25 | 26 | extern NSString *GRMustacheTranslateCharacters(NSString *string, NSString **escapeForCharacter, size_t escapeForCharacterLength, NSUInteger capacity) GRMUSTACHE_API_INTERNAL; 27 | extern NSString *GRMustacheTranslateHTMLCharacters(NSString *string) GRMUSTACHE_API_INTERNAL; 28 | -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustache.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/GRMustache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheAvailabilityMacros.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheAvailabilityMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheAvailabilityMacros_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheAvailabilityMacros_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheBuffer_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheBuffer_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheCompiler_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/GRMustacheCompiler_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheConfiguration.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Configuration/GRMustacheConfiguration.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheConfiguration_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Configuration/GRMustacheConfiguration_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheContentType.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheContentType.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheContext.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheContext.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheContext_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheContext_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheEachFilter_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/StandardLibrary/GRMustacheEachFilter_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheError.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheError.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheExpressionGenerator_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/GRMustacheExpressionGenerator_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheExpressionInvocation_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheExpressionInvocation_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheExpressionParser_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Parsing/GRMustacheExpressionParser_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheExpressionVisitor_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/Expressions/GRMustacheExpressionVisitor_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheExpression_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/Expressions/GRMustacheExpression_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheFilter.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheFilter.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheFilter_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheFilter_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheFilteredExpression_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/Expressions/GRMustacheFilteredExpression_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheHTMLLibrary_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/StandardLibrary/GRMustacheHTMLLibrary_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheIdentifierExpression_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/Expressions/GRMustacheIdentifierExpression_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheImplicitIteratorExpression_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/Expressions/GRMustacheImplicitIteratorExpression_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheInheritablePartialNode_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheInheritablePartialNode_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheInheritableSectionNode_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheJavascriptLibrary_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/StandardLibrary/GRMustacheJavascriptLibrary_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheKeyAccess_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheKeyAccess_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheLocalizer.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/StandardLibrary/GRMustacheLocalizer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustachePartialNode_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustachePartialNode_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheRendering.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheRendering.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheRenderingEngine_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheRenderingEngine_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheRendering_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheRendering_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheSafeKeyAccess.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheSafeKeyAccess.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheScopedExpression_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/Expressions/GRMustacheScopedExpression_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheSectionTag_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheSectionTag_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheStandardLibrary_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/StandardLibrary/GRMustacheStandardLibrary_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTag.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTag.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTagDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheTagDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTag_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTag_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplate.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Templates/GRMustacheTemplate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplateASTNode_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTemplateASTNode_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplateASTVisitor_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTemplateASTVisitor_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplateAST_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTemplateAST_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplateGenerator_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/GRMustacheTemplateGenerator_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplateParser_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Parsing/GRMustacheTemplateParser_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplateRepository.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Templates/GRMustacheTemplateRepository.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplateRepository_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Templates/GRMustacheTemplateRepository_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTemplate_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Templates/GRMustacheTemplate_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTextNode_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTextNode_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheToken_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Parsing/GRMustacheToken_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheTranslateCharacters_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheTranslateCharacters_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheURLLibrary_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/StandardLibrary/GRMustacheURLLibrary_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheVariableTag_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheVariableTag_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustacheVersion.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/GRMustacheVersion.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/GRMustache_private.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/GRMustache_private.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/NSFormatter+GRMustache.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/NSFormatter+GRMustache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/GRMustache/NSValueTransformer+GRMustache.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/NSValueTransformer+GRMustache.h -------------------------------------------------------------------------------- /Pods/Headers/Private/JRSwizzle/JRSwizzle.h: -------------------------------------------------------------------------------- 1 | ../../../JRSwizzle/JRSwizzle.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/CGGeometry-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/CGGeometry-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/IOHIDEvent+KIF.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/IOHIDEvent+KIF.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIF.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIF.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFSystemTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFSystemTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFTestCase.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestCase.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFTestStepValidation.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestStepValidation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFTypist.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTypist.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFUITestActor-ConditionalTests.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUITestActor-ConditionalTests.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/KIFUITestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUITestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/LoadableCategory.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/LoadableCategory.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSBundle-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSBundle-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSError-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSError-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSException-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSException-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/NSFileManager-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSFileManager-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIAccessibilityElement-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIAccessibilityElement-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIApplication-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIApplication-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIAutomationHelper.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/UIAutomationHelper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIEvent+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIEvent+KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIScrollView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIScrollView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UITableView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UITableView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UITouch-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UITouch-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIView-Debugging.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIView-Debugging.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/UIWindow-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIWindow-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Private/KIF/XCTestCase-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/XCTestCase-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustache.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/GRMustache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheAvailabilityMacros.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheAvailabilityMacros.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheConfiguration.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Configuration/GRMustacheConfiguration.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheContentType.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheContentType.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheContext.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheContext.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheError.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Shared/GRMustacheError.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheFilter.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheFilter.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheLocalizer.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/StandardLibrary/GRMustacheLocalizer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheRendering.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheRendering.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheSafeKeyAccess.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheSafeKeyAccess.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheTag.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Compiling/TemplateAST/GRMustacheTag.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheTagDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Rendering/GRMustacheTagDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheTemplate.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Templates/GRMustacheTemplate.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheTemplateRepository.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Templates/GRMustacheTemplateRepository.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/GRMustacheVersion.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/GRMustacheVersion.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/NSFormatter+GRMustache.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/NSFormatter+GRMustache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/GRMustache/NSValueTransformer+GRMustache.h: -------------------------------------------------------------------------------- 1 | ../../../GRMustache/src/classes/Services/NSValueTransformer+GRMustache.h -------------------------------------------------------------------------------- /Pods/Headers/Public/JRSwizzle/JRSwizzle.h: -------------------------------------------------------------------------------- 1 | ../../../JRSwizzle/JRSwizzle.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/CGGeometry-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/CGGeometry-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/IOHIDEvent+KIF.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/IOHIDEvent+KIF.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIF.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIF.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFSystemTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFSystemTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFTestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFTestCase.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestCase.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFTestStepValidation.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTestStepValidation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFTypist.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFTypist.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFUITestActor-ConditionalTests.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUITestActor-ConditionalTests.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/KIFUITestActor.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/KIFUITestActor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/NSBundle-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSBundle-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/NSError-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSError-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/NSException-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSException-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/NSFileManager-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/NSFileManager-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIAccessibilityElement-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIAccessibilityElement-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIApplication-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIApplication-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIAutomationHelper.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Classes/UIAutomationHelper.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIScrollView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIScrollView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UITableView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UITableView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UITouch-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UITouch-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIView-Debugging.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIView-Debugging.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIView-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/UIWindow-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/UIWindow-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/Headers/Public/KIF/XCTestCase-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../KIF/Additions/XCTestCase-KIFAdditions.h -------------------------------------------------------------------------------- /Pods/JRSwizzle/JRSwizzle.h: -------------------------------------------------------------------------------- 1 | // JRSwizzle.h semver:1.0 2 | // Copyright (c) 2007-2011 Jonathan 'Wolf' Rentzsch: http://rentzsch.com 3 | // Some rights reserved: http://opensource.org/licenses/MIT 4 | // https://github.com/rentzsch/jrswizzle 5 | 6 | #import 7 | 8 | @interface NSObject (JRSwizzle) 9 | 10 | + (BOOL)jr_swizzleMethod:(SEL)origSel_ withMethod:(SEL)altSel_ error:(NSError**)error_; 11 | + (BOOL)jr_swizzleClassMethod:(SEL)origSel_ withClassMethod:(SEL)altSel_ error:(NSError**)error_; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CGGeometry-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGGeometry-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | CG_INLINE CGPoint CGPointCenteredInRect(CGRect bounds) { 13 | return CGPointMake(bounds.origin.x + bounds.size.width * 0.5f, bounds.origin.y + bounds.size.height * 0.5f); 14 | } 15 | 16 | CG_INLINE CGPoint CGPointMidPoint(CGPoint point1, CGPoint point2) { 17 | return CGPointMake((point1.x + point2.x) / 2.0f, (point1.y + point2.y) / 2.0f); 18 | } 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/CGGeometry-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGGeometry-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "CGGeometry-KIFAdditions.h" 11 | 12 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/LoadableCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoadableCategory.h 3 | // KIF 4 | // 5 | // Created by Karl Stenerud on 7/16/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | /** Make all categories in the current file loadable without using -load-all. 11 | * 12 | * Normally, compilers will skip linking files that contain only categories. 13 | * Adding a call to this macro adds a dummy class, which causes the linker 14 | * to add the file. 15 | * 16 | * @param UNIQUE_NAME A globally unique name. 17 | */ 18 | #define MAKE_CATEGORIES_LOADABLE(UNIQUE_NAME) @interface FORCELOAD_##UNIQUE_NAME : NSObject @end @implementation FORCELOAD_##UNIQUE_NAME @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSBundle-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSBundle (KIFAdditions) 12 | 13 | + (NSBundle *)KIFTestBundle; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSBundle-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "NSBundle-KIFAdditions.h" 10 | #import "KIFTestCase.h" 11 | #import "LoadableCategory.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(NSBundle_KIFAdditions) 14 | 15 | @implementation NSBundle (KIFAdditions) 16 | 17 | + (NSBundle *)KIFTestBundle 18 | { 19 | static NSBundle *bundle; 20 | static dispatch_once_t onceToken; 21 | dispatch_once(&onceToken, ^{ 22 | bundle = [self bundleForClass:[KIFTestCase class]]; 23 | }); 24 | return bundle; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSError-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSError (KIFAdditions) 12 | 13 | + (instancetype)KIFErrorWithUnderlyingError:(NSError *)underlyingError format:(NSString *)format, ... NS_FORMAT_FUNCTION(2,3); 14 | + (instancetype)KIFErrorWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSError-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "NSError-KIFAdditions.h" 10 | #import "LoadableCategory.h" 11 | #import "KIFTestActor.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(NSError_KIFAdditions) 14 | 15 | @implementation NSError (KIFAdditions) 16 | 17 | + (instancetype)KIFErrorWithFormat:(NSString *)format, ... 18 | { 19 | va_list args; 20 | va_start(args, format); 21 | NSString *description = [[NSString alloc] initWithFormat:format arguments:args]; 22 | va_end(args); 23 | 24 | return [self errorWithDomain:@"KIFTest" code:KIFTestStepResultFailure userInfo:@{NSLocalizedDescriptionKey: description}]; 25 | } 26 | 27 | + (instancetype)KIFErrorWithUnderlyingError:(NSError *)underlyingError format:(NSString *)format, ... 28 | { 29 | va_list args; 30 | va_start(args, format); 31 | NSString *description = [[NSString alloc] initWithFormat:format arguments:args]; 32 | va_end(args); 33 | 34 | NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:description, NSLocalizedDescriptionKey, underlyingError, NSUnderlyingErrorKey, nil]; 35 | 36 | return [self errorWithDomain:@"KIFTest" code:KIFTestStepResultFailure userInfo:userInfo]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSException-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSException-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/20/13. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSException (KIFAdditions) 12 | 13 | + (NSException *)failureInFile:(NSString *)file atLine:(NSInteger)line withDescription:(NSString *)formatString, ...; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSException-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSException-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/20/13. 6 | // 7 | // 8 | 9 | #import "NSException-KIFAdditions.h" 10 | 11 | @implementation NSException (KIFAdditions) 12 | 13 | + (NSException *)failureInFile:(NSString *)file atLine:(NSInteger)line withDescription:(NSString *)formatString, ... 14 | { 15 | va_list argumentList; 16 | va_start(argumentList, formatString); 17 | 18 | NSString *reason = [[NSString alloc] initWithFormat:formatString arguments:argumentList]; 19 | 20 | va_end(argumentList); 21 | 22 | return [NSException exceptionWithName:@"KIFFailureException" 23 | reason: reason 24 | userInfo:@{@"FilenameKey": file, 25 | @"LineNumberKey": @(line)}]; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSFileManager-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Michael Thole on 6/1/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface NSFileManager (KIFAdditions) 14 | 15 | - (NSString *)createUserDirectory:(NSSearchPathDirectory)searchPath; 16 | - (BOOL)recursivelyCreateDirectory:(NSString *)path; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/NSFileManager-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Michael Thole on 6/1/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "NSFileManager-KIFAdditions.h" 11 | #import "LoadableCategory.h" 12 | 13 | 14 | MAKE_CATEGORIES_LOADABLE(NSFileManager_KIFAdditions) 15 | 16 | 17 | @implementation NSFileManager (KIFAdditions) 18 | 19 | #pragma mark Public Methods 20 | 21 | - (NSString *)createUserDirectory:(NSSearchPathDirectory)searchPath; 22 | { 23 | NSArray *paths = NSSearchPathForDirectoriesInDomains(searchPath, NSUserDomainMask, YES); 24 | if (!paths.count) { 25 | return nil; 26 | } 27 | 28 | NSString *rootDirectory = paths[0]; 29 | 30 | BOOL isDir; 31 | BOOL created = NO; 32 | if ([self fileExistsAtPath:rootDirectory isDirectory:&isDir] && isDir) { 33 | created = YES; 34 | } else { 35 | created = [self recursivelyCreateDirectory:rootDirectory]; 36 | } 37 | 38 | return created ? rootDirectory : nil; 39 | } 40 | 41 | - (BOOL)recursivelyCreateDirectory:(NSString *)path; 42 | { 43 | BOOL isDir = NO; 44 | BOOL isParentADir = NO; 45 | NSString *parentDir = nil; 46 | 47 | if (![self fileExistsAtPath:path isDirectory:&isDir]) { 48 | // if file doesn't exist, first create parent 49 | parentDir = [path stringByDeletingLastPathComponent]; 50 | 51 | if (!parentDir.length || [parentDir isEqualToString:@"/"]) { 52 | isParentADir = YES; 53 | } else { 54 | isParentADir = [self recursivelyCreateDirectory:parentDir]; 55 | } 56 | 57 | if (isParentADir) { 58 | isDir = [self createDirectoryAtPath:path withIntermediateDirectories:NO attributes:nil error:nil]; 59 | } else { 60 | return NO; 61 | } 62 | } 63 | 64 | return isDir; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIEvent+KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIEvent+KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Thomas on 3/1/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | // Exposes methods of UITouchesEvent so that the compiler doesn't complain 12 | @interface UIEvent (KIFAdditionsPrivateHeaders) 13 | - (void)_addTouch:(UITouch *)touch forDelayedDelivery:(BOOL)arg2; 14 | - (void)_clearTouches; 15 | @end 16 | 17 | @interface UIEvent (KIFAdditions) 18 | - (void)kif_setEventWithTouches:(NSArray *)touches; 19 | @end -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIEvent+KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIEvent+KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Thomas on 3/1/15. 6 | // 7 | // 8 | 9 | #import "UIEvent+KIFAdditions.h" 10 | #import "LoadableCategory.h" 11 | #import "IOHIDEvent+KIF.h" 12 | 13 | MAKE_CATEGORIES_LOADABLE(UIEvent_KIFAdditions) 14 | 15 | // 16 | // GSEvent is an undeclared object. We don't need to use it ourselves but some 17 | // Apple APIs (UIScrollView in particular) require the x and y fields to be present. 18 | // 19 | @interface KIFGSEventProxy : NSObject 20 | { 21 | @public 22 | unsigned int flags; 23 | unsigned int type; 24 | unsigned int ignored1; 25 | float x1; 26 | float y1; 27 | float x2; 28 | float y2; 29 | unsigned int ignored2[10]; 30 | unsigned int ignored3[7]; 31 | float sizeX; 32 | float sizeY; 33 | float x3; 34 | float y3; 35 | unsigned int ignored4[3]; 36 | } 37 | @end 38 | 39 | @implementation KIFGSEventProxy 40 | @end 41 | 42 | typedef struct __GSEvent * GSEventRef; 43 | 44 | @interface UIEvent (KIFAdditionsMorePrivateHeaders) 45 | - (void)_setGSEvent:(GSEventRef)event; 46 | - (void)_setHIDEvent:(IOHIDEventRef)event; 47 | - (void)_setTimestamp:(NSTimeInterval)timestemp; 48 | @end 49 | 50 | @implementation UIEvent (KIFAdditions) 51 | 52 | - (void)kif_setEventWithTouches:(NSArray *)touches 53 | { 54 | NSOperatingSystemVersion iOS8 = {8, 0, 0}; 55 | if ([NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)] 56 | && [[NSProcessInfo new] isOperatingSystemAtLeastVersion:iOS8]) { 57 | [self kif_setIOHIDEventWithTouches:touches]; 58 | } else { 59 | [self kif_setGSEventWithTouches:touches]; 60 | } 61 | } 62 | 63 | - (void)kif_setGSEventWithTouches:(NSArray *)touches 64 | { 65 | UITouch *touch = touches[0]; 66 | CGPoint location = [touch locationInView:touch.window]; 67 | KIFGSEventProxy *gsEventProxy = [[KIFGSEventProxy alloc] init]; 68 | gsEventProxy->x1 = location.x; 69 | gsEventProxy->y1 = location.y; 70 | gsEventProxy->x2 = location.x; 71 | gsEventProxy->y2 = location.y; 72 | gsEventProxy->x3 = location.x; 73 | gsEventProxy->y3 = location.y; 74 | gsEventProxy->sizeX = 1.0; 75 | gsEventProxy->sizeY = 1.0; 76 | gsEventProxy->flags = ([touch phase] == UITouchPhaseEnded) ? 0x1010180 : 0x3010180; 77 | gsEventProxy->type = 3001; 78 | 79 | [self _setGSEvent:(GSEventRef)gsEventProxy]; 80 | 81 | [self _setTimestamp:(((UITouch*)touches[0]).timestamp)]; 82 | } 83 | 84 | - (void)kif_setIOHIDEventWithTouches:(NSArray *)touches 85 | { 86 | IOHIDEventRef event = kif_IOHIDEventWithTouches(touches); 87 | [self _setHIDEvent:event]; 88 | } 89 | 90 | @end -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScrollView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UIScrollView (KIFAdditions) 14 | 15 | - (void)scrollViewToVisible:(UIView *)view animated:(BOOL)animated; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIScrollView-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/22/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "UIScrollView-KIFAdditions.h" 11 | #import "LoadableCategory.h" 12 | #import "UIApplication-KIFAdditions.h" 13 | #import "UIView-KIFAdditions.h" 14 | 15 | 16 | MAKE_CATEGORIES_LOADABLE(UIScrollView_KIFAdditions) 17 | 18 | 19 | @implementation UIScrollView (KIFAdditions) 20 | 21 | - (void)scrollViewToVisible:(UIView *)view animated:(BOOL)animated; 22 | { 23 | CGRect viewFrame = [self convertRect:view.bounds fromView:view]; 24 | CGPoint contentOffset = self.contentOffset; 25 | 26 | if (CGRectGetMaxX(viewFrame) > self.contentOffset.x + CGRectGetWidth(self.bounds)) { 27 | contentOffset.x = MIN(CGRectGetMaxX(viewFrame) - CGRectGetWidth(self.bounds), CGRectGetMinX(viewFrame)); 28 | } else if (CGRectGetMinX(viewFrame) < self.contentOffset.x) { 29 | contentOffset.x = MAX(CGRectGetMaxX(viewFrame) - CGRectGetWidth(self.bounds), CGRectGetMinX(viewFrame)); 30 | } 31 | 32 | if (CGRectGetMaxY(viewFrame) > self.contentOffset.y + CGRectGetHeight(self.bounds)) { 33 | contentOffset.y = MIN(CGRectGetMaxY(viewFrame) - CGRectGetHeight(self.bounds), CGRectGetMinY(viewFrame)); 34 | } else if (CGRectGetMinY(viewFrame) < self.contentOffset.y) { 35 | contentOffset.y = MAX(CGRectGetMaxY(viewFrame) - CGRectGetHeight(self.bounds), CGRectGetMinY(viewFrame)); 36 | } 37 | 38 | if (!CGPointEqualToPoint(contentOffset, self.contentOffset)) { 39 | [self setContentOffset:contentOffset animated:animated]; 40 | CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.2, false); 41 | } 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UITableView-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Hilton Campbell on 4/12/14. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | @interface UITableView (KIFAdditions) 13 | 14 | - (BOOL)dragCell:(UITableViewCell *)cell toIndexPath:(NSIndexPath *)indexPath error:(NSError **)error; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UITouch-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITouch-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UITouch (KIFAdditions) 14 | 15 | - (id)initInView:(UIView *)view; 16 | - (id)initAtPoint:(CGPoint)point inView:(UIView *)view; 17 | 18 | - (void)setLocationInWindow:(CGPoint)location; 19 | - (void)setPhaseAndUpdateTimestamp:(UITouchPhase)phase; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIView-Debugging.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Debugging.h 3 | // KIF 4 | // 5 | // Created by Graeme Arthur on 02/05/15. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface UIView (Debugging) 12 | /*! 13 | @abstract Prints the view hiererchy, starting from the top window(s), along with accessibility information, which is more related to KIF than the usual information given by the 'description' method. 14 | */ 15 | +(void)printViewHierarchy; 16 | 17 | /*! 18 | @abstract Prints the view hiererchy, starting from this view, along with accessibility information, which is more related to KIF than the usual information given by the 'description' method. 19 | */ 20 | -(void)printViewHierarchy; 21 | 22 | @end -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIWindow-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import 11 | 12 | 13 | @interface UIWindow (KIFAdditions) 14 | 15 | - (UIResponder *)firstResponder; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/UIWindow-KIFAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow-KIFAdditions.m 3 | // KIF 4 | // 5 | // Created by Eric Firestone on 5/20/11. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "UIWindow-KIFAdditions.h" 11 | 12 | 13 | //@implementation UIWindow (KIFAdditions) 14 | // 15 | //@end 16 | -------------------------------------------------------------------------------- /Pods/KIF/Additions/XCTestCase-KIFAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // XCTestCase-KIFAdditions.h 3 | // KIF 4 | // 5 | // Created by Tony DiPasquale on 12/9/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "KIFTestActor.h" 11 | 12 | @interface XCTestCase (KIFAdditions) 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/IOHIDEvent+KIF.h: -------------------------------------------------------------------------------- 1 | // 2 | // IOHIDEvent+KIF.h 3 | // KIF 4 | // 5 | // Created by Thomas Bonnin on 7/6/15. 6 | // 7 | // 8 | 9 | typedef struct __IOHIDEvent * IOHIDEventRef; 10 | IOHIDEventRef kif_IOHIDEventWithTouches(NSArray *touches); 11 | 12 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIF.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIF.h 3 | // KIF 4 | // 5 | // Created by Jim Puls on 12/21/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | #import "KIFTestActor.h" 11 | #import "KIFTestCase.h" 12 | #import "KIFSystemTestActor.h" 13 | #import "KIFUITestActor.h" 14 | #import "KIFUITestActor-ConditionalTests.h" 15 | 16 | #import "XCTestCase-KIFAdditions.h" 17 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestCase.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestCase.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 12/14/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | /*! 11 | * @abstract @c KIFTestCase subclasses @c XCTestCase to add setup and teardown steps that can be used to execute KIF test steps. 12 | * @discussion This class provides four new methods: @c beforeAll and @c afterAll which run once before and after all tests and @c beforeEach and @c afterEach which run before and after every test. @c beforeEach and @c afterEach are guaranteed to run in the same instance as each test, but @c beforeAll and @c afterAll are not. As such, @c beforeEach can be used to set up instance variables while @c beforeAll can only be used to set up static variables. 13 | */ 14 | #import 15 | #import "XCTestCase-KIFAdditions.h" 16 | @interface KIFTestCase : XCTestCase 17 | 18 | /*! 19 | * @abstract This method runs once before executing the first test in the class. 20 | * @discussion This should be used for navigating to the starting point in the app where all tests will start from. Because this method is not guaranteed to run in the same instance as tests, it should not be used for setting up instance variables but can be used for setting up static variables. 21 | */ 22 | - (void)beforeAll; 23 | 24 | /*! 25 | * @abstract This method runs before each test. 26 | * @discussion This should be used for any common tasks required before each test. Because this method is guaranteed to run in the same instance as tests, it can be used for setting up instance variables. 27 | */ 28 | - (void)beforeEach; 29 | 30 | /*! 31 | * @abstract This method runs after each test. 32 | * @discussion This should be used for restoring the app to the state it was in before the test. This could include conditional logic to recover from failed tests. 33 | */ 34 | - (void)afterEach; 35 | 36 | /*! 37 | * @abstract This method runs once after executing the last test in the class. 38 | * @discussion This should be used for navigating back to the initial state of the app, where it was before @c beforeAll. This should also be used for tearing down any static methods created by @c beforeAll. 39 | */ 40 | - (void)afterAll; 41 | 42 | /*! 43 | * @discussion When @c YES, rather than failing the test and advancing on the first failure, KIF will stop executing tests and begin spinning the run loop. This provides an opportunity for inspecting the state of the app when the failure occurred. 44 | */ 45 | @property (nonatomic, assign) BOOL stopTestsOnFirstBigFailure; 46 | 47 | @end 48 | 49 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestStepValidation.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestStepValidation.h 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import 10 | #import "KIFTestCase.h" 11 | 12 | #define __KIFFail XCTFail 13 | #define __KIFAssertEqual XCTAssertEqual 14 | #define __KIFAssertEqualObjects XCTAssertEqualObjects 15 | 16 | #define KIFExpectFailure(stmt) \ 17 | {\ 18 | _MockKIFTestActorDelegate *mockDelegate = [_MockKIFTestActorDelegate mockDelegate];\ 19 | {\ 20 | _MockKIFTestActorDelegate *self = mockDelegate;\ 21 | @try { stmt; }\ 22 | @catch (NSException *exception) { }\ 23 | }\ 24 | if (!mockDelegate.failed) {\ 25 | __KIFFail(@"%s should have failed.", #stmt);\ 26 | }\ 27 | } 28 | 29 | #define KIFExpectFailureWithCount(stmt, cnt) \ 30 | {\ 31 | _MockKIFTestActorDelegate *mockDelegate = [_MockKIFTestActorDelegate mockDelegate];\ 32 | {\ 33 | _MockKIFTestActorDelegate *self = mockDelegate;\ 34 | @try { stmt; }\ 35 | @catch (NSException *exception) { }\ 36 | }\ 37 | if (!mockDelegate.failed) {\ 38 | __KIFFail(@"%s should have failed.", #stmt);\ 39 | }\ 40 | __KIFAssertEqual((NSUInteger)cnt, mockDelegate.exceptions.count, @"Expected a different number of exceptions.");\ 41 | } 42 | 43 | 44 | @interface _MockKIFTestActorDelegate : NSObject 45 | @property (nonatomic, assign) BOOL failed; 46 | @property (nonatomic, strong) NSArray *exceptions; 47 | @property (nonatomic, assign) BOOL stopped; 48 | 49 | + (instancetype)mockDelegate; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTestStepValidation.m: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTestStepValidation.m 3 | // KIF 4 | // 5 | // Created by Brian Nickel on 7/27/13. 6 | // 7 | // 8 | 9 | #import "KIFTestStepValidation.h" 10 | 11 | @implementation _MockKIFTestActorDelegate 12 | 13 | - (void)failWithException:(NSException *)exception stopTest:(BOOL)stop 14 | { 15 | [self failWithExceptions:@[exception] stopTest:stop]; 16 | } 17 | 18 | - (void)failWithExceptions:(NSArray *)exceptions stopTest:(BOOL)stop 19 | { 20 | self.failed = YES; 21 | self.exceptions = exceptions; 22 | self.stopped = stop; 23 | if (stop) { 24 | [[exceptions objectAtIndex:0] raise]; 25 | } 26 | } 27 | 28 | + (instancetype)mockDelegate 29 | { 30 | return [[self alloc] init]; 31 | } 32 | 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/KIFTypist.h: -------------------------------------------------------------------------------- 1 | // 2 | // KIFTypist.h 3 | // KIF 4 | // 5 | // Created by Pete Hodgson on 8/12/12. 6 | // Licensed to Square, Inc. under one or more contributor license agreements. 7 | // See the LICENSE file distributed with this work for the terms under 8 | // which Square, Inc. licenses this file to you. 9 | 10 | 11 | @interface KIFTypist : NSObject 12 | 13 | + (void)registerForNotifications; 14 | + (BOOL)keyboardHidden; 15 | + (BOOL)enterCharacter:(NSString *)characterString; 16 | + (void)setKeystrokeDelay:(NSTimeInterval)delay; 17 | + (BOOL)hasHardwareKeyboard; 18 | + (BOOL)hasKeyInputResponder; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/UIAutomationHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIAutomationHelper.h 3 | // KIF 4 | // 5 | // Created by Joe Masilotti on 12/1/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @class KIFTestActor; 12 | 13 | @interface UIAutomationHelper : NSObject 14 | 15 | + (BOOL)acknowledgeSystemAlert; 16 | 17 | + (void)deactivateAppForDuration:(NSNumber *)duration; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Pods/KIF/Classes/UIAutomationHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIAutomationHelper.m 3 | // KIF 4 | // 5 | // Created by Joe Masilotti on 12/1/14. 6 | // 7 | // 8 | 9 | #import "UIAutomationHelper.h" 10 | #include 11 | #import 12 | 13 | @interface UIAElement : NSObject 14 | - (void)tap; 15 | @end 16 | 17 | @interface UIAAlert : UIAElement 18 | - (NSArray *)buttons; 19 | - (BOOL)isValid; 20 | - (BOOL)isVisible; 21 | @end 22 | 23 | @interface UIAApplication : UIAElement 24 | - (UIAAlert *)alert; 25 | @end 26 | 27 | @interface UIATarget : UIAElement 28 | + (UIATarget *)localTarget; 29 | - (UIAApplication *)frontMostApp; 30 | - (void)deactivateAppForDuration:(NSNumber *)duration; 31 | @end 32 | 33 | @interface UIAElementNil : UIAElement 34 | 35 | @end 36 | 37 | @implementation UIAutomationHelper 38 | 39 | + (UIAutomationHelper *)sharedHelper 40 | { 41 | static dispatch_once_t once; 42 | static UIAutomationHelper *sharedHelper = nil; 43 | dispatch_once(&once, ^{ 44 | sharedHelper = [[self alloc] init]; 45 | [sharedHelper linkAutomationFramework]; 46 | }); 47 | return sharedHelper; 48 | } 49 | 50 | + (BOOL)acknowledgeSystemAlert { 51 | return [[self sharedHelper] acknowledgeSystemAlert]; 52 | } 53 | 54 | + (void)deactivateAppForDuration:(NSNumber *)duration { 55 | [[self sharedHelper] deactivateAppForDuration:duration]; 56 | } 57 | - (BOOL)acknowledgeSystemAlert { 58 | UIAApplication *application = [[self target] frontMostApp]; 59 | UIAAlert* alert = application.alert; 60 | if (![alert isKindOfClass:[self nilElementClass]]) { 61 | [[alert.buttons lastObject] tap]; 62 | while ([alert isValid] && [alert isVisible]) { 63 | } 64 | return YES; 65 | } 66 | return NO; 67 | } 68 | 69 | - (void)deactivateAppForDuration:(NSNumber *)duration { 70 | [[self target] deactivateAppForDuration:duration]; 71 | } 72 | 73 | #pragma mark - Private 74 | 75 | - (void)linkAutomationFramework { 76 | dlopen([@"/Developer/Library/PrivateFrameworks/UIAutomation.framework/UIAutomation" fileSystemRepresentation], RTLD_LOCAL); 77 | 78 | // Keep trying until the accessibility server starts up (it takes a little while on iOS 7) 79 | UIATarget *target = nil; 80 | while (!target) { 81 | @try { 82 | target = [self target]; 83 | } 84 | @catch (NSException *exception) { } 85 | @finally { } 86 | } 87 | } 88 | 89 | - (UIATarget *)target { 90 | return [NSClassFromString(@"UIATarget") localTarget]; 91 | } 92 | 93 | - (Class)nilElementClass { 94 | return NSClassFromString(@"UIAElementNil"); 95 | } 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /Pods/KIF/LICENSE: -------------------------------------------------------------------------------- 1 | KIF 2 | Copyright 2011 Square, Inc. 3 | A full list of contributors is available at https://github.com/square/KIF/contributors 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. -------------------------------------------------------------------------------- /Pods/Local Podspecs/KIF.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KIF", 3 | "version": "2.0.0", 4 | "summary": "Keep It Functional - iOS UI acceptance testing in an OCUnit harness.", 5 | "homepage": "https://github.com/kif-framework/KIF/", 6 | "license": "Apache 2.0", 7 | "authors": [ 8 | "Eric Firestone", 9 | "Jim Puls", 10 | "Brian Nickel" 11 | ], 12 | "source": { 13 | "git": "https://github.com/kif-framework/KIF.git", 14 | "tag": "v2.0.0" 15 | }, 16 | "platforms": { 17 | "ios": "4.3" 18 | }, 19 | "source_files": [ 20 | "Classes", 21 | "Additions" 22 | ], 23 | "public_header_files": [ 24 | "Classes/**/*.h", 25 | "Additions/**/*-KIFAdditions.h" 26 | ], 27 | "frameworks": [ 28 | "SenTestingKit", 29 | "CoreGraphics" 30 | ], 31 | "prefix_header_contents": "#import " 32 | } 33 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - GRMustache (7.3.2): 3 | - JRSwizzle (~> 1.0) 4 | - JRSwizzle (1.0) 5 | - KIF (3.3.0): 6 | - KIF/Core (= 3.3.0) 7 | - KIF/Core (3.3.0) 8 | 9 | DEPENDENCIES: 10 | - GRMustache (~> 7.0) 11 | - KIF (~> 3.0) 12 | 13 | SPEC CHECKSUMS: 14 | GRMustache: ebe6104fd30a6d22c1f36af131e19e2dbf7cd292 15 | JRSwizzle: dd5ead5d913a0f29e7f558200165849f006bb1e3 16 | KIF: 0a82046d06f3648799cac522d2d0f7934214caac 17 | 18 | COCOAPODS: 0.39.0 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GRMustache/GRMustache-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_GRMustache : NSObject 3 | @end 4 | @implementation PodsDummy_GRMustache 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GRMustache/GRMustache-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/GRMustache/GRMustache.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/GRMustache" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GRMustache" "${PODS_ROOT}/Headers/Public/JRSwizzle" "${PODS_ROOT}/Headers/Public/KIF" 3 | OTHER_LDFLAGS = -framework "Foundation" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/Target Support Files/JRSwizzle/JRSwizzle-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_JRSwizzle : NSObject 3 | @end 4 | @implementation PodsDummy_JRSwizzle 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JRSwizzle/JRSwizzle-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/JRSwizzle/JRSwizzle.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JRSwizzle" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GRMustache" "${PODS_ROOT}/Headers/Public/JRSwizzle" "${PODS_ROOT}/Headers/Public/KIF" 3 | OTHER_LDFLAGS = -framework "Foundation" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_KIF : NSObject 3 | @end 4 | @implementation PodsDummy_KIF 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/KIF/KIF.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/KIF" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GRMustache" "${PODS_ROOT}/Headers/Public/JRSwizzle" "${PODS_ROOT}/Headers/Public/KIF" 4 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "IOKit" -framework "XCTest" 5 | PODS_ROOT = ${SRCROOT} 6 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-AMYServer Tests/Pods-AMYServer Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## GRMustache 5 | 6 | Copyright (C) 2014 Gwendal Roué 7 | 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | 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. 13 | 14 | 15 | ## KIF 16 | 17 | KIF 18 | Copyright 2011 Square, Inc. 19 | A full list of contributors is available at https://github.com/square/KIF/contributors 20 | 21 | Licensed under the Apache License, Version 2.0 (the "License"); 22 | you may not use this file except in compliance with the License. 23 | You may obtain a copy of the License at 24 | 25 | http://www.apache.org/licenses/LICENSE-2.0 26 | 27 | Unless required by applicable law or agreed to in writing, software 28 | distributed under the License is distributed on an "AS IS" BASIS, 29 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 30 | See the License for the specific language governing permissions and 31 | limitations under the License. 32 | Generated by CocoaPods - http://cocoapods.org 33 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-AMYServer Tests/Pods-AMYServer Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_AMYServer_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AMYServer_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-AMYServer Tests/Pods-AMYServer Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GRMustache" "${PODS_ROOT}/Headers/Public/JRSwizzle" "${PODS_ROOT}/Headers/Public/KIF" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/GRMustache" -isystem "${PODS_ROOT}/Headers/Public/JRSwizzle" -isystem "${PODS_ROOT}/Headers/Public/KIF" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"GRMustache" -l"JRSwizzle" -l"KIF" -framework "CoreGraphics" -framework "Foundation" -framework "IOKit" -framework "XCTest" 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-AMYServer Tests/Pods-AMYServer Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GRMustache" "${PODS_ROOT}/Headers/Public/JRSwizzle" "${PODS_ROOT}/Headers/Public/KIF" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/GRMustache" -isystem "${PODS_ROOT}/Headers/Public/JRSwizzle" -isystem "${PODS_ROOT}/Headers/Public/KIF" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"GRMustache" -l"JRSwizzle" -l"KIF" -framework "CoreGraphics" -framework "Foundation" -framework "IOKit" -framework "XCTest" 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## GRMustache 5 | 6 | Copyright (C) 2014 Gwendal Roué 7 | 8 | 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: 9 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | 12 | 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. 13 | 14 | 15 | ## KIF 16 | 17 | KIF 18 | Copyright 2011 Square, Inc. 19 | A full list of contributors is available at https://github.com/square/KIF/contributors 20 | 21 | Licensed under the Apache License, Version 2.0 (the "License"); 22 | you may not use this file except in compliance with the License. 23 | You may obtain a copy of the License at 24 | 25 | http://www.apache.org/licenses/LICENSE-2.0 26 | 27 | Unless required by applicable law or agreed to in writing, software 28 | distributed under the License is distributed on an "AS IS" BASIS, 29 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 30 | See the License for the specific language governing permissions and 31 | limitations under the License. 32 | Generated by CocoaPods - http://cocoapods.org 33 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GRMustache" "${PODS_ROOT}/Headers/Public/JRSwizzle" "${PODS_ROOT}/Headers/Public/KIF" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/GRMustache" -isystem "${PODS_ROOT}/Headers/Public/JRSwizzle" -isystem "${PODS_ROOT}/Headers/Public/KIF" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"GRMustache" -l"JRSwizzle" -l"KIF" -framework "CoreGraphics" -framework "Foundation" -framework "IOKit" -framework "XCTest" 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GRMustache" "${PODS_ROOT}/Headers/Public/JRSwizzle" "${PODS_ROOT}/Headers/Public/KIF" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/GRMustache" -isystem "${PODS_ROOT}/Headers/Public/JRSwizzle" -isystem "${PODS_ROOT}/Headers/Public/KIF" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"GRMustache" -l"JRSwizzle" -l"KIF" -framework "CoreGraphics" -framework "Foundation" -framework "IOKit" -framework "XCTest" 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Test Host/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Test Host 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Test Host/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Test Host 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Test Host/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kif-framework/AMYServer/21e6c7f32aa2c7409e8f3ec18774db50bb3d3237/Test Host/Default-568h@2x.png -------------------------------------------------------------------------------- /Test Host/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kif-framework/AMYServer/21e6c7f32aa2c7409e8f3ec18774db50bb3d3237/Test Host/Default.png -------------------------------------------------------------------------------- /Test Host/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kif-framework/AMYServer/21e6c7f32aa2c7409e8f3ec18774db50bb3d3237/Test Host/Default@2x.png -------------------------------------------------------------------------------- /Test Host/Test Host-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Test Host/Test Host-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Test Host' target in the 'Test Host' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Test Host/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Test Host 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Test Host/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Test Host 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | @property (weak, nonatomic) IBOutlet UITextField *userNameField; 13 | @property (weak, nonatomic) IBOutlet UITextField *passwordField; 14 | 15 | @end 16 | 17 | @implementation ViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view, typically from a nib. 23 | } 24 | 25 | - (void)didReceiveMemoryWarning 26 | { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | - (IBAction)logIn { 32 | 33 | if (self.userNameField.isFirstResponder) { 34 | [self.userNameField resignFirstResponder]; 35 | } 36 | 37 | if (self.passwordField.isFirstResponder) { 38 | [self.passwordField resignFirstResponder]; 39 | } 40 | 41 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://example.com/services/login.json"]]; 42 | request.HTTPMethod = @"POST"; 43 | request.HTTPBody = [NSJSONSerialization dataWithJSONObject:@{@"username": self.userNameField.text, @"password": self.passwordField.text} options:0 error:NULL]; 44 | 45 | [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { 46 | 47 | NSHTTPURLResponse *HTTPResponse = (NSHTTPURLResponse *)response; 48 | if (HTTPResponse.statusCode != 200) { 49 | [[[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"%ld status code", (long)HTTPResponse.statusCode] message:nil delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil] show]; 50 | return; 51 | } 52 | 53 | NSDictionary *result = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL]; 54 | 55 | [[[UIAlertView alloc] initWithTitle:result[@"message"] message:nil delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil] show]; 56 | }]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Test Host/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Test Host/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Test Host 4 | // 5 | // Created by Brian Nickel on 7/16/13. 6 | // Copyright (c) 2013 Brian Nickel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | --------------------------------------------------------------------------------