Permalink
Browse files

Fixing test frameworks :(

Making each file more standalone for piecemeal includes, or to allow includes from other than the main PCH file
  • Loading branch information...
casademora committed May 9, 2012
1 parent 3d37bdb commit 5c5ea831ec442f8419e4925aac5d04558a750900
Showing with 364 additions and 72 deletions.
  1. +3 −0 MagicalRecord/Categories/DataImport/NSAttributeDescription+MagicalDataImport.m
  2. +1 −0 MagicalRecord/Categories/DataImport/NSRelationshipDescription+MagicalDataImport.m
  3. +6 −0 MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalAggregation.m
  4. +3 −0 MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalFinders.m
  5. +2 −0 MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalRequests.m
  6. +3 −0 MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalObserving.m
  7. +3 −0 MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalSaves.m
  8. +2 −0 MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalThreading.m
  9. +3 −0 MagicalRecord/Core/MagicalRecord+Setup.m
  10. +2 −0 MagicalRecord/Core/MagicalRecord+ShorthandSupport.h
  11. +2 −0 MagicalRecord/Core/MagicalRecord+iCloud.m
  12. +24 −0 MagicalRecord/Core/MagicalRecord.h
  13. +18 −27 MagicalRecord/CoreData+MagicalRecord.h
  14. +48 −44 Project Files/Magical Record.xcodeproj/project.pbxproj
  15. +1 −1 Project Files/Unit Tests/ImportSingleEntityWithNoRelationshipsTests.m
  16. +1 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Headers
  17. +1 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/OCMock
  18. +1 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Resources
  19. +15 −0 ...App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h
  20. +33 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMArg.h
  21. +64 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMConstraint.h
  22. +10 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMock.h
  23. +43 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMockObject.h
  24. +32 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Headers/OCMockRecorder.h
  25. BIN Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/OCMock
  26. +42 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Resources/Info.plist
  27. BIN ...es/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/A/Resources/en.lproj/InfoPlist.strings
  28. +1 −0 Project Files/iOS App Unit Tests/Frameworks/OCMock.framework/Versions/Current
  29. BIN Project Files/iOS App Unit Tests/Frameworks/OCMockLibrary/libOCMock.a
@@ -7,6 +7,8 @@
//
#import "NSAttributeDescription+MagicalDataImport.h"
+#import "NSManagedObject+MagicalDataImport.h"
+#import "MagicalImportFunctions.h"
@implementation NSAttributeDescription (MagicalRecord_DataImport)
@@ -43,4 +45,5 @@ - (id) MR_valueForKeyPath:(NSString *)keyPath fromObjectData:(id)objectData;
return value == [NSNull null] ? nil : value;
}
+
@end
@@ -8,6 +8,7 @@
#import "NSRelationshipDescription+MagicalDataImport.h"
#import "NSManagedObject+MagicalDataImport.h"
+#import "MagicalImportFunctions.h"
#import "MagicalRecord.h"
@implementation NSRelationshipDescription (MagicalRecord_DataImport)
@@ -7,6 +7,12 @@
//
#import "NSManagedObject+MagicalAggregation.h"
+#import "NSManagedObjectContext+MagicalRecord.h"
+#import "NSManagedObjectContext+MagicalThreading.h"
+#import "NSManagedObject+MagicalRequests.h"
+#import "NSManagedObject+MagicalRecord.h"
+#import "NSManagedObject+MagicalFinders.h"
+#import "MagicalRecord+ErrorHandling.h"
@implementation NSManagedObject (MagicalAggregation)
@@ -7,6 +7,9 @@
//
#import "NSManagedObject+MagicalFinders.h"
+#import "NSManagedObject+MagicalRequests.h"
+#import "NSManagedObject+MagicalRecord.h"
+#import "NSManagedObjectContext+MagicalThreading.h"
@implementation NSManagedObject (MagicalFinders)
@@ -7,6 +7,8 @@
//
#import "NSManagedObject+MagicalRequests.h"
+#import "NSManagedObject+MagicalRecord.h"
+#import "NSManagedObjectContext+MagicalThreading.h"
@implementation NSManagedObject (MagicalRequests)
@@ -7,6 +7,9 @@
//
#import "NSManagedObjectContext+MagicalObserving.h"
+#import "NSManagedObjectContext+MagicalRecord.h"
+#import "MagicalRecord.h"
+#import "MagicalRecord+iCloud.h"
static void const * kMagicalRecordNotifiesMainContextAssociatedValueKey = @"kMagicalRecordNotifiesMainContextOnSave";
NSString * const kMagicalRecordDidMergeChangesFromiCloudNotification = @"kMagicalRecordDidMergeChangesFromiCloudNotification";
@@ -7,6 +7,9 @@
//
#import "NSManagedObjectContext+MagicalSaves.h"
+#import "MagicalRecord+ErrorHandling.h"
+#import "NSManagedObjectContext+MagicalRecord.h"
+#import "MagicalRecord.h"
@interface NSManagedObjectContext (InternalMagicalSaves)
@@ -7,6 +7,8 @@
//
#import "NSManagedObjectContext+MagicalThreading.h"
+#import "NSManagedObject+MagicalRecord.h"
+#import "NSManagedObjectContext+MagicalRecord.h"
static NSString const * kMagicalRecordManagedObjectContextKey = @"MagicalRecord_NSManagedObjectContextForThreadKey";
@@ -7,6 +7,9 @@
//
#import "MagicalRecord+Setup.h"
+#import "NSManagedObject+MagicalRecord.h"
+#import "NSPersistentStoreCoordinator+MagicalRecord.h"
+#import "NSManagedObjectContext+MagicalRecord.h"
@implementation MagicalRecord (Setup)
@@ -10,6 +10,8 @@
@interface MagicalRecord (ShorthandSupport)
+#ifdef MR_SHORTHAND
+ (void) swizzleShorthandMethods;
+#endif
@end
@@ -7,6 +7,8 @@
//
#import "MagicalRecord+iCloud.h"
+#import "NSPersistentStoreCoordinator+MagicalRecord.h"
+#import "NSManagedObjectContext+MagicalRecord.h"
static BOOL _iCloudEnabled = NO;
@@ -9,6 +9,30 @@
#define MAC_PLATFORM_ONLY YES
#endif
+// enable to use caches for the fetchedResultsControllers (iOS only)
+// #define STORE_USE_CACHE
+
+#define kCreateNewCoordinatorOnBackgroundOperations 0
+
+#ifndef MR_ENABLE_ACTIVE_RECORD_LOGGING
+ #ifdef DEBUG
+ #define MR_ENABLE_ACTIVE_RECORD_LOGGING 1
+ #else
+ #define MR_ENABLE_ACTIVE_RECORD_LOGGING 0
+ #endif
+#endif
+
+#if MR_ENABLE_ACTIVE_RECORD_LOGGING != 0
+ #ifdef LOG_VERBOSE
+ extern int ddLogLevel;
+ #define MRLog(...) DDLogVerbose(__VA_ARGS__)
+ #else
+ #define MRLog(...) NSLog(@"%s(%p) %@", __PRETTY_FUNCTION__, self, [NSString stringWithFormat:__VA_ARGS__])
+ #endif
+#else
+ #define MRLog(...) ((void)0)
+#endif
+
#ifdef NS_BLOCKS_AVAILABLE
@class NSManagedObjectContext;
@@ -1,38 +1,14 @@
-// enable to use caches for the fetchedResultsControllers (iOS only)
-// #define STORE_USE_CACHE
-
-#define kCreateNewCoordinatorOnBackgroundOperations 0
-
-#ifndef MR_ENABLE_ACTIVE_RECORD_LOGGING
- #ifdef DEBUG
- #define MR_ENABLE_ACTIVE_RECORD_LOGGING 1
- #else
- #define MR_ENABLE_ACTIVE_RECORD_LOGGING 0
- #endif
-#endif
-
-#ifdef __OBJC__
-
-#if MR_ENABLE_ACTIVE_RECORD_LOGGING != 0
-#ifdef LOG_VERBOSE
- #define MRLog(...) DDLogVerbose(__VA_ARGS__)
-#else
- #define MRLog(...) NSLog(@"%s(%p) %@", __PRETTY_FUNCTION__, self, [NSString stringWithFormat:__VA_ARGS__])
-#endif
-#else
- #define MRLog(...) ((void)0)
-#endif
-
-
#ifndef NS_BLOCKS_AVAILABLE
-#warning MagicalRecord requires blocks
+ #warning MagicalRecord requires blocks
#endif
+#ifdef __OBJC__
// #if !( __has_feature(objc_arc) && __has_feature(objc_arc_weak) )
// #error MagicalRecord now requires ARC to be enabled
// #endif
+ #import <CoreFoundation/CoreFoundation.h>
#import <CoreData/CoreData.h>
#ifdef MR_SHORTHAND
@@ -69,3 +45,18 @@
#import "NSEntityDescription+MagicalDataImport.h"
#endif
+g.h"
+ #import "NSPersistentStoreCoordinator+MagicalRecord.h"
+ #import "NSManagedObjectModel+MagicalRecord.h"
+ #import "NSPersistentStore+MagicalRecord.h"
+
+ #import "MagicalImportFunctions.h"
+ #import "NSManagedObject+MagicalDataImport.h"
+ #import "NSNumber+MagicalDataImport.h"
+ #import "NSObject+MagicalDataImport.h"
+ #import "NSString+MagicalDataImport.h"
+ #import "NSAttributeDescription+MagicalDataImport.h"
+ #import "NSRelationshipDescription+MagicalDataImport.h"
+ #import "NSEntityDescription+MagicalDataImport.h"
+
+#endif
Oops, something went wrong.

0 comments on commit 5c5ea83

Please sign in to comment.