Skip to content

Commit

Permalink
EDIT rename major and minor version properties appropiately
Browse files Browse the repository at this point in the history
  • Loading branch information
dcantelar committed Jul 16, 2014
1 parent 4d6f992 commit 26bcf18
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ios/Hybridge/Hybridge/HYBBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
/**
Returns the native bridge major version.
*/
+ (NSInteger)version;
+ (NSInteger)majorVersion;

/**
Returns the native bridge minor version.
*/
+ (NSInteger)versionMinor;
+ (NSInteger)minorVersion;

/**
Sets the active bridge.
Expand Down
6 changes: 3 additions & 3 deletions ios/Hybridge/Hybridge/HYBBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ + (void)initialize {
}
}

+ (NSInteger)version {
+ (NSInteger)majorVersion {
return 1;
}

+ (NSInteger)versionMinor {
+ (NSInteger)minorVersion {
return 2;
}

Expand Down Expand Up @@ -144,7 +144,7 @@ - (NSString *)prepareWebView:(UIWebView *)webView {
NSArray *events = @[HYBEventPause, HYBEventResume, HYBEventMessage, HYBEventReady];
NSString *eventsString = [NSString hyb_JSONStringWithObject:events];

NSString *javascript = [NSString stringWithFormat:kFormat, @([[self class] version]), @([[self class] versionMinor]), actionsString, eventsString];
NSString *javascript = [NSString stringWithFormat:kFormat, @([[self class] majorVersion]), @([[self class] minorVersion]), actionsString, eventsString];
return [webView stringByEvaluatingJavaScriptFromString:javascript];
}

Expand Down
4 changes: 2 additions & 2 deletions ios/Hybridge/HybridgeTests/HYBBridgeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ - (void)tearDown {
}

- (void)testVersion {
XCTAssertEqual((NSInteger)1, [HYBBridge version], @"should return the right version");
XCTAssertEqual((NSInteger)1, [HYBBridge majorVersion], @"should return the right major version");
}

- (void)testVersionMinor {
XCTAssertEqual((NSInteger)2, [HYBBridge versionMinor], @"should return the right minor version");
XCTAssertEqual((NSInteger)2, [HYBBridge minorVersion], @"should return the right minor version");
}

- (void)testActiveBridge {
Expand Down

0 comments on commit 26bcf18

Please sign in to comment.