Skip to content

Commit

Permalink
Cleaning up unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
casademora committed Nov 15, 2011
1 parent 1236931 commit 71fbdab
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 52 deletions.
20 changes: 20 additions & 0 deletions Magical Record.xcodeproj/project.pbxproj
Expand Up @@ -50,6 +50,8 @@
C753897413DB61CE002B2F57 /* GHUnitTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = C753897313DB61CE002B2F57 /* GHUnitTestMain.m */; };
C753897613DB6322002B2F57 /* GHUnit.framework in Copy GHUnit into App Bundle */ = {isa = PBXBuildFile; fileRef = C721C84113D0C6460097AB6F /* GHUnit.framework */; };
C75A4E7313D0D88D00790CEB /* NSManagedObject+MagicalDataImport.m in Sources */ = {isa = PBXBuildFile; fileRef = C75A4E7213D0D88D00790CEB /* NSManagedObject+MagicalDataImport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
C75C7D6A147220D400D0C2FE /* ProcessHeader.rb in Resources */ = {isa = PBXBuildFile; fileRef = C75C7D69147220D300D0C2FE /* ProcessHeader.rb */; };
C75C7D6B147220D400D0C2FE /* ProcessHeader.rb in Resources */ = {isa = PBXBuildFile; fileRef = C75C7D69147220D300D0C2FE /* ProcessHeader.rb */; };
C763783213E10BEC0009A6CA /* GHUnitIOSTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = C763783113E10BEC0009A6CA /* GHUnitIOSTestMain.m */; };
C76AF7E513DBC08F00CE2E05 /* FixtureHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = C77E5FBA13D0D2AE00298F87 /* FixtureHelpers.m */; };
C76AF7E613DBC08F00CE2E05 /* MagicalRecordHelperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C77E5FA713D0CBDE00298F87 /* MagicalRecordHelperTests.m */; };
Expand Down Expand Up @@ -127,6 +129,19 @@
C7E736DF1402FE64005657C9 /* SingleEntityWithNoRelationships.json in Resources */ = {isa = PBXBuildFile; fileRef = C7E736DE1402FE64005657C9 /* SingleEntityWithNoRelationships.json */; };
/* End PBXBuildFile section */

/* Begin PBXBuildRule section */
C75C7D6814720DE100D0C2FE /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.apple.compilers.proxy.script;
filePatterns = m4;
fileType = pattern.proxy;
isEditable = 1;
outputFiles = (
);
script = "$(SYSTEM_DEVELOPER_DIR)/usr/bin/m4";
};
/* End PBXBuildRule section */

/* Begin PBXCopyFilesBuildPhase section */
C753897513DB6310002B2F57 /* Copy GHUnit into App Bundle */ = {
isa = PBXCopyFilesBuildPhase;
Expand Down Expand Up @@ -235,6 +250,7 @@
C753897313DB61CE002B2F57 /* GHUnitTestMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GHUnitTestMain.m; sourceTree = "<group>"; };
C75A4E7113D0D88D00790CEB /* NSManagedObject+MagicalDataImport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSManagedObject+MagicalDataImport.h"; sourceTree = "<group>"; };
C75A4E7213D0D88D00790CEB /* NSManagedObject+MagicalDataImport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSManagedObject+MagicalDataImport.m"; sourceTree = "<group>"; };
C75C7D69147220D300D0C2FE /* ProcessHeader.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = ProcessHeader.rb; sourceTree = "<group>"; };
C763783113E10BEC0009A6CA /* GHUnitIOSTestMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GHUnitIOSTestMain.m; sourceTree = "<group>"; };
C76AF7F813DBE8D300CE2E05 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
C76AF7FA13DBEB5500CE2E05 /* ImportSingleRelatedEntityTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImportSingleRelatedEntityTests.m; path = "Unit Tests/ImportSingleRelatedEntityTests.m"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -382,6 +398,7 @@
C721C7A013D0A3750097AB6F = {
isa = PBXGroup;
children = (
C75C7D69147220D300D0C2FE /* ProcessHeader.rb */,
C721C85513D0C7030097AB6F /* Source */,
C77E5FA513D0CBA600298F87 /* Unit Tests */,
C721C7E413D0C3A00097AB6F /* Mac App Unit Tests */,
Expand Down Expand Up @@ -792,6 +809,7 @@
C721C7FB13D0C3CD0097AB6F /* Resources */,
);
buildRules = (
C75C7D6814720DE100D0C2FE /* PBXBuildRule */,
);
dependencies = (
);
Expand Down Expand Up @@ -837,6 +855,7 @@
C76AF7ED13DBC09800CE2E05 /* SampleJSONDataForImport.json in Resources */,
C76AF7EE13DBC09B00CE2E05 /* SingleEntityWithNoRelationships.plist in Resources */,
C76AF82A13DBEE5A00CE2E05 /* SingleRelatedEntity.json in Resources */,
C75C7D6A147220D400D0C2FE /* ProcessHeader.rb in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -855,6 +874,7 @@
C78F8FD313FDC2B600549DD8 /* SingleEntityRelatedToMappedEntityWithSecondaryMappings.json in Resources */,
C7E736DF1402FE64005657C9 /* SingleEntityWithNoRelationships.json in Resources */,
C738127B141039900054EEF0 /* SingleEntityRelatedToManyMappedEntitiesUsingListOfPrimaryKeys.json in Resources */,
C75C7D6B147220D400D0C2FE /* ProcessHeader.rb in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
18 changes: 16 additions & 2 deletions Source/Categories/NSManagedObject+MagicalDataImport.h
Expand Up @@ -35,6 +35,20 @@ extern NSString * const kMagicalRecordImportRelationshipTypeKey;


#ifdef MR_SHORTHAND
#define importFromDictionary MR_importFromDictionary
#define setValuesForKeysWithJSDONDictionary MR_setValuesForKeysWithJSONDictionary

@interface NSManagedObject (NSManagedObject_DataImport_ShortHand)

- (void) importValuesForKeysWithDictionary:(NSDictionary *)objectData;
- (void) updateValuesForKeysWithDictionary:(NSDictionary *)objectData;

+ (id) importFromDictionary:(NSDictionary *)data;
+ (id) importFromDictionary:(NSDictionary *)data inContext:(NSManagedObjectContext *)context;

+ (NSArray *) importFromArray:(NSArray *)listOfObjectData;
+ (NSArray *) importFromArray:(NSArray *)listOfObjectData inContext:(NSManagedObjectContext *)context;

+ (id) updateFromDictionary:(NSDictionary *)objectData;
+ (id) updateFromDictionary:(NSDictionary *)objectData inContext:(NSManagedObjectContext *)context;

@end
#endif
16 changes: 2 additions & 14 deletions Source/Categories/NSManagedObjectModel+MagicalRecord.h
Expand Up @@ -8,9 +8,11 @@
#import <Foundation/Foundation.h>
#import "MagicalRecordHelpers.h"


@interface NSManagedObjectModel (MagicalRecord)

+ (NSManagedObjectModel *) MR_defaultManagedObjectModel;

+ (void) MR_setDefaultManagedObjectModel:(NSManagedObjectModel *)newDefaultModel;

+ (NSManagedObjectModel *) MR_newManagedObjectModel NS_RETURNS_RETAINED;
Expand All @@ -20,17 +22,3 @@
+ (NSManagedObjectModel *) MR_mergedObjectModelFromMainBundle;

@end

//
//@interface NSManagedObjectModel (MagicalRecordShortHandHeaders)
//
//+ (NSManagedObjectModel *) defaultManagedObjectModel;
//+ (void) setDefaultManagedObjectModel:(NSManagedObjectModel *)newDefaultModel;
//
//+ (NSManagedObjectModel *) newManagedObjectModel NS_RETURNS_RETAINED;
//+ (NSManagedObjectModel *) newManagedObjectModelNamed:(NSString *)modelFileName NS_RETURNS_RETAINED;
//+ (NSManagedObjectModel *) managedObjectModelNamed:(NSString *)modelFileName;
//+ (NSManagedObjectModel *) newModelNamed:(NSString *) modelName inBundleNamed:(NSString *) bundleName NS_RETURNS_RETAINED;
//+ (NSManagedObjectModel *) mergedObjectModelFromMainBundle;
//
//@end
15 changes: 0 additions & 15 deletions Source/Categories/NSPersistentStore+MagicalRecord.h
Expand Up @@ -14,7 +14,6 @@ extern NSString * const kMagicalRecordDefaultStoreFileName;

@interface NSPersistentStore (MagicalRecord)


+ (NSURL *) MR_defaultLocalStoreUrl;

+ (NSPersistentStore *) MR_defaultPersistentStore;
Expand All @@ -24,18 +23,4 @@ extern NSString * const kMagicalRecordDefaultStoreFileName;

@end

//#ifdef MR_SHORTHAND
//
//@interface NSPersistentStore (MagicalRecordShortHandHeaders)
//
//+ (NSURL *) defaultLocalStoreUrl;
//
//+ (NSPersistentStore *) defaultPersistentStore;
//+ (void) setDefaultPersistentStore:(NSPersistentStore *) store;
//
//+ (NSURL *) urlForStoreName:(NSString *)storeFileName;
//
//
//@end

//#endif
21 changes: 0 additions & 21 deletions Source/Categories/NSPersistentStoreCoordinator+MagicalRecord.h
Expand Up @@ -26,24 +26,3 @@

@end

//
//#ifdef MR_SHORTHAND
//
//@interface NSPersistentStoreCoordinator (MagicalRecordShortHandHeaders)
//
//+ (NSPersistentStoreCoordinator *) defaultStoreCoordinator;
//+ (void) setDefaultStoreCoordinator:(NSPersistentStoreCoordinator *)coordinator;
//
//+ (NSPersistentStoreCoordinator *) coordinatorWithInMemoryStore;
//
//+ (NSPersistentStoreCoordinator *) newPersistentStoreCoordinator NS_RETURNS_RETAINED;
//
//+ (NSPersistentStoreCoordinator *) coordinatorWithSqliteStoreNamed:(NSString *)storeFileName;
//+ (NSPersistentStoreCoordinator *) coordinatorWithAutoMigratingSqliteStoreNamed:(NSString *) storeFileName;
//+ (NSPersistentStoreCoordinator *) coordinatorWithPersitentStore:(NSPersistentStore *)persistentStore;
//
//- (NSPersistentStore *) addInMemoryStore;
//
//@end
//
// #endif

0 comments on commit 71fbdab

Please sign in to comment.