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
# vim:ft=Ruby | |
# | |
# Base Podfile template for projects targeting OSX and iOS | |
# | |
# Author: Francisco Garcia <[email protected]> | |
# https://github.com/fgarcia | |
# | |
# Last Update: 2012-11-28 | |
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
{ | |
Entity *_this; | |
} | |
- (void)setUp | |
{ | |
[MagicalRecord setupCoreDataStackWithInMemoryStore]; | |
_this = [Entity MR_createEntity]; | |
} |
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
- (void)testNotificationWhenEditingNonTodayStat | |
{ | |
// given | |
id mock = [OCMockObject observerMock]; | |
[[NSNotificationCenter defaultCenter] addMockObserver:mock name:FGNPastStatWasUpgraded object:nil]; | |
[[mock expect] notificationWithName:FGNPastStatWasUpgraded object:nil]; | |
_this.date = [DLCommon dateFromString:@"2010-04-01"]; | |
// when | |
_this.reviewedValue++; |
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
// problem | |
SourceTree does not behave as Git when adding and committing a folder with ignored parts | |
// given | |
User has a global Git ignore file with the pattern "xcuserdata" | |
// when | |
User add an Xcode project file like MyApp.xcodeproj/ | |
User commit 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
id error; | |
NSManagedObjectModel *mom = [NSManagedObjectModel mergedModelFromBundles:nil]; | |
NSPersistentStoreCoordinator *psc = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:mom]; | |
NSURL *file_url = [NSURL URLWithString:@"file://localhost/private/tmp/store.sqlite"]; | |
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: | |
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, | |
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; | |
NSPersistentStore *store_dil = [psc addPersistentStoreWithType:NSSQLiteStoreType |
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
for C in $(git for-each-ref --sort=committerdate refs/heads --format='%(refname)' | sort ) | |
do | |
git show -s --format="%ci $C" "$C" | |
done |
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
- (void)awakeFromInsert | |
{ | |
[super awakeFromInsert]; | |
self.todayStats = [Stats MR_createInContext:[self managedObjectContext]]; | |
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; | |
NSManagedObjectID *self_id = [self objectID]; | |
[nc postNotificationName:FGN_NEW_CONTENT_NOTIFICATION object:self_id]; | |
} |
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
- (void)awakeFromInsert | |
{ | |
[super awakeFromInsert]; | |
if (self.initialized) { | |
self.todayStats = [Stats MR_createInContext:[self managedObjectContext]]; | |
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; | |
NSManagedObjectID *self_id = [self objectID]; | |
[nc postNotificationName:FGN_NEW_CONTENT_NOTIFICATION object:self_id]; |
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
- (void)awakeFromInsert | |
{ | |
[super awakeFromInsert]; | |
BOOL in_main_context = self.managedObjectContext == MAIN_CONTEXT; | |
if (! in_main_context) return; | |
if (self.initialized) return; | |
self.todayStats = [Stats MR_createInContext:[self managedObjectContext]]; |
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
Pod::Spec.new do |s| | |
s.name = "CocoYAML" | |
s.version = "0.0.1" | |
s.author = { "Francisco Garcia" => "[email protected]" } | |
s.summary = "libyaml wrapper" | |
s.homepage = "http://www.francisco-garcia.net" | |
s.license = { :type => 'MIT' } | |
s.platform = :osx | |
s.source = { :git => 'git@home:cocoyaml', :branch => 'master' } |