diff --git a/BuildaGitServer/Base/Authentication.swift b/BuildaGitServer/Base/Authentication.swift index 9a465a3..6f5765e 100644 --- a/BuildaGitServer/Base/Authentication.swift +++ b/BuildaGitServer/Base/Authentication.swift @@ -40,9 +40,21 @@ extension ProjectAuthenticator: KeychainStringSerializable { let comps = value.componentsSeparatedByString(":") guard comps.count >= 4 else { throw Error.withInfo("Corrupted keychain string") } - guard let service = GitService(rawValue: comps[0]) else { - throw Error.withInfo("Unsupported service: \(comps[0])") + + var service: GitService + switch comps[0] { + case GitService.GitHub.hostname(): + service = GitService.GitHub + case GitService.BitBucket.hostname(): + service = GitService.BitBucket + default: + let host = comps[0] + guard let maybeService = GitService.createEnterpriseService(host) else { + throw Error.withInfo("Unsupported service: \(host)") + } + service = maybeService } + guard let type = ProjectAuthenticator.AuthType(rawValue: comps[2]) else { throw Error.withInfo("Unsupported auth type: \(comps[2])") } @@ -55,7 +67,7 @@ extension ProjectAuthenticator: KeychainStringSerializable { public func toString() -> String { return [ - self.service.rawValue, + self.service.hostname(), self.username, self.type.rawValue, self.secret diff --git a/BuildaGitServer/Base/BaseTypes.swift b/BuildaGitServer/Base/BaseTypes.swift index b05f988..786977f 100644 --- a/BuildaGitServer/Base/BaseTypes.swift +++ b/BuildaGitServer/Base/BaseTypes.swift @@ -35,7 +35,7 @@ public class SourceServerFactory { public func createServer(service: GitService, auth: ProjectAuthenticator?) -> SourceServerType { if let auth = auth { - precondition(service == auth.service) + precondition(service.type() == auth.service.type()) } return GitServerFactory.server(service, auth: auth) diff --git a/BuildaGitServer/Base/GitServerFactory.swift b/BuildaGitServer/Base/GitServerFactory.swift index a2f1186..eb91108 100644 --- a/BuildaGitServer/Base/GitServerFactory.swift +++ b/BuildaGitServer/Base/GitServerFactory.swift @@ -20,6 +20,10 @@ class GitServerFactory { let baseURL = "https://api.github.com" let endpoints = GitHubEndpoints(baseURL: baseURL, auth: auth) server = GitHubServer(endpoints: endpoints, http: http) + case .EnterpriseGitHub: + let baseURL = "https://api.\(service.hostname())" + let endpoints = GitHubEndpoints(baseURL: baseURL, auth: auth) + server = GitHubServer(endpoints: endpoints, http: http) case .BitBucket: let baseURL = "https://api.bitbucket.org" let endpoints = BitBucketEndpoints(baseURL: baseURL, auth: auth) diff --git a/BuildaGitServer/GitServerPublic.swift b/BuildaGitServer/GitServerPublic.swift index bf34d1e..eab7fa3 100644 --- a/BuildaGitServer/GitServerPublic.swift +++ b/BuildaGitServer/GitServerPublic.swift @@ -12,14 +12,24 @@ import Keys import ReactiveCocoa import Result -public enum GitService: String { - case GitHub = "github" - case BitBucket = "bitbucket" +public enum GitService { + case GitHub + case EnterpriseGitHub(host: String) + case BitBucket // case GitLab = "gitlab" - + + public func type() -> String { + switch self { + case .GitHub: return "github" + case .EnterpriseGitHub: return "enterprisegithub" + case .BitBucket: return "bitbucket" + } + } + public func prettyName() -> String { switch self { case .GitHub: return "GitHub" + case .EnterpriseGitHub: return "EnterpriseGitHub" case .BitBucket: return "BitBucket" } } @@ -27,6 +37,7 @@ public enum GitService: String { public func logoName() -> String { switch self { case .GitHub: return "github" + case .EnterpriseGitHub: return "enterprisegithub" case .BitBucket: return "bitbucket" } } @@ -34,6 +45,7 @@ public enum GitService: String { public func hostname() -> String { switch self { case .GitHub: return "github.com" + case .EnterpriseGitHub(let host): return host case .BitBucket: return "bitbucket.org" } } @@ -41,6 +53,7 @@ public enum GitService: String { public func authorizeUrl() -> String { switch self { case .GitHub: return "https://github.com/login/oauth/authorize" + case .EnterpriseGitHub: assert(false) case .BitBucket: return "https://bitbucket.org/site/oauth2/authorize" } } @@ -48,6 +61,7 @@ public enum GitService: String { public func accessTokenUrl() -> String { switch self { case .GitHub: return "https://github.com/login/oauth/access_token" + case .EnterpriseGitHub: assert(false) case .BitBucket: return "https://bitbucket.org/site/oauth2/access_token" } } @@ -55,6 +69,7 @@ public enum GitService: String { public func serviceKey() -> String { switch self { case .GitHub: return BuildasaurKeys().gitHubAPIClientId() + case .EnterpriseGitHub: assert(false) case .BitBucket: return BuildasaurKeys().bitBucketAPIClientId() } } @@ -62,9 +77,23 @@ public enum GitService: String { public func serviceSecret() -> String { switch self { case .GitHub: return BuildasaurKeys().gitHubAPIClientSecret() + case .EnterpriseGitHub: assert(false) case .BitBucket: return BuildasaurKeys().bitBucketAPIClientSecret() } } + + public static func createEnterpriseService(host: String) -> GitService? { + guard let url = NSURL(string: "http://\(host)") else { return nil } + do { + let response = try NSString.init(contentsOfURL: url, encoding: NSASCIIStringEncoding) + if response.lowercaseString.containsString("github") { + return GitService.EnterpriseGitHub(host: host) + } + } catch { + Log.error("\(error)") + } + return nil + } } public class GitServer : HTTPServer { diff --git a/BuildaGitServerTests/AuthenticationTests.swift b/BuildaGitServerTests/AuthenticationTests.swift new file mode 100644 index 0000000..0b8bd96 --- /dev/null +++ b/BuildaGitServerTests/AuthenticationTests.swift @@ -0,0 +1,71 @@ +// +// AuthenticationTests.swift +// Buildasaur +// +// Created by Rachel Caileff on 3/14/16. +// Copyright © 2016 Honza Dvorsky. All rights reserved. +// + +import XCTest +@testable import BuildaGitServer + +class AuthenticationTests: XCTestCase { + + let gitService = "GIT" + let tokenType = "PersonalToken" + let tokenValue = "1234567890" + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testEmptyStringShouldThrow() { + do { + try ProjectAuthenticator.fromString("") + XCTFail() + } catch { + // Expected behavior + } + } + + func testInvalidHostShouldThrow() { + do { + try ProjectAuthenticator.fromString("a:\(gitService):\(tokenType):\(tokenValue)") + XCTFail() + } catch { + // Expected behavior + } + } + + func testNonexistantHostShouldThrow() { + do { + try ProjectAuthenticator.fromString("some.fakehostname.com:\(gitService):\(tokenType):\(tokenValue)") + XCTFail() + } catch { + // Expected behavior + } + } + + func testInvalidAuthTypeShouldThrow() { + do { + try ProjectAuthenticator.fromString("\(GitService.GitHub.hostname()):\(gitService):junkstring:\(tokenValue)") + XCTFail() + } catch { + // Expected behavior + } + } + + func testValidStringShouldNotThrow() { + do { + try ProjectAuthenticator.fromString("\(GitService.GitHub.hostname()):\(gitService):\(tokenType):\(tokenValue)") + } catch { + XCTFail() + } + } +} diff --git a/BuildaGitServerTests/EnterpriseGitHubSourceTests.swift b/BuildaGitServerTests/EnterpriseGitHubSourceTests.swift new file mode 100644 index 0000000..b8f6663 --- /dev/null +++ b/BuildaGitServerTests/EnterpriseGitHubSourceTests.swift @@ -0,0 +1,98 @@ +// +// EnterpriseGitHubSourceTests.swift +// Buildasaur +// +// Created by Rachel Caileff on 3/8/16. +// Copyright © 2016 Honza Dvorsky. All rights reserved. +// + +import Cocoa +import XCTest +@testable import BuildaGitServer +import BuildaUtils + +class EnterpriseGitHubSourceTests: XCTestCase { + + var github: GitHubServer! + var repo: String = "my/repo" // TODO: fill in accessible enterprise github repo + + override func setUp() { + super.setUp() + + self.github = GitServerFactory.server(.EnterpriseGitHub(host: "git.mycompany.com"), auth: nil) as! GitHubServer // TODO: fill in accessible enterprise github host + } + + override func tearDown() { + + self.github = nil + + super.tearDown() + } + + func tryEndpoint(method: HTTP.Method, endpoint: GitHubEndpoints.Endpoint, params: [String: String]?, completion: (body: AnyObject!, error: NSError!) -> ()) { + + let expect = expectationWithDescription("Waiting for url request") + + do { + let request = try self.github.endpoints.createRequest(method, endpoint: endpoint, params: params) + + self.github.http.sendRequest(request, completion: { (response, body, error) -> () in + + completion(body: body, error: error) + expect.fulfill() + }) + + waitForExpectationsWithTimeout(10, handler: nil) + } catch { + XCTFail() + } + } + +// func testCreateEnterpriseServiceShouldReturnNilWhenPassedAnInvalidHostname() { +// let gitService = GitService.createEnterpriseService("some.fakehostname.com") +// XCTAssertNil(gitService) +// } +// +// func testCreateEnterpriseServiceShouldReturnAGitServiceWhenPassedAValidHostname() { +// let gitService = GitService.createEnterpriseService("github.com") +// XCTAssertNotNil(gitService) +// } +// +// func testGetPullRequests() { +// +// let params = [ +// "repo": self.repo +// ] +// +// self.tryEndpoint(.GET, endpoint: .PullRequests, params: params) { (body, error) -> () in +// +// XCTAssertNotNil(body, "Body must be non-nil") +// if let body = body as? NSArray { +// let prs: [GitHubPullRequest]? = try? GitHubArray(body) +// XCTAssertGreaterThan(prs?.count ?? -1, 0, "We need > 0 items to test parsing") +// Log.verbose("Parsed PRs: \(prs)") +// } else { +// XCTFail("Body nil") +// } +// } +// } +// +// func testGetBranches() { +// +// let params = [ +// "repo": self.repo +// ] +// +// self.tryEndpoint(.GET, endpoint: .Branches, params: params) { (body, error) -> () in +// +// XCTAssertNotNil(body, "Body must be non-nil") +// if let body = body as? NSArray { +// let branches: [GitHubBranch]? = try? GitHubArray(body) +// XCTAssertGreaterThan(branches?.count ?? -1, 0, "We need > 0 items to test parsing") +// Log.verbose("Parsed branches: \(branches)") +// } else { +// XCTFail("Body nil") +// } +// } +// } +} diff --git a/BuildaKit/SyncerManager.swift b/BuildaKit/SyncerManager.swift index 7d72c5c..0295c66 100644 --- a/BuildaKit/SyncerManager.swift +++ b/BuildaKit/SyncerManager.swift @@ -116,7 +116,7 @@ extension SyncerManager: HeartbeatManagerDelegate { public func typesOfRunningSyncers() -> [String : Int] { return self.syncers.filter { $0.active }.reduce([:]) { (all, syncer) -> [String: Int] in var stats = all - let syncerType = syncer._project.workspaceMetadata!.service.rawValue + let syncerType = syncer._project.workspaceMetadata!.service.type() stats[syncerType] = (stats[syncerType] ?? 0) + 1 return stats } diff --git a/BuildaKit/WorkspaceMetadata.swift b/BuildaKit/WorkspaceMetadata.swift index 2f43c27..69a48bc 100644 --- a/BuildaKit/WorkspaceMetadata.swift +++ b/BuildaKit/WorkspaceMetadata.swift @@ -79,7 +79,11 @@ extension WorkspaceMetadata { } else if projectURLString.containsString(GitService.BitBucket.hostname()) { gitService = .BitBucket } else { - Log.error("This git service is not yet supported.") + var urlPieces = projectURLString.split(":") + gitService = GitService.createEnterpriseService(urlPieces[0]) + if gitService == nil { + Log.error("This git service is not yet supported.") + } } switch url.scheme { diff --git a/BuildaKitTests/TestProjects/Buildasaur-TestProject-iOS/Buildasaur-TestProject-iOS.xcworkspace/xcshareddata/Buildasaur-TestProject-iOS.xcscmblueprint b/BuildaKitTests/TestProjects/Buildasaur-TestProject-iOS/Buildasaur-TestProject-iOS.xcworkspace/xcshareddata/Buildasaur-TestProject-iOS.xcscmblueprint index 14e688d..3740dc9 100644 --- a/BuildaKitTests/TestProjects/Buildasaur-TestProject-iOS/Buildasaur-TestProject-iOS.xcworkspace/xcshareddata/Buildasaur-TestProject-iOS.xcscmblueprint +++ b/BuildaKitTests/TestProjects/Buildasaur-TestProject-iOS/Buildasaur-TestProject-iOS.xcworkspace/xcshareddata/Buildasaur-TestProject-iOS.xcscmblueprint @@ -15,7 +15,7 @@ "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "BuildaKitTests/TestProjects/Buildasaur-TestProject-iOS/Buildasaur-TestProject-iOS.xcworkspace", "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:czechboy0\/Buildasaur.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "git@github.com:czechboy0\/Buildasaur.git", "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "1C5C2A17EEADA6DBF6678501245487A71FBE28BB" } diff --git a/BuildaKitTests/WorkspaceMetadataTests.swift b/BuildaKitTests/WorkspaceMetadataTests.swift index d5baef8..1683a07 100644 --- a/BuildaKitTests/WorkspaceMetadataTests.swift +++ b/BuildaKitTests/WorkspaceMetadataTests.swift @@ -20,7 +20,7 @@ class WorkspaceMetadataTests: XCTestCase { } expect(checkoutType) == expectedCheckoutType - expect(service) == expectedGitService + expect(service.type()) == expectedGitService.type() } // MARK: GitHub diff --git a/Buildasaur.xcodeproj/project.pbxproj b/Buildasaur.xcodeproj/project.pbxproj index db13e9a..eeeba2f 100644 --- a/Buildasaur.xcodeproj/project.pbxproj +++ b/Buildasaur.xcodeproj/project.pbxproj @@ -7,9 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 0928E6AF8EED8E829B0F4286 /* Pods_Buildasaur.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8FA09FE729BC440366D74E2E /* Pods_Buildasaur.framework */; }; - 130C2BB548050F030930B54F /* Pods_BuildaHeartbeatKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41155620B4193BDB27CD7E83 /* Pods_BuildaHeartbeatKit.framework */; }; - 158554341171FBBD63B039E2 /* Pods_BuildaGitServerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F29FCDBD0B3B9740956E5206 /* Pods_BuildaGitServerTests.framework */; }; 3A0034F01C5975C000A4ECB5 /* bitbucket_post_status.json in Resources */ = {isa = PBXBuildFile; fileRef = 3A0034EF1C5975C000A4ECB5 /* bitbucket_post_status.json */; }; 3A0034F21C59775100A4ECB5 /* bitbucket_get_status.json in Resources */ = {isa = PBXBuildFile; fileRef = 3A0034F11C59775100A4ECB5 /* bitbucket_get_status.json */; }; 3A014BA51C57A94B00B82B4A /* Authentication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A014BA41C57A94B00B82B4A /* Authentication.swift */; }; @@ -156,10 +153,15 @@ 3AED13151C52A1A300E3B7FF /* SecurePersistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AED13141C52A1A300E3B7FF /* SecurePersistence.swift */; }; 3AF090B81B1134AA0058567F /* BranchWatchingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF090B71B1134AA0058567F /* BranchWatchingViewController.swift */; }; 3AF1B1241AAC7CA500917EF3 /* SyncerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AF1B1231AAC7CA500917EF3 /* SyncerViewController.swift */; }; + 6427B0D35F605AB6A280DD94 /* Pods_BuildaHeartbeatKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D127C1A6AC9BC2A276D87C9B /* Pods_BuildaHeartbeatKit.framework */; }; 775501D89C0E4D209E6EE5D0 /* Pods_BuildaGitServer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9139F7877761955F17C535E /* Pods_BuildaGitServer.framework */; }; 785688011CDD4843009EEB72 /* WorkspaceMetadataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 785688001CDD4843009EEB72 /* WorkspaceMetadataTests.swift */; }; + 81EFD68FDD3B64B18D787351 /* Pods_BuildaKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BFDB59D042B1F4EBA021132 /* Pods_BuildaKit.framework */; }; + 8476D4061C8F4CD000463074 /* EnterpriseGitHubSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8476D4051C8F4CD000463074 /* EnterpriseGitHubSourceTests.swift */; }; + 8B22517BB7E47C997C8D7EDE /* Pods_Buildasaur.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B105F15DC0D8FB6C61EB1C33 /* Pods_Buildasaur.framework */; }; + 90E0B3BC47E1D9EEC556FA03 /* Pods_BuildaGitServerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A8D94F1D70D30788206EC2D /* Pods_BuildaGitServerTests.framework */; }; D59A4C6EEE903468E69AEA81 /* Pods_BuildaKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EC43508E8A4F9D6E5ED0126 /* Pods_BuildaKitTests.framework */; }; - E9F513792E8C95C43A68D1CD /* Pods_BuildaKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7827BDC6B1752C193A0EAA05 /* Pods_BuildaKit.framework */; }; + E9F513792E8C95C43A68D1CD /* (null) in Frameworks */ = {isa = PBXBuildFile; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -225,6 +227,7 @@ /* Begin PBXFileReference section */ 105246397B31495A090CD1D1 /* Pods-BuildaKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKit.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKit/Pods-BuildaKit.release.xcconfig"; sourceTree = ""; }; + 17265C17307D20F4C67DBAD5 /* Pods-BuildaKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKitTests/Pods-BuildaKitTests.debug.xcconfig"; sourceTree = ""; }; 2D7FAD09E7CF5F0D5E6CC526 /* Pods-BuildaHeartbeatKit.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaHeartbeatKit.testing.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaHeartbeatKit/Pods-BuildaHeartbeatKit.testing.xcconfig"; sourceTree = ""; }; 38739D0E658C834537584B63 /* Pods-BuildaGitServerTests.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServerTests.testing.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServerTests/Pods-BuildaGitServerTests.testing.xcconfig"; sourceTree = ""; }; 3A0034EF1C5975C000A4ECB5 /* bitbucket_post_status.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = bitbucket_post_status.json; path = Data/bitbucket_post_status.json; sourceTree = ""; }; @@ -376,28 +379,28 @@ 3AED13141C52A1A300E3B7FF /* SecurePersistence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecurePersistence.swift; sourceTree = ""; }; 3AF090B71B1134AA0058567F /* BranchWatchingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BranchWatchingViewController.swift; sourceTree = ""; }; 3AF1B1231AAC7CA500917EF3 /* SyncerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SyncerViewController.swift; sourceTree = ""; }; - 3D172B5BBA1416D1EE92A8A5 /* Pods-BuildaKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKitTests/Pods-BuildaKitTests.release.xcconfig"; sourceTree = ""; }; - 41155620B4193BDB27CD7E83 /* Pods_BuildaHeartbeatKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaHeartbeatKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3C9B7B3EE7C9258EA7A0C574 /* Pods-BuildaGitServerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServerTests/Pods-BuildaGitServerTests.release.xcconfig"; sourceTree = ""; }; 44E8AF72E61B7A15D6E70352 /* Pods-BuildaGitServer.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServer.testing.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServer/Pods-BuildaGitServer.testing.xcconfig"; sourceTree = ""; }; - 4A4FCE02D4B5A180AAF85C12 /* Pods-BuildaGitServer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServer.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServer/Pods-BuildaGitServer.debug.xcconfig"; sourceTree = ""; }; + 4715CCD872F3565B0D290B3B /* Pods-BuildaHeartbeatKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaHeartbeatKit.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaHeartbeatKit/Pods-BuildaHeartbeatKit.release.xcconfig"; sourceTree = ""; }; 4EC43508E8A4F9D6E5ED0126 /* Pods_BuildaKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6A0C42D6343BC2A4C4C899AB /* Pods-BuildaHeartbeatKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaHeartbeatKit.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaHeartbeatKit/Pods-BuildaHeartbeatKit.release.xcconfig"; sourceTree = ""; }; - 7827BDC6B1752C193A0EAA05 /* Pods_BuildaKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 54CC296C4C15EE5B4CB1A940 /* Pods-Buildasaur.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Buildasaur.release.xcconfig"; path = "Pods/Target Support Files/Pods-Buildasaur/Pods-Buildasaur.release.xcconfig"; sourceTree = ""; }; + 5BFDB59D042B1F4EBA021132 /* Pods_BuildaKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 626C1B28139A9F7ED2D2EB72 /* Pods-Buildasaur.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Buildasaur.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Buildasaur/Pods-Buildasaur.debug.xcconfig"; sourceTree = ""; }; 785688001CDD4843009EEB72 /* WorkspaceMetadataTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WorkspaceMetadataTests.swift; sourceTree = ""; }; 8176576B54DB918274B10F51 /* Pods-Buildasaur.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Buildasaur.testing.xcconfig"; path = "Pods/Target Support Files/Pods-Buildasaur/Pods-Buildasaur.testing.xcconfig"; sourceTree = ""; }; - 8FA09FE729BC440366D74E2E /* Pods_Buildasaur.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Buildasaur.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 906BE3BD7A02D5A19E6E5269 /* Pods-Buildasaur.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Buildasaur.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Buildasaur/Pods-Buildasaur.debug.xcconfig"; sourceTree = ""; }; - A1308D46FA858C964191A82B /* Pods-BuildaGitServer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServer.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServer/Pods-BuildaGitServer.release.xcconfig"; sourceTree = ""; }; - A4E55389A75FA900E8317C54 /* Pods-BuildaGitServerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServerTests/Pods-BuildaGitServerTests.release.xcconfig"; sourceTree = ""; }; - A588086CCA23190FC2B378E5 /* Pods-Buildasaur.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Buildasaur.release.xcconfig"; path = "Pods/Target Support Files/Pods-Buildasaur/Pods-Buildasaur.release.xcconfig"; sourceTree = ""; }; - B21869E8D6C35C4DE0A4936A /* Pods-BuildaKit.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKit.testing.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKit/Pods-BuildaKit.testing.xcconfig"; sourceTree = ""; }; + 8476D4051C8F4CD000463074 /* EnterpriseGitHubSourceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnterpriseGitHubSourceTests.swift; sourceTree = ""; }; + 8B29124289142782829E7634 /* Pods-BuildaKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKit/Pods-BuildaKit.debug.xcconfig"; sourceTree = ""; }; + 9A8D94F1D70D30788206EC2D /* Pods_BuildaGitServerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaGitServerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B105F15DC0D8FB6C61EB1C33 /* Pods_Buildasaur.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Buildasaur.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B434ACFEEBD14A1E176F9889 /* Pods-BuildaKitTests.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKitTests.testing.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKitTests/Pods-BuildaKitTests.testing.xcconfig"; sourceTree = ""; }; B9139F7877761955F17C535E /* Pods_BuildaGitServer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaGitServer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D0F6A06E560D8D41488E34CB /* Pods-BuildaKitTests.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKitTests.testing.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKitTests/Pods-BuildaKitTests.testing.xcconfig"; sourceTree = ""; }; - DBBDB133AF2AD2E2CA9AEB13 /* Pods-BuildaKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKitTests/Pods-BuildaKitTests.debug.xcconfig"; sourceTree = ""; }; - DC5ECE2BBCC7B037A35A3BE9 /* Pods-BuildaHeartbeatKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaHeartbeatKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaHeartbeatKit/Pods-BuildaHeartbeatKit.debug.xcconfig"; sourceTree = ""; }; - E44B7C2CE3D5BFAC8FF7EBDD /* Pods-BuildaKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKit/Pods-BuildaKit.debug.xcconfig"; sourceTree = ""; }; + D127C1A6AC9BC2A276D87C9B /* Pods_BuildaHeartbeatKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaHeartbeatKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DE66755DF1B1957837DE13B4 /* Pods-BuildaKit.testing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKit.testing.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKit/Pods-BuildaKit.testing.xcconfig"; sourceTree = ""; }; + EA372FE934D1F73BADA8E5FC /* Pods-BuildaGitServer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServer.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServer/Pods-BuildaGitServer.release.xcconfig"; sourceTree = ""; }; F105E28B52A2616166887266 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F29FCDBD0B3B9740956E5206 /* Pods_BuildaGitServerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BuildaGitServerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F36E0D1DA1D28291A8A94FEB /* Pods-BuildaKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaKitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaKitTests/Pods-BuildaKitTests.release.xcconfig"; sourceTree = ""; }; + F5D5709F9FC4F63C8170A0EE /* Pods-BuildaHeartbeatKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaHeartbeatKit.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaHeartbeatKit/Pods-BuildaHeartbeatKit.debug.xcconfig"; sourceTree = ""; }; + F722889B83953693C2CCC2EA /* Pods-BuildaGitServer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServer.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServer/Pods-BuildaGitServer.debug.xcconfig"; sourceTree = ""; }; FBFCE164C6B59B0C7DC8FBEE /* Pods-BuildaGitServerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BuildaGitServerTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BuildaGitServerTests/Pods-BuildaGitServerTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -409,7 +412,7 @@ 3A81BB2B1B5A77E9004732CD /* BuildaKit.framework in Frameworks */, 3A756DC41BAB425E00508B69 /* BuildaHeartbeatKit.framework in Frameworks */, 3AAF6EFB1A3CE5BA00C657FB /* BuildaGitServer.framework in Frameworks */, - 0928E6AF8EED8E829B0F4286 /* Pods_Buildasaur.framework in Frameworks */, + 8B22517BB7E47C997C8D7EDE /* Pods_Buildasaur.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -417,7 +420,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 130C2BB548050F030930B54F /* Pods_BuildaHeartbeatKit.framework in Frameworks */, + 6427B0D35F605AB6A280DD94 /* Pods_BuildaHeartbeatKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -427,7 +430,8 @@ files = ( 3A756DCC1BAB44A200508B69 /* BuildaHeartbeatKit.framework in Frameworks */, 3A81BB351B5A7898004732CD /* BuildaGitServer.framework in Frameworks */, - E9F513792E8C95C43A68D1CD /* Pods_BuildaKit.framework in Frameworks */, + E9F513792E8C95C43A68D1CD /* (null) in Frameworks */, + 81EFD68FDD3B64B18D787351 /* Pods_BuildaKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -453,7 +457,7 @@ buildActionMask = 2147483647; files = ( 3AAF6EEF1A3CE5BA00C657FB /* BuildaGitServer.framework in Frameworks */, - 158554341171FBBD63B039E2 /* Pods_BuildaGitServerTests.framework in Frameworks */, + 90E0B3BC47E1D9EEC556FA03 /* Pods_BuildaGitServerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -719,6 +723,7 @@ 3A7577A91C593A6A0023F08C /* Data */, 3A7AF60F1C591FAD000FD726 /* BitBucketServerTests.swift */, 3A58B1581A3B96C9003E0266 /* GitHubServerTests.swift */, + 8476D4051C8F4CD000463074 /* EnterpriseGitHubSourceTests.swift */, 3AAF6EF51A3CE5BA00C657FB /* Supporting Files */, ); path = BuildaGitServerTests; @@ -895,24 +900,24 @@ 4014768B3F6B8B7FEEFE1654 /* Pods */ = { isa = PBXGroup; children = ( - 4A4FCE02D4B5A180AAF85C12 /* Pods-BuildaGitServer.debug.xcconfig */, 44E8AF72E61B7A15D6E70352 /* Pods-BuildaGitServer.testing.xcconfig */, - A1308D46FA858C964191A82B /* Pods-BuildaGitServer.release.xcconfig */, FBFCE164C6B59B0C7DC8FBEE /* Pods-BuildaGitServerTests.debug.xcconfig */, 38739D0E658C834537584B63 /* Pods-BuildaGitServerTests.testing.xcconfig */, - A4E55389A75FA900E8317C54 /* Pods-BuildaGitServerTests.release.xcconfig */, - DC5ECE2BBCC7B037A35A3BE9 /* Pods-BuildaHeartbeatKit.debug.xcconfig */, 2D7FAD09E7CF5F0D5E6CC526 /* Pods-BuildaHeartbeatKit.testing.xcconfig */, - 6A0C42D6343BC2A4C4C899AB /* Pods-BuildaHeartbeatKit.release.xcconfig */, - E44B7C2CE3D5BFAC8FF7EBDD /* Pods-BuildaKit.debug.xcconfig */, - B21869E8D6C35C4DE0A4936A /* Pods-BuildaKit.testing.xcconfig */, 105246397B31495A090CD1D1 /* Pods-BuildaKit.release.xcconfig */, - DBBDB133AF2AD2E2CA9AEB13 /* Pods-BuildaKitTests.debug.xcconfig */, - D0F6A06E560D8D41488E34CB /* Pods-BuildaKitTests.testing.xcconfig */, - 3D172B5BBA1416D1EE92A8A5 /* Pods-BuildaKitTests.release.xcconfig */, - 906BE3BD7A02D5A19E6E5269 /* Pods-Buildasaur.debug.xcconfig */, 8176576B54DB918274B10F51 /* Pods-Buildasaur.testing.xcconfig */, - A588086CCA23190FC2B378E5 /* Pods-Buildasaur.release.xcconfig */, + F722889B83953693C2CCC2EA /* Pods-BuildaGitServer.debug.xcconfig */, + EA372FE934D1F73BADA8E5FC /* Pods-BuildaGitServer.release.xcconfig */, + 3C9B7B3EE7C9258EA7A0C574 /* Pods-BuildaGitServerTests.release.xcconfig */, + F5D5709F9FC4F63C8170A0EE /* Pods-BuildaHeartbeatKit.debug.xcconfig */, + 4715CCD872F3565B0D290B3B /* Pods-BuildaHeartbeatKit.release.xcconfig */, + 8B29124289142782829E7634 /* Pods-BuildaKit.debug.xcconfig */, + DE66755DF1B1957837DE13B4 /* Pods-BuildaKit.testing.xcconfig */, + 17265C17307D20F4C67DBAD5 /* Pods-BuildaKitTests.debug.xcconfig */, + B434ACFEEBD14A1E176F9889 /* Pods-BuildaKitTests.testing.xcconfig */, + F36E0D1DA1D28291A8A94FEB /* Pods-BuildaKitTests.release.xcconfig */, + 626C1B28139A9F7ED2D2EB72 /* Pods-Buildasaur.debug.xcconfig */, + 54CC296C4C15EE5B4CB1A940 /* Pods-Buildasaur.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -922,11 +927,11 @@ children = ( F105E28B52A2616166887266 /* Pods.framework */, B9139F7877761955F17C535E /* Pods_BuildaGitServer.framework */, - F29FCDBD0B3B9740956E5206 /* Pods_BuildaGitServerTests.framework */, - 41155620B4193BDB27CD7E83 /* Pods_BuildaHeartbeatKit.framework */, - 7827BDC6B1752C193A0EAA05 /* Pods_BuildaKit.framework */, 4EC43508E8A4F9D6E5ED0126 /* Pods_BuildaKitTests.framework */, - 8FA09FE729BC440366D74E2E /* Pods_Buildasaur.framework */, + 9A8D94F1D70D30788206EC2D /* Pods_BuildaGitServerTests.framework */, + D127C1A6AC9BC2A276D87C9B /* Pods_BuildaHeartbeatKit.framework */, + 5BFDB59D042B1F4EBA021132 /* Pods_BuildaKit.framework */, + B105F15DC0D8FB6C61EB1C33 /* Pods_Buildasaur.framework */, ); name = Frameworks; sourceTree = ""; @@ -1610,6 +1615,7 @@ buildActionMask = 2147483647; files = ( 3A7AF6101C591FAD000FD726 /* BitBucketServerTests.swift in Sources */, + 8476D4061C8F4CD000463074 /* EnterpriseGitHubSourceTests.swift in Sources */, 3AAF6F0B1A3CE82B00C657FB /* GitHubServerTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1747,7 +1753,7 @@ }; 3A56878D1A3B93BD0066DB2B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 906BE3BD7A02D5A19E6E5269 /* Pods-Buildasaur.debug.xcconfig */; + baseConfigurationReference = 626C1B28139A9F7ED2D2EB72 /* Pods-Buildasaur.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; @@ -1762,7 +1768,7 @@ }; 3A56878E1A3B93BD0066DB2B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A588086CCA23190FC2B378E5 /* Pods-Buildasaur.release.xcconfig */; + baseConfigurationReference = 54CC296C4C15EE5B4CB1A940 /* Pods-Buildasaur.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "Developer ID Application: Jan Dvorsky (7BJ2984YDK)"; @@ -1779,7 +1785,7 @@ }; 3A756DC61BAB425E00508B69 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DC5ECE2BBCC7B037A35A3BE9 /* Pods-BuildaHeartbeatKit.debug.xcconfig */; + baseConfigurationReference = F5D5709F9FC4F63C8170A0EE /* Pods-BuildaHeartbeatKit.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; @@ -1834,7 +1840,7 @@ }; 3A756DC81BAB425E00508B69 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6A0C42D6343BC2A4C4C899AB /* Pods-BuildaHeartbeatKit.release.xcconfig */; + baseConfigurationReference = 4715CCD872F3565B0D290B3B /* Pods-BuildaHeartbeatKit.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; @@ -1976,7 +1982,7 @@ }; 3A81BB2D1B5A77E9004732CD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E44B7C2CE3D5BFAC8FF7EBDD /* Pods-BuildaKit.debug.xcconfig */; + baseConfigurationReference = 8B29124289142782829E7634 /* Pods-BuildaKit.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2002,7 +2008,7 @@ }; 3A81BB2E1B5A77E9004732CD /* Testing */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B21869E8D6C35C4DE0A4936A /* Pods-BuildaKit.testing.xcconfig */; + baseConfigurationReference = DE66755DF1B1957837DE13B4 /* Pods-BuildaKit.testing.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2059,7 +2065,7 @@ }; 3A81BB301B5A77E9004732CD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DBBDB133AF2AD2E2CA9AEB13 /* Pods-BuildaKitTests.debug.xcconfig */; + baseConfigurationReference = 17265C17307D20F4C67DBAD5 /* Pods-BuildaKitTests.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2075,7 +2081,7 @@ }; 3A81BB311B5A77E9004732CD /* Testing */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0F6A06E560D8D41488E34CB /* Pods-BuildaKitTests.testing.xcconfig */; + baseConfigurationReference = B434ACFEEBD14A1E176F9889 /* Pods-BuildaKitTests.testing.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2094,7 +2100,7 @@ }; 3A81BB321B5A77E9004732CD /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3D172B5BBA1416D1EE92A8A5 /* Pods-BuildaKitTests.release.xcconfig */; + baseConfigurationReference = F36E0D1DA1D28291A8A94FEB /* Pods-BuildaKitTests.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; @@ -2112,7 +2118,7 @@ }; 3AAF6EFE1A3CE5BA00C657FB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4A4FCE02D4B5A180AAF85C12 /* Pods-BuildaGitServer.debug.xcconfig */; + baseConfigurationReference = F722889B83953693C2CCC2EA /* Pods-BuildaGitServer.debug.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; @@ -2140,7 +2146,7 @@ }; 3AAF6EFF1A3CE5BA00C657FB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A1308D46FA858C964191A82B /* Pods-BuildaGitServer.release.xcconfig */; + baseConfigurationReference = EA372FE934D1F73BADA8E5FC /* Pods-BuildaGitServer.release.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; @@ -2186,7 +2192,7 @@ }; 3AAF6F021A3CE5BA00C657FB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A4E55389A75FA900E8317C54 /* Pods-BuildaGitServerTests.release.xcconfig */; + baseConfigurationReference = 3C9B7B3EE7C9258EA7A0C574 /* Pods-BuildaGitServerTests.release.xcconfig */; buildSettings = { COMBINE_HIDPI_IMAGES = YES; ENABLE_NS_ASSERTIONS = YES; diff --git a/Buildasaur/Base.lproj/Main.storyboard b/Buildasaur/Base.lproj/Main.storyboard index fd90fcf..81777fb 100644 --- a/Buildasaur/Base.lproj/Main.storyboard +++ b/Buildasaur/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + diff --git a/Buildasaur/ProjectViewController.swift b/Buildasaur/ProjectViewController.swift index 22f069a..b4bb241 100644 --- a/Buildasaur/ProjectViewController.swift +++ b/Buildasaur/ProjectViewController.swift @@ -115,13 +115,13 @@ class ProjectViewController: ConfigEditViewController { .startWithNext { [weak self] (proj, auth, forceUseToken) in self?.updateServiceMeta(proj, auth: auth, userWantsTokenAuth: forceUseToken) } - combineLatest(self.tokenTextField.rac_text, self.userWantsTokenAuth.producer) - .startWithNext { [weak self] token, forceToken in + combineLatest(self.tokenTextField.rac_text, self.userWantsTokenAuth.producer, meta) + .startWithNext { [weak self] token, forceToken, meta in if forceToken { if token.isEmpty { self?.authenticator.value = nil } else { - self?.authenticator.value = ProjectAuthenticator(service: .GitHub, username: "GIT", type: .PersonalToken, secret: token) + self?.authenticator.value = ProjectAuthenticator(service: meta.service, username: "GIT", type: .PersonalToken, secret: token) } } } @@ -166,6 +166,8 @@ class ProjectViewController: ConfigEditViewController { let alreadyHasAuth = auth != nil + var showTokenField = false + switch service { case .GitHub: if let auth = auth where auth.type == .PersonalToken && !auth.secret.isEmpty { @@ -174,14 +176,23 @@ class ProjectViewController: ConfigEditViewController { self.tokenTextField.stringValue = "" } self.useTokenButton.hidden = alreadyHasAuth + self.loginButton.hidden = alreadyHasAuth + self.logoutButton.hidden = !alreadyHasAuth + showTokenField = userWantsTokenAuth && (auth?.type == .PersonalToken || auth == nil) + case .EnterpriseGitHub: + if !alreadyHasAuth { + self.tokenTextField.stringValue = "" + } + self.useTokenButton.hidden = alreadyHasAuth + self.loginButton.hidden = true + self.logoutButton.hidden = true + showTokenField = true case .BitBucket: self.useTokenButton.hidden = true + self.loginButton.hidden = alreadyHasAuth + self.logoutButton.hidden = !alreadyHasAuth } - self.loginButton.hidden = alreadyHasAuth - self.logoutButton.hidden = !alreadyHasAuth - - let showTokenField = userWantsTokenAuth && service == .GitHub && (auth?.type == .PersonalToken || auth == nil) self.tokenStackView.hidden = !showTokenField } diff --git a/Buildasaur/ServiceAuthentication.swift b/Buildasaur/ServiceAuthentication.swift index 08b2ab1..93cbb04 100644 --- a/Buildasaur/ServiceAuthentication.swift +++ b/Buildasaur/ServiceAuthentication.swift @@ -66,6 +66,8 @@ class ServiceAuthenticator { switch service { case .GitHub: return self.getGitHubParameters() + case .EnterpriseGitHub: + assert(false) case .BitBucket: return self.getBitBucketParameters() // default: