Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Building YAJL as framework on iOS targeting >= 3.0;
Updating GHUnit; Adding NSBundle category
- Loading branch information
Showing
56 changed files
with
816 additions
and
769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
== 0.2.20 | ||
|
||
- Added framework build for iPhone | ||
|
||
== 0.2.17 | ||
|
||
- Updated to use yalj 1.0.9 (iPhone) | ||
|
||
== 0.2.16 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// | ||
// NSBundle+YAJL.h | ||
// YAJL | ||
// | ||
// Created by Gabriel Handford on 7/23/09. | ||
// Copyright 2009. All rights reserved. | ||
// | ||
// Permission is hereby granted, free of charge, to any person | ||
// obtaining a copy of this software and associated documentation | ||
// files (the "Software"), to deal in the Software without | ||
// restriction, including without limitation the rights to use, | ||
// copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the | ||
// Software is furnished to do so, subject to the following | ||
// conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be | ||
// included in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
// OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
|
||
#import "YAJLParser.h" | ||
|
||
@interface NSBundle (YAJL) | ||
|
||
/*! | ||
Load JSON from bundle. | ||
Throws an YAJLParserException on parse error. | ||
@param resource Resource name with extension, for example, file.json | ||
*/ | ||
- (id)yajl_JSONFromResource:(NSString *)resource; | ||
|
||
/*! | ||
Load JSON from bundle. | ||
@param resource Resource name with extension, for example, file.json | ||
@param options Parser options | ||
@param error Out error | ||
@result JSON value (NSArray, NSDictionary) or nil if errored | ||
*/ | ||
- (id)yajl_JSONFromResource:(NSString *)resource options:(YAJLParserOptions)options error:(NSError **)error; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// NSBundle+YAJL.m | ||
// YAJL | ||
// | ||
// Created by Gabriel Handford on 7/23/09. | ||
// Copyright 2009. All rights reserved. | ||
// | ||
// Permission is hereby granted, free of charge, to any person | ||
// obtaining a copy of this software and associated documentation | ||
// files (the "Software"), to deal in the Software without | ||
// restriction, including without limitation the rights to use, | ||
// copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the | ||
// Software is furnished to do so, subject to the following | ||
// conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be | ||
// included in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
// OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
|
||
#import "NSBundle+YAJL.h" | ||
#import "GHNSBundle+Utils.h" | ||
#import "NSObject+YAJL.h" | ||
|
||
@implementation NSBundle (YAJL) | ||
|
||
- (id)yajl_JSONFromResource:(NSString *)resource { | ||
NSError *error = nil; | ||
id JSONValue = [self yajl_JSONFromResource:resource options:YAJLParserOptionsNone error:&error]; | ||
if (error) [NSException raise:YAJLParserException format:[error localizedDescription], nil]; | ||
return JSONValue; | ||
} | ||
|
||
- (id)yajl_JSONFromResource:(NSString *)resource options:(YAJLParserOptions)options error:(NSError **)error { | ||
return [[self gh_loadStringDataFromResource:resource] yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:error]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ | |
#import "YAJLDocument.h" | ||
#import "YAJLGen.h" | ||
#import "NSObject+YAJL.h" | ||
#import "NSBundle+YAJL.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// GHNSBundle+Utils.h | ||
// GHKit | ||
// | ||
// Created by Gabriel Handford on 4/27/09. | ||
// Copyright 2009. All rights reserved. | ||
// | ||
|
||
@interface NSBundle (GHUtils) | ||
|
||
/*! | ||
Load data from resource. | ||
@param resource Name of resource | ||
@result NSData | ||
*/ | ||
- (NSData *)gh_loadDataFromResource:(NSString *)resource; | ||
|
||
/*! | ||
Load string data from resource. | ||
@param resource Name of resource | ||
@result NSString | ||
*/ | ||
- (NSString *)gh_loadStringDataFromResource:(NSString *)resource; | ||
|
||
/*! | ||
Get URL for resource. | ||
@param resource Name of resource | ||
@result URL to resource | ||
*/ | ||
- (NSURL *)gh_URLForResource:(NSString *)resource; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// GHNSBundle+Utils.m | ||
// GHKit | ||
// | ||
// Created by Gabriel Handford on 4/27/09. | ||
// Copyright 2009. All rights reserved. | ||
// | ||
|
||
#import "GHNSBundle+Utils.h" | ||
|
||
@implementation NSBundle (GHUtils) | ||
|
||
- (NSData *)gh_loadDataFromResource:(NSString *)resource { | ||
NSParameterAssert(resource); | ||
NSString *resourcePath = [self pathForResource:[resource stringByDeletingPathExtension] ofType:[resource pathExtension]]; | ||
if (!resourcePath) [NSException raise:NSInvalidArgumentException format:@"Resource not found: %@", resource]; | ||
NSError *error = nil; | ||
NSData *data = [NSData dataWithContentsOfFile:resourcePath options:0 error:&error]; | ||
if (error) [NSException raise:NSInvalidArgumentException format:@"Error loading resource at path (%@): %@", resourcePath, error]; | ||
return data; | ||
} | ||
|
||
- (NSString *)gh_loadStringDataFromResource:(NSString *)resource { | ||
return [[[NSString alloc] initWithData:[self gh_loadDataFromResource:resource] encoding:NSUTF8StringEncoding] autorelease]; | ||
} | ||
|
||
- (NSURL *)gh_URLForResource:(NSString *)resource { | ||
NSParameterAssert(resource); | ||
NSString *resourcePath = [self pathForResource:[resource stringByDeletingPathExtension] ofType:[resource pathExtension]]; | ||
return resourcePath ? [NSURL fileURLWithPath:resourcePath] : nil; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>me.rel.yajl</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>FMWK</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>$(YAJL_VERSION)</string> | ||
</dict> | ||
</plist> |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/GHUnitIOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Resources |
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Project-IPhone/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHUnitIOS.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
#import "GHUnit.h" | ||
#import "GHUnitIPhoneAppDelegate.h" |
File renamed without changes.
40 changes: 40 additions & 0 deletions
40
...IPhone/Libraries/GHUnitIOS.framework/Versions/A/Headers/GHUnitIPhoneTableViewDataSource.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// GHUnitIPhoneTableViewDataSource.h | ||
// GHUnitIPhone | ||
// | ||
// Created by Gabriel Handford on 5/5/09. | ||
// Copyright 2009. All rights reserved. | ||
// | ||
// Permission is hereby granted, free of charge, to any person | ||
// obtaining a copy of this software and associated documentation | ||
// files (the "Software"), to deal in the Software without | ||
// restriction, including without limitation the rights to use, | ||
// copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the | ||
// Software is furnished to do so, subject to the following | ||
// conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be | ||
// included in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
// OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
|
||
#import "GHTestViewModel.h" | ||
|
||
@interface GHUnitIPhoneTableViewDataSource : GHTestViewModel <UITableViewDataSource> { | ||
|
||
} | ||
|
||
- (GHTestNode *)nodeForIndexPath:(NSIndexPath *)indexPath; | ||
|
||
- (void)setSelectedForAllNodes:(BOOL)selected; | ||
|
||
@end |
Oops, something went wrong.