Fail out build process when run_command encounters non-zero exit status. Fixed OS X compile issues introduced by automatic network activity indicator. refs #57

This commit is contained in:
Blake Watters
2011-04-19 13:13:34 -04:00
parent d275ec7484
commit 1437026e43
3 changed files with 13 additions and 1 deletions

View File

@@ -65,6 +65,7 @@
*/
@property (nonatomic, readonly) NSUInteger count;
#if TARGET_OS_IPHONE
/**
* When YES, this queue will spin the network activity in the menu bar when it is processing
* requests
@@ -75,6 +76,7 @@
* will manipulate the activity indicator indepedently of all others.
*/
@property (nonatomic) BOOL showsNetworkActivityIndicatorWhenBusy;
#endif
/**
* Return the global queue

View File

@@ -32,7 +32,10 @@ static const NSTimeInterval kFlushDelay = 0.3;
@synthesize requestTimeout = _requestTimeout;
@synthesize suspended = _suspended;
@synthesize loadingCount = _loadingCount;
#if TARGET_OS_IPHONE
@synthesize showsNetworkActivityIndicatorWhenBusy = _showsNetworkActivityIndicatorWhenBusy;
#endif
+ (RKRequestQueue*)sharedQueue {
if (!gSharedQueue) {
@@ -100,19 +103,23 @@ static const NSTimeInterval kFlushDelay = 0.3;
if ([_delegate respondsToSelector:@selector(requestQueueDidBeginLoading:)]) {
[_delegate requestQueueDidBeginLoading:self];
}
#if TARGET_OS_IPHONE
if (self.showsNetworkActivityIndicatorWhenBusy) {
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}
#endif
} else if (_loadingCount > 0 && count == 0) {
// Transition from processing to empty
if ([_delegate respondsToSelector:@selector(requestQueueDidFinishLoading:)]) {
[_delegate requestQueueDidFinishLoading:self];
}
#if TARGET_OS_IPHONE
if (self.showsNetworkActivityIndicatorWhenBusy) {
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}
#endif
}
_loadingCount = count;

View File

@@ -51,6 +51,9 @@ end
def run(command)
puts "Executing: `#{command}`"
system(command)
if $? != 0
puts "[!] Failed with exit code #{$?} while running: `#{command}`"
end
end
desc "Run all specs"