Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is groovy, you should merge it. #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AddressFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ @implementation AddressFormatter

+ (NSString *)createAddressUsingHostname:(NSString *)hostname portNumber:(NSString *)portNumber suffix:(NSString *)suffix;
{
return [NSString stringWithFormat:@"%@:%@/api/json/",hostname,portNumber];
return [NSString stringWithFormat:@"%@:%@/%@/api/json/",hostname,portNumber, suffix ? suffix : @""];
}

@end
17 changes: 17 additions & 0 deletions BuildDetailView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// Created by mike_rowe on 27/10/11.
//
// To change the template use AppCode | Preferences | File Templates.
//


#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "build.h"

@interface BuildDetailView : UIView

@property (nonatomic, retain) Build *build;

@end
48 changes: 48 additions & 0 deletions BuildDetailView.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// Created by mike_rowe on 27/10/11.
//
// To change the template use AppCode | Preferences | File Templates.
//


#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "BuildDetailView.h"

@implementation BuildDetailView

@synthesize build;

- (id)initWithFrame:(CGRect)frame;
{
self = [super initWithFrame:frame];

if (self) {
[self setBackgroundColor:[UIColor whiteColor]];
}

return self;
}


#pragma mark - UIView Lifecycle

- (void)layoutSubviews;
{
}

- (void)drawRect:(CGRect)rect;
{
CGRect frame = CGRectMake(0., 10., CGRectGetMaxX(rect), 40.);
UILabel *build_name = [[UILabel alloc] initWithFrame:frame];
[build_name setTextAlignment:UITextAlignmentCenter];
[build_name setFont:[UIFont boldSystemFontOfSize:22.]];
[build_name setText:[build name]];
[self addSubview:build_name];
}

- (void)refresh;
{
}

@end
8 changes: 6 additions & 2 deletions DisplayBuildsView.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "DisplayBuildsView.h"
#import "UIColor+Hex.h"
#import "Build.h"
#import "BuildDetailView.h"

@interface DisplayBuildsView ()

Expand Down Expand Up @@ -62,7 +65,9 @@ - (void)refresh;
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
{

BuildDetailView *detailView = [[BuildDetailView alloc] initWithFrame:[self frame]];
[detailView setBuild:[[self buildData] objectAtIndex:[indexPath row]]];
[self addSubview:detailView];
}

- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath;
Expand Down Expand Up @@ -90,7 +95,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}

Build *build = [[self buildData] objectAtIndex:[indexPath row]];

[[cell textLabel] setText:[build name]];

if ([[build status] isEqualToString:@"red"])
Expand Down
6 changes: 6 additions & 0 deletions iBroke.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
21F76C30144E838E00F0BB5F /* ASIInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 21F76C26144E838E00F0BB5F /* ASIInputStream.m */; settings = {COMPILER_FLAGS = " -fno-objc-arc"; }; };
21F76C31144E838E00F0BB5F /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 21F76C28144E838E00F0BB5F /* ASINetworkQueue.m */; settings = {COMPILER_FLAGS = " -fno-objc-arc"; }; };
21F76C34144E839C00F0BB5F /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 21F76C33144E839C00F0BB5F /* Reachability.m */; settings = {COMPILER_FLAGS = " -fno-objc-arc"; }; };
21F76C34144E839C00F0BB61 /* BuildDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 21F76C34144E839C00F0BB60 /* BuildDetailView.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -143,6 +144,8 @@
21F76C29144E838E00F0BB5F /* ASIProgressDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASIProgressDelegate.h; path = "Third Party/asi-http-request/Classes/ASIProgressDelegate.h"; sourceTree = "<group>"; };
21F76C32144E839C00F0BB5F /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Reachability.h; path = "Third Party/asi-http-request/External/Reachability/Reachability.h"; sourceTree = "<group>"; };
21F76C33144E839C00F0BB5F /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Reachability.m; path = "Third Party/asi-http-request/External/Reachability/Reachability.m"; sourceTree = "<group>"; };
21F76C34144E839C00F0BB60 /* BuildDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuildDetailView.m; sourceTree = "<group>"; };
21F76C34144E839C00F0BB62 /* BuildDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuildDetailView.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -250,6 +253,8 @@
2152CC32144E68DC00F22682 /* Views */ = {
isa = PBXGroup;
children = (
21F76C34144E839C00F0BB62 /* BuildDetailView.h */,
21F76C34144E839C00F0BB60 /* BuildDetailView.m */,
2152CC33144E690D00F22682 /* SettingsView.h */,
2152CC34144E690D00F22682 /* SettingsView.m */,
219E3B2B144EADB100EF4A5D /* DisplayBuildsView.h */,
Expand Down Expand Up @@ -452,6 +457,7 @@
218A041B144F8B8C0015AD0D /* Build.m in Sources */,
218A0429144F956F0015AD0D /* NSArray+Blocks.m in Sources */,
2172413D1459152200DE5E82 /* UIColor+Hex.m in Sources */,
21F76C34144E839C00F0BB61 /* BuildDetailView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down