Skip to content

Commit

Permalink
Removing unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaxt committed Mar 14, 2015
2 parents 3365e42 + d182db9 commit e476faf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 62 deletions.
4 changes: 2 additions & 2 deletions OCMapper.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = 'OCMapper'
s.version = '1.0.3'
s.version = '1.5'
s.summary = 'NSDictionary to NSObject Mapper'
s.homepage = 'https://github.com/aryaxt/OCMapper'
s.license = {
:type => 'MIT',
:file => 'License.txt'
}
s.author = {'Aryan Ghassemi' => 'https://github.com/aryaxt/OCMapper'}
s.source = {:git => 'https://github.com/aryaxt/OCMapper.git', :tag => '1.0.3'}
s.source = {:git => 'https://github.com/aryaxt/OCMapper.git', :tag => '1.5'}
s.source_files = 'OCMapper/Source/*.{h,m}','OCMapper/Source/Categories/*.{h,m}','OCMapper/Source/Logging Provider/*.{h,m}','OCMapper/Source/Instance Provider/*.{h,m}','OCMapper/Source/Mapping Provider/*.{h,m}','OCMapper/Source/Mapping Provider/In Code Mapping/*.{h,m}','OCMapper/Source/Mapping Provider/PLIST Mapping/*.{h,m}','OCMapper/Source/Mapping Provider/XML Mapping/*.{h,m}'
s.framework = 'Foundation'
s.requires_arc = true
Expand Down
2 changes: 2 additions & 0 deletions OCMapper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "OCMapper/OCMapper-Prefix.pch";
INFOPLIST_FILE = "OCMapper/OCMapper-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = OCMapper;
WRAPPER_EXTENSION = app;
};
Expand All @@ -698,6 +699,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "OCMapper/OCMapper-Prefix.pch";
INFOPLIST_FILE = "OCMapper/OCMapper-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = OCMapper;
WRAPPER_EXTENSION = app;
};
Expand Down
16 changes: 0 additions & 16 deletions OCMapper/Source/Mapping Provider/XML Mapping/XMLMappingProvider.h

This file was deleted.

38 changes: 0 additions & 38 deletions OCMapper/Source/Mapping Provider/XML Mapping/XMLMappingProvider.m

This file was deleted.

17 changes: 11 additions & 6 deletions OCMapper/Source/ObjectMapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ - (id)init

- (id)objectFromSource:(id)source toInstanceOfClass:(Class)class
{
if (!_mappingProvider)
@throw ([NSException exceptionWithName:@"MissingMappingProvider" reason:@"Mapping provider is not set" userInfo:nil]);

if ([source isKindOfClass:[NSDictionary class]])
{
ILog(@"____________________ Mapping Dictionary to instance [%@] ____________________", NSStringFromClass(class));
Expand Down Expand Up @@ -169,8 +166,14 @@ - (NSArray *)processDictionaryFromArray:(NSArray *)array
return result;
}

- (NSDictionary *)processDictionaryFromObject:(NSObject *)object
- (id)processDictionaryFromObject:(NSObject *)object
{
// For example when we are mapping an array of string, we shouldn't try to map the string objects inside the array
if ([NSBundle mainBundle] != [NSBundle bundleForClass:object.class] && [object class] != [NSArray class])
{
return object;
}

NSMutableDictionary *props = [NSMutableDictionary dictionary];

Class currentClass = [object class];
Expand Down Expand Up @@ -303,7 +306,7 @@ - (id)processDictionary:(NSDictionary *)source forClass:(Class)class
if ([value isKindOfClass:[NSDictionary class]])
{
objectType = NSClassFromString([NSString stringWithFormat:@"%@.%@",
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]
[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleNameKey]
,[self typeForProperty:propertyName andClass:class]]);
}

Expand Down Expand Up @@ -383,6 +386,8 @@ - (id)processDictionary:(NSDictionary *)source forClass:(Class)class
return instanceProvider;
}

ELog(@"Could not find an instance provider that can handle class '%@'", NSStringFromClass(class));

return nil;
}

Expand Down Expand Up @@ -427,7 +432,7 @@ - (Class)classFromString:(NSString *)className
return clazz;
};

NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleNameKey];

NSString *predictedClassName = className;
if (testClassName(predictedClassName)) { return testClassName(predictedClassName); }
Expand Down

0 comments on commit e476faf

Please sign in to comment.