Skip to content

Commit

Permalink
Merge pull request #16 from hyperoslo/fix/id-support
Browse files Browse the repository at this point in the history
Fix one letter local keys support
  • Loading branch information
jgorset committed Nov 2, 2014
2 parents 0a0f78a + 6d1e83c commit 2393776
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion NSManagedObject-HYPPropertyMapper.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "NSManagedObject-HYPPropertyMapper"
s.version = "1.6"
s.version = "1.7"
s.summary = "Mapping your Core Data objects with your JSON providing backend has never been this easy"
s.description = <<-DESC
* Mapping your Core Data objects with your JSON providing backend has never been this easy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ - (void)testRemoteString

XCTAssertEqualObjects(remoteKey, [localKey remoteString]);

localKey = @"ID";
localKey = @"id";
remoteKey = @"id";

XCTAssertEqualObjects(remoteKey, [localKey remoteString]);

localKey = @"PDF";
localKey = @"pdf";
remoteKey = @"pdf";

XCTAssertEqualObjects(remoteKey, [localKey remoteString]);
Expand Down Expand Up @@ -126,12 +126,12 @@ - (void)testLocalString
XCTAssertEqualObjects(localKey, [remoteKey localString]);

remoteKey = @"id";
localKey = @"ID";
localKey = @"id";

XCTAssertEqualObjects(localKey, [remoteKey localString]);

remoteKey = @"pdf";
localKey = @"PDF";
localKey = @"pdf";

XCTAssertEqualObjects(localKey, [remoteKey localString]);

Expand Down
2 changes: 1 addition & 1 deletion Source/NSManagedObject+HYPPropertyMapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ - (NSString *)localString

BOOL remoteStringIsAnAcronym = ([[NSString acronyms] containsObject:[processedString lowercaseString]]);

return (remoteStringIsAnAcronym) ? processedString : [processedString lowerCaseFirstLetter];
return (remoteStringIsAnAcronym) ? [processedString lowercaseString] : [processedString lowerCaseFirstLetter];
}

- (NSString *)lowerCaseFirstLetter
Expand Down

0 comments on commit 2393776

Please sign in to comment.