mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Add missing space after comma. Refs #614
Used uncrustify's "sp_after_comma = add" option to detect issues.
This commit is contained in:
@@ -36,7 +36,7 @@ RK_FIX_CATEGORY_BUG(NSData_RKAdditions)
|
||||
// Convert unsigned char buffer to NSString of hex values
|
||||
NSMutableString* output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
|
||||
for (int i = 0; i < CC_MD5_DIGEST_LENGTH; i++) {
|
||||
[output appendFormat:@"%02x",md5Buffer[i]];
|
||||
[output appendFormat:@"%02x", md5Buffer[i]];
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
@@ -318,7 +318,7 @@ RKRequestMethod RKRequestMethodTypeFromName(NSString *methodName) {
|
||||
if (self.authenticationType == RKRequestAuthenticationTypeHTTPBasic && _username && _password) {
|
||||
CFHTTPMessageRef dummyRequest = CFHTTPMessageCreateRequest(kCFAllocatorDefault, (CFStringRef)[self HTTPMethod], (CFURLRef)[self URL], kCFHTTPVersion1_1);
|
||||
if (dummyRequest) {
|
||||
CFHTTPMessageAddAuthentication(dummyRequest, nil, (CFStringRef)_username, (CFStringRef)_password,kCFHTTPAuthenticationSchemeBasic, FALSE);
|
||||
CFHTTPMessageAddAuthentication(dummyRequest, nil, (CFStringRef)_username, (CFStringRef)_password, kCFHTTPAuthenticationSchemeBasic, FALSE);
|
||||
CFStringRef authorizationString = CFHTTPMessageCopyHeaderFieldValue(dummyRequest, CFSTR("Authorization"));
|
||||
if (authorizationString) {
|
||||
[_URLRequest setValue:(NSString *)authorizationString forHTTPHeaderField:@"Authorization"];
|
||||
@@ -374,7 +374,7 @@ RKRequestMethod RKRequestMethodTypeFromName(NSString *methodName) {
|
||||
|
||||
// OAuth 2 valid request
|
||||
if (self.authenticationType == RKRequestAuthenticationTypeOAuth2) {
|
||||
NSString *authorizationString = [NSString stringWithFormat:@"OAuth2 %@",self.OAuth2AccessToken];
|
||||
NSString *authorizationString = [NSString stringWithFormat:@"OAuth2 %@", self.OAuth2AccessToken];
|
||||
[_URLRequest setValue:authorizationString forHTTPHeaderField:@"Authorization"];
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ RK_FIX_CATEGORY_BUG(NSString_RKAdditions)
|
||||
// Convert MD5 value in the buffer to NSString of hex values
|
||||
NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
|
||||
for (int i = 0; i < CC_MD5_DIGEST_LENGTH; i++) {
|
||||
[output appendFormat:@"%02x",md5Buffer[i]];
|
||||
[output appendFormat:@"%02x", md5Buffer[i]];
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
@@ -55,10 +55,10 @@ NSString *RKEncodeURLString(NSString *unencodedString) {
|
||||
}
|
||||
|
||||
@interface RKPathMatcher ()
|
||||
@property (nonatomic,retain) SOCPattern *socPattern;
|
||||
@property (nonatomic,copy) NSString *sourcePath;
|
||||
@property (nonatomic,copy) NSString *rootPath;
|
||||
@property (copy,readwrite) NSDictionary *queryParameters;
|
||||
@property (nonatomic, retain) SOCPattern *socPattern;
|
||||
@property (nonatomic, copy) NSString *sourcePath;
|
||||
@property (nonatomic, copy) NSString *rootPath;
|
||||
@property (copy, readwrite) NSDictionary *queryParameters;
|
||||
@end
|
||||
|
||||
@implementation RKPathMatcher
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
|
||||
// Try to connect to the port
|
||||
_open = (connect(sd,(struct sockaddr *) &_remote_saddr, sizeof(_remote_saddr)) == 0);
|
||||
_open = (connect(sd, (struct sockaddr *) &_remote_saddr, sizeof(_remote_saddr)) == 0);
|
||||
|
||||
if (_open) {
|
||||
close(sd);
|
||||
|
||||
@@ -1197,7 +1197,7 @@ static NSString * lastUpdatedDateDictionaryKey = @"lastUpdatedDateDictionaryKey"
|
||||
[UIView commitAnimations];
|
||||
} else {
|
||||
[_cellSwipeView removeFromSuperview];
|
||||
_swipeCell.frame = CGRectMake(0,_swipeCell.frame.origin.y,_swipeCell.frame.size.width, _swipeCell.frame.size.height);
|
||||
_swipeCell.frame = CGRectMake(0, _swipeCell.frame.origin.y, _swipeCell.frame.size.width, _swipeCell.frame.size.height);
|
||||
[_swipeCell release];
|
||||
_swipeCell = nil;
|
||||
}
|
||||
|
||||
@@ -21,20 +21,20 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface RKRefreshTriggerView : UIView <UIAppearanceContainer,UIAppearance>
|
||||
@interface RKRefreshTriggerView : UIView <UIAppearanceContainer, UIAppearance>
|
||||
@property (nonatomic, retain) UILabel *titleLabel;
|
||||
@property (nonatomic, retain) UILabel *lastUpdatedLabel;
|
||||
@property (nonatomic, retain) UIImageView *arrowView;
|
||||
@property (nonatomic, retain) UIActivityIndicatorView *activityView;
|
||||
|
||||
#ifdef UI_APPEARANCE_SELECTOR
|
||||
@property (nonatomic,assign) UIImage *arrowImage UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic,assign) UIActivityIndicatorViewStyle activityIndicatorStyle UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic,assign) UIFont *titleFont UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic,assign) UIColor *titleColor UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic,assign) UIFont *lastUpdatedFont UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic,assign) UIColor *lastUpdatedColor UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic,retain) UIColor *refreshBackgroundColor UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic, assign) UIImage *arrowImage UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic, assign) UIActivityIndicatorViewStyle activityIndicatorStyle UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic, assign) UIFont *titleFont UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic, assign) UIColor *titleColor UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic, assign) UIFont *lastUpdatedFont UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic, assign) UIColor *lastUpdatedColor UI_APPEARANCE_SELECTOR;
|
||||
@property (nonatomic, retain) UIColor *refreshBackgroundColor UI_APPEARANCE_SELECTOR;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
[mappings setCellMapping:cellMapping forClass:[RKMappableObject class]];
|
||||
RKTableSection* section = [RKTableSection sectionForObjects:objects withMappings:mappings];
|
||||
UITableViewController* tableViewController = [UITableViewController new];
|
||||
tableViewController.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,0,0) style:UITableViewStylePlain];
|
||||
tableViewController.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStylePlain];
|
||||
RKTableController* tableController = [RKTableController tableControllerForTableViewController:tableViewController];
|
||||
[tableController insertSection:section atIndex:0];
|
||||
tableController.cellMappings = mappings;
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
}
|
||||
|
||||
- (void)testShouldEncodeArrayOfDictionaries {
|
||||
NSDictionary * dictA = [NSDictionary dictionaryWithKeysAndObjects:@"a",@"x",@"b",@"y", nil];
|
||||
NSDictionary * dictB = [NSDictionary dictionaryWithKeysAndObjects:@"a",@"1",@"b",@"2", nil];
|
||||
NSDictionary * dictA = [NSDictionary dictionaryWithKeysAndObjects:@"a", @"x", @"b", @"y", nil];
|
||||
NSDictionary * dictB = [NSDictionary dictionaryWithKeysAndObjects:@"a", @"1", @"b", @"2", nil];
|
||||
|
||||
NSArray * array = [NSArray arrayWithObjects: dictA, dictB, nil];
|
||||
NSDictionary * dictRoot = [NSDictionary dictionaryWithKeysAndObjects:@"root", array, nil];
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
NSString *resourcePath = @"/controller/objects/";
|
||||
NSDictionary *queryParams = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"ascend", @"sortOrder",
|
||||
@"name", @"groupBy",nil];
|
||||
@"name", @"groupBy", nil];
|
||||
NSString *resultingPath = [resourcePath stringByAppendingQueryParameters:queryParams];
|
||||
assertThat(resultingPath, isNot(equalTo(nil)));
|
||||
NSString *expectedPath1 = @"/controller/objects/?sortOrder=ascend&groupBy=name";
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
NSDate* _createdAt;
|
||||
}
|
||||
|
||||
@property (nonatomic,retain) NSString* name;
|
||||
@property (nonatomic,retain) NSNumber* age;
|
||||
@property (nonatomic,retain) NSDate* createdAt;
|
||||
@property (nonatomic, retain) NSString* name;
|
||||
@property (nonatomic, retain) NSNumber* age;
|
||||
@property (nonatomic, retain) NSDate* createdAt;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user