diff --git a/BuildaGitServer/BitBucket/BitBucketComment.swift b/BuildaGitServer/BitBucket/BitBucketComment.swift index 88f0e1c..ca04070 100644 --- a/BuildaGitServer/BitBucket/BitBucketComment.swift +++ b/BuildaGitServer/BitBucket/BitBucketComment.swift @@ -12,14 +12,16 @@ class BitBucketComment: BitBucketEntity, CommentType { let body: String - required init(json: NSDictionary) { + required init(json: NSDictionary) throws { - self.body = json + if let body = try json .optionalDictionaryForKey("content")? - .stringForKey("raw") ?? json.stringForKey("content") + .stringForKey("raw") { + self.body = body + } else { + self.body = try json.stringForKey("content") + } - super.init(json: json) + try super.init(json: json) } - - } diff --git a/BuildaGitServer/BitBucket/BitBucketEntity.swift b/BuildaGitServer/BitBucket/BitBucketEntity.swift index e4ac8b1..4c2b95a 100644 --- a/BuildaGitServer/BitBucket/BitBucketEntity.swift +++ b/BuildaGitServer/BitBucket/BitBucketEntity.swift @@ -9,12 +9,12 @@ import Foundation protocol BitBucketType { - init(json: NSDictionary) + init(json: NSDictionary) throws } class BitBucketEntity : BitBucketType { - required init(json: NSDictionary) { + required init(json: NSDictionary) throws { //add any common keys to be parsed here } @@ -29,9 +29,9 @@ class BitBucketEntity : BitBucketType { return NSDictionary() } - class func optional(json: NSDictionary?) -> T? { + class func optional(json: NSDictionary?) throws -> T? { if let json = json { - return T(json: json) + return try T(json: json) } return nil } @@ -39,11 +39,11 @@ class BitBucketEntity : BitBucketType { } //parse an array of dictionaries into an array of parsed entities -func BitBucketArray(jsonArray: [NSDictionary]) -> [T] { +func BitBucketArray(jsonArray: [NSDictionary]) throws -> [T] { - let parsed = jsonArray.map { + let parsed = try jsonArray.map { (json: NSDictionary) -> (T) in - return T(json: json) + return try T(json: json) } return parsed } diff --git a/BuildaGitServer/BitBucket/BitBucketIssue.swift b/BuildaGitServer/BitBucket/BitBucketIssue.swift index 5f0cf80..2abee53 100644 --- a/BuildaGitServer/BitBucket/BitBucketIssue.swift +++ b/BuildaGitServer/BitBucket/BitBucketIssue.swift @@ -12,10 +12,10 @@ class BitBucketIssue: BitBucketEntity, IssueType { let number: Int - required init(json: NSDictionary) { + required init(json: NSDictionary) throws { - self.number = json.intForKey("id") + self.number = try json.intForKey("id") - super.init(json: json) + try super.init(json: json) } } \ No newline at end of file diff --git a/BuildaGitServer/BitBucket/BitBucketPullRequest.swift b/BuildaGitServer/BitBucket/BitBucketPullRequest.swift index 40ddcf2..d80a192 100644 --- a/BuildaGitServer/BitBucket/BitBucketPullRequest.swift +++ b/BuildaGitServer/BitBucket/BitBucketPullRequest.swift @@ -14,14 +14,14 @@ class BitBucketPullRequest: BitBucketIssue, PullRequestType { let source: BitBucketPullRequestBranch let destination: BitBucketPullRequestBranch - required init(json: NSDictionary) { + required init(json: NSDictionary) throws { - self.title = json.stringForKey("title") + self.title = try json.stringForKey("title") - self.source = BitBucketPullRequestBranch(json: json.dictionaryForKey("source")) - self.destination = BitBucketPullRequestBranch(json: json.dictionaryForKey("destination")) + self.source = try BitBucketPullRequestBranch(json: try json.dictionaryForKey("source")) + self.destination = try BitBucketPullRequestBranch(json: try json.dictionaryForKey("destination")) - super.init(json: json) + try super.init(json: json) } var headName: String { diff --git a/BuildaGitServer/BitBucket/BitBucketPullRequestBranch.swift b/BuildaGitServer/BitBucket/BitBucketPullRequestBranch.swift index e559969..3f588bd 100644 --- a/BuildaGitServer/BitBucket/BitBucketPullRequestBranch.swift +++ b/BuildaGitServer/BitBucket/BitBucketPullRequestBranch.swift @@ -14,12 +14,12 @@ class BitBucketPullRequestBranch : BitBucketEntity { let commit: String let repo: BitBucketRepo - required init(json: NSDictionary) { + required init(json: NSDictionary) throws { - self.branch = json.dictionaryForKey("branch").stringForKey("name") - self.commit = json.dictionaryForKey("commit").stringForKey("hash") - self.repo = BitBucketRepo(json: json.dictionaryForKey("repository")) + self.branch = try json.dictionaryForKey("branch").stringForKey("name") + self.commit = try json.dictionaryForKey("commit").stringForKey("hash") + self.repo = try BitBucketRepo(json: try json.dictionaryForKey("repository")) - super.init(json: json) + try super.init(json: json) } } \ No newline at end of file diff --git a/BuildaGitServer/BitBucket/BitBucketRepo.swift b/BuildaGitServer/BitBucket/BitBucketRepo.swift index f02352a..d3e317a 100644 --- a/BuildaGitServer/BitBucket/BitBucketRepo.swift +++ b/BuildaGitServer/BitBucket/BitBucketRepo.swift @@ -15,11 +15,11 @@ class BitBucketRepo: BitBucketEntity, RepoType { let latestRateLimitInfo: RateLimitType? = BitBucketRateLimit() let originUrlSSH: String - required init(json: NSDictionary) { + required init(json: NSDictionary) throws { //split with forward slash, the last two comps are the repo //create a proper ssh url for bitbucket here - let repoName = json + let repoName = try json .dictionaryForKey("links") .dictionaryForKey("self") .stringForKey("href") @@ -28,6 +28,6 @@ class BitBucketRepo: BitBucketEntity, RepoType { .joinWithSeparator("/") self.originUrlSSH = "git@bitbucket.org:\(repoName).git" - super.init(json: json) + try super.init(json: json) } } diff --git a/BuildaGitServer/BitBucket/BitBucketServer.swift b/BuildaGitServer/BitBucket/BitBucketServer.swift index 2674724..5ca9eee 100644 --- a/BuildaGitServer/BitBucket/BitBucketServer.swift +++ b/BuildaGitServer/BitBucket/BitBucketServer.swift @@ -58,8 +58,10 @@ extension BitBucketServer: SourceServerType { } if let body = body as? [NSDictionary] { - let prs: [BitBucketPullRequest] = BitBucketArray(body) - completion(prs: prs.map { $0 as PullRequestType }, error: nil) + let (result, error): ([BitBucketPullRequest]?, NSError?) = unthrow { + return try BitBucketArray(body) + } + completion(prs: result?.map { $0 as PullRequestType }, error: error) } else { completion(prs: nil, error: Error.withInfo("Wrong body \(body)")) } @@ -81,8 +83,10 @@ extension BitBucketServer: SourceServerType { } if let body = body as? NSDictionary { - let pr = BitBucketPullRequest(json: body) - completion(pr: pr, error: nil) + let (result, error): (BitBucketPullRequest?, NSError?) = unthrow { + return try BitBucketPullRequest(json: body) + } + completion(pr: result, error: error) } else { completion(pr: nil, error: Error.withInfo("Wrong body \(body)")) } @@ -104,8 +108,10 @@ extension BitBucketServer: SourceServerType { } if let body = body as? NSDictionary { - let repository = BitBucketRepo(json: body) - completion(repo: repository, error: nil) + let (result, error): (BitBucketRepo?, NSError?) = unthrow { + return try BitBucketRepo(json: body) + } + completion(repo: result, error: error) } else { completion(repo: nil, error: Error.withInfo("Wrong body \(body)")) } @@ -134,8 +140,10 @@ extension BitBucketServer: SourceServerType { } if let body = body as? NSDictionary { - let status = BitBucketStatus(json: body) - completion(status: status, error: nil) + let (result, error): (BitBucketStatus?, NSError?) = unthrow { + return try BitBucketStatus(json: body) + } + completion(status: result, error: error) } else { completion(status: nil, error: Error.withInfo("Wrong body \(body)")) } @@ -158,8 +166,10 @@ extension BitBucketServer: SourceServerType { } if let body = body as? NSDictionary { - let status = BitBucketStatus(json: body) - completion(status: status, error: nil) + let (result, error): (BitBucketStatus?, NSError?) = unthrow { + return try BitBucketStatus(json: body) + } + completion(status: result, error: error) } else { completion(status: nil, error: Error.withInfo("Wrong body \(body)")) } @@ -185,8 +195,10 @@ extension BitBucketServer: SourceServerType { } if let body = body as? NSDictionary { - let comment = BitBucketComment(json: body) - completion(comment: comment, error: nil) + let (result, error): (BitBucketComment?, NSError?) = unthrow { + return try BitBucketComment(json: body) + } + completion(comment: result, error: error) } else { completion(comment: nil, error: Error.withInfo("Wrong body \(body)")) } @@ -208,8 +220,10 @@ extension BitBucketServer: SourceServerType { } if let body = body as? [NSDictionary] { - let comments: [BitBucketComment] = BitBucketArray(body) - completion(comments: comments.map { $0 as CommentType }, error: nil) + let (result, error): ([BitBucketComment]?, NSError?) = unthrow { + return try BitBucketArray(body) + } + completion(comments: result?.map { $0 as CommentType }, error: error) } else { completion(comments: nil, error: Error.withInfo("Wrong body \(body)")) } @@ -296,14 +310,18 @@ extension BitBucketServer { return } - let payload = body as! NSDictionary - let accessToken = payload.stringForKey("access_token") - let refreshToken = payload.stringForKey("refresh_token") - let secret = [refreshToken, accessToken].joinWithSeparator(":") - - let newAuth = ProjectAuthenticator(service: .BitBucket, username: "GIT", type: .OAuthToken, secret: secret) - self.endpoints.auth.value = newAuth - completion(nil) + do { + let payload = body as! NSDictionary + let accessToken = try payload.stringForKey("access_token") + let refreshToken = try payload.stringForKey("refresh_token") + let secret = [refreshToken, accessToken].joinWithSeparator(":") + + let newAuth = ProjectAuthenticator(service: .BitBucket, username: "GIT", type: .OAuthToken, secret: secret) + self.endpoints.auth.value = newAuth + completion(nil) + } catch { + completion(error as NSError) + } } } diff --git a/BuildaGitServer/BitBucket/BitBucketStatus.swift b/BuildaGitServer/BitBucket/BitBucketStatus.swift index 9807080..2496176 100644 --- a/BuildaGitServer/BitBucket/BitBucketStatus.swift +++ b/BuildaGitServer/BitBucket/BitBucketStatus.swift @@ -22,15 +22,15 @@ class BitBucketStatus: BitBucketEntity, StatusType { let description: String? let targetUrl: String? - required init(json: NSDictionary) { + required init(json: NSDictionary) throws { - self.bbState = BitBucketState(rawValue: json.stringForKey("state"))! - self.key = json.stringForKey("key") + self.bbState = BitBucketState(rawValue: try json.stringForKey("state"))! + self.key = try json.stringForKey("key") self.name = json.optionalStringForKey("name") self.description = json.optionalStringForKey("description") - self.targetUrl = json.stringForKey("url") + self.targetUrl = try json.stringForKey("url") - super.init(json: json) + try super.init(json: json) } init(state: BitBucketState, key: String, name: String?, description: String?, url: String) { diff --git a/BuildaGitServer/GitHub/GitHubBranch.swift b/BuildaGitServer/GitHub/GitHubBranch.swift index 635ed06..99b174e 100644 --- a/BuildaGitServer/GitHub/GitHubBranch.swift +++ b/BuildaGitServer/GitHub/GitHubBranch.swift @@ -15,7 +15,7 @@ class GitHubBranch : GitHubEntity { required init(json: NSDictionary) throws { - self.name = json.stringForKey("name") + self.name = try json.stringForKey("name") self.commit = try GitHubCommit(json: json.dictionaryForKey("commit")) try super.init(json: json) } diff --git a/BuildaGitServer/GitHub/GitHubComment.swift b/BuildaGitServer/GitHub/GitHubComment.swift index c190f70..e5ed449 100644 --- a/BuildaGitServer/GitHub/GitHubComment.swift +++ b/BuildaGitServer/GitHub/GitHubComment.swift @@ -15,7 +15,7 @@ class GitHubComment : GitHubEntity { required init(json: NSDictionary) throws { - self.body = json.stringForKey("body") + self.body = try json.stringForKey("body") self.author = try GitHubUser(json: json.dictionaryForKey("user")) try super.init(json: json) diff --git a/BuildaGitServer/GitHub/GitHubCommit.swift b/BuildaGitServer/GitHub/GitHubCommit.swift index e60c553..a8c9ab3 100644 --- a/BuildaGitServer/GitHub/GitHubCommit.swift +++ b/BuildaGitServer/GitHub/GitHubCommit.swift @@ -15,7 +15,7 @@ class GitHubCommit : GitHubEntity { required init(json: NSDictionary) throws { - self.sha = json.stringForKey("sha") + self.sha = try json.stringForKey("sha") try super.init(json: json) } diff --git a/BuildaGitServer/GitHub/GitHubIssue.swift b/BuildaGitServer/GitHub/GitHubIssue.swift index 49897dd..0074db6 100644 --- a/BuildaGitServer/GitHub/GitHubIssue.swift +++ b/BuildaGitServer/GitHub/GitHubIssue.swift @@ -16,9 +16,9 @@ class GitHubIssue : GitHubEntity { required init(json: NSDictionary) throws { - self.number = json.intForKey("number") - self.body = json.stringForKey("body") - self.title = json.stringForKey("title") + self.number = try json.intForKey("number") + self.body = try json.stringForKey("body") + self.title = try json.stringForKey("title") try super.init(json: json) } diff --git a/BuildaGitServer/GitHub/GitHubPullRequestBranch.swift b/BuildaGitServer/GitHub/GitHubPullRequestBranch.swift index 7c10a97..4ace8a5 100644 --- a/BuildaGitServer/GitHub/GitHubPullRequestBranch.swift +++ b/BuildaGitServer/GitHub/GitHubPullRequestBranch.swift @@ -19,8 +19,8 @@ class GitHubPullRequestBranch : GitHubEntity { required init(json: NSDictionary) throws { - self.ref = json.stringForKey("ref") - self.sha = json.stringForKey("sha") + self.ref = try json.stringForKey("ref") + self.sha = try json.stringForKey("sha") guard let repo = json.optionalDictionaryForKey("repo") else { throw Error.withInfo("PR missing information about its repository") } diff --git a/BuildaGitServer/GitHub/GitHubRepo.swift b/BuildaGitServer/GitHub/GitHubRepo.swift index ef9de60..fb0ab19 100644 --- a/BuildaGitServer/GitHub/GitHubRepo.swift +++ b/BuildaGitServer/GitHub/GitHubRepo.swift @@ -20,10 +20,10 @@ class GitHubRepo : GitHubEntity { required init(json: NSDictionary) throws { - self.name = json.stringForKey("name") - self.fullName = json.stringForKey("full_name") - self.repoUrlHTTPS = json.stringForKey("clone_url") - self.repoUrlSSH = json.stringForKey("ssh_url") + self.name = try json.stringForKey("name") + self.fullName = try json.stringForKey("full_name") + self.repoUrlHTTPS = try json.stringForKey("clone_url") + self.repoUrlSSH = try json.stringForKey("ssh_url") if let permissions = json.optionalDictionaryForKey("permissions") { self.permissionsDict = permissions diff --git a/BuildaGitServer/GitHub/GitHubStatus.swift b/BuildaGitServer/GitHub/GitHubStatus.swift index 0f2e239..46be7a4 100644 --- a/BuildaGitServer/GitHub/GitHubStatus.swift +++ b/BuildaGitServer/GitHub/GitHubStatus.swift @@ -58,7 +58,7 @@ class GitHubStatus : GitHubEntity { required init(json: NSDictionary) throws { - self.githubState = GitHubState(rawValue: json.stringForKey("state"))! + self.githubState = GitHubState(rawValue: try json.stringForKey("state"))! self.description = json.optionalStringForKey("description") self.targetUrl = json.optionalStringForKey("target_url") self.context = json.optionalStringForKey("context") diff --git a/BuildaGitServer/GitHub/GitHubUser.swift b/BuildaGitServer/GitHub/GitHubUser.swift index b87321e..f1060bb 100644 --- a/BuildaGitServer/GitHub/GitHubUser.swift +++ b/BuildaGitServer/GitHub/GitHubUser.swift @@ -16,9 +16,9 @@ class GitHubUser : GitHubEntity { required init(json: NSDictionary) throws { - self.userName = json.stringForKey("login") + self.userName = try json.stringForKey("login") self.realName = json.optionalStringForKey("name") - self.avatarUrl = json.stringForKey("avatar_url") + self.avatarUrl = try json.stringForKey("avatar_url") try super.init(json: json) } diff --git a/BuildaKit/BuildTemplate.swift b/BuildaKit/BuildTemplate.swift index 16b1f86..a8c65a0 100644 --- a/BuildaKit/BuildTemplate.swift +++ b/BuildaKit/BuildTemplate.swift @@ -68,10 +68,10 @@ public struct BuildTemplate: JSONSerializable { self.id = json.optionalStringForKey(kKeyId) ?? Ref.new() self.projectName = json.optionalStringForKey(kKeyProjectName) - self.name = json.stringForKey(kKeyName) - self.scheme = json.stringForKey(kKeyScheme) + self.name = try json.stringForKey(kKeyName) + self.scheme = try json.stringForKey(kKeyScheme) if let scheduleDict = json.optionalDictionaryForKey(kKeySchedule) { - self.schedule = BotSchedule(json: scheduleDict) + self.schedule = try BotSchedule(json: scheduleDict) } else { self.schedule = BotSchedule.manualBotSchedule() } @@ -88,9 +88,9 @@ public struct BuildTemplate: JSONSerializable { self.triggers = [] } - self.shouldAnalyze = json.boolForKey(kKeyShouldAnalyze) - self.shouldTest = json.boolForKey(kKeyShouldTest) - self.shouldArchive = json.boolForKey(kKeyShouldArchive) + self.shouldAnalyze = try json.boolForKey(kKeyShouldAnalyze) + self.shouldTest = try json.boolForKey(kKeyShouldTest) + self.shouldArchive = try json.boolForKey(kKeyShouldArchive) self.testingDeviceIds = json.optionalArrayForKey(kKeyTestingDevices) as? [String] ?? [] diff --git a/BuildaKit/PersistenceMigrator.swift b/BuildaKit/PersistenceMigrator.swift index 4f31ae1..f33cc12 100644 --- a/BuildaKit/PersistenceMigrator.swift +++ b/BuildaKit/PersistenceMigrator.swift @@ -175,17 +175,17 @@ class Migrator_v1_v2: MigratorType { triggers.appendContentsOf(trigWithIds) //now gather those ids - let triggerIds = trigWithIds.map { $0.stringForKey("id") } + let triggerIds = try! trigWithIds.map { try $0.stringForKey("id") } //and replace the "triggers" array in the build template with these ids template["triggers"] = triggerIds } //now save all triggers into their own folder - self.persistence.saveArrayIntoFolder("Triggers", items: triggers, itemFileName: { $0.stringForKey("id") }, serialize: { $0 }) + self.persistence.saveArrayIntoFolder("Triggers", items: triggers, itemFileName: { try! $0.stringForKey("id") }, serialize: { $0 }) //and save the build templates - self.persistence.saveArrayIntoFolder("BuildTemplates", items: mutableTemplates, itemFileName: { $0.stringForKey("id") }, serialize: { $0 }) + self.persistence.saveArrayIntoFolder("BuildTemplates", items: mutableTemplates, itemFileName: { try! $0.stringForKey("id") }, serialize: { $0 }) } func migrateSyncers(server: RefType?, project: RefType?, template: RefType?) { @@ -225,9 +225,9 @@ class Migrator_v1_v2: MigratorType { //fix internal urls to be normal paths instead of the file:/// paths let withFixedUrls = withIds.map { project -> NSMutableDictionary in - project["url"] = self.fixPath(project.stringForKey("url")) - project["ssh_public_key_url"] = self.fixPath(project.stringForKey("ssh_public_key_url")) - project["ssh_private_key_url"] = self.fixPath(project.stringForKey("ssh_private_key_url")) + project["url"] = self.fixPath(try! project.stringForKey("url")) + project["ssh_public_key_url"] = self.fixPath(try! project.stringForKey("ssh_public_key_url")) + project["ssh_private_key_url"] = self.fixPath(try! project.stringForKey("ssh_private_key_url")) return project } @@ -332,8 +332,8 @@ class Migrator_v2_v3: MigratorType { let renamedAuth = mutableProjects.map { (d: NSMutableDictionary) -> NSDictionary in - let id = d.stringForKey("id") - let token = d.stringForKey("github_token") + let id = try! d.stringForKey("id") + let token = try! d.stringForKey("github_token") let auth = ProjectAuthenticator(service: .GitHub, username: "GIT", type: .PersonalToken, secret: token) let formattedToken = auth.toString() @@ -365,7 +365,7 @@ class Migrator_v2_v3: MigratorType { let withoutPasswords = mutableServers.map { (d: NSMutableDictionary) -> NSDictionary in - let password = d.stringForKey("password") + let password = try! d.stringForKey("password") let key = (try! XcodeServerConfig(json: d)).keychainKey() let keychain = SecurePersistence.xcodeServerPasswordKeychain() diff --git a/BuildaKit/WorkspaceMetadata.swift b/BuildaKit/WorkspaceMetadata.swift index 558f657..2f43c27 100644 --- a/BuildaKit/WorkspaceMetadata.swift +++ b/BuildaKit/WorkspaceMetadata.swift @@ -74,9 +74,9 @@ extension WorkspaceMetadata { var checkoutType: CheckoutType? var gitService: GitService? - if url.resourceSpecifier.containsString(GitService.GitHub.hostname()) { + if projectURLString.containsString(GitService.GitHub.hostname()) { gitService = .GitHub - } else if url.resourceSpecifier.containsString(GitService.BitBucket.hostname()) { + } else if projectURLString.containsString(GitService.BitBucket.hostname()) { gitService = .BitBucket } else { Log.error("This git service is not yet supported.") @@ -90,7 +90,8 @@ extension WorkspaceMetadata { } case "ssh": checkoutType = .SSH - + case GitService.GitHub.hostname(), GitService.BitBucket.hostname(): + checkoutType = .SSH default: Log.error("The \(url.scheme) scheme is not yet supported.") } diff --git a/BuildaKitTests/GitHubSummaryBuilderTests.swift b/BuildaKitTests/GitHubSummaryBuilderTests.swift index 5bce9a5..71f6af0 100644 --- a/BuildaKitTests/GitHubSummaryBuilderTests.swift +++ b/BuildaKitTests/GitHubSummaryBuilderTests.swift @@ -16,8 +16,8 @@ class GitHubSummaryBuilderTests: XCTestCase { //MARK: utils - func integration(result: Integration.Result, buildResultSummary: BuildResultSummary) -> Integration { - let integration = MockIntegration(number: 15, step: .Completed, result: result, buildResultSummary: buildResultSummary) + func integration(result: Integration.Result, buildResultSummary: BuildResultSummary) throws -> Integration { + let integration = try MockIntegration(number: 15, step: .Completed, result: result, buildResultSummary: buildResultSummary) return integration } @@ -29,10 +29,10 @@ class GitHubSummaryBuilderTests: XCTestCase { //MARK: tests - func testPassing_noTests_noCoverage_noLink() { + func testPassing_noTests_noCoverage_noLink() throws { - let buildResultSummary = MockBuildResultSummary() - let integration = self.integration(.Succeeded, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary() + let integration = try self.integration(.Succeeded, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildPassing(integration) @@ -46,10 +46,10 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.targetUrl).to(beNil()) } - func testPassing_noTests_noCoverage_withLink() { + func testPassing_noTests_noCoverage_withLink() throws { - let buildResultSummary = MockBuildResultSummary() - let integration = self.integration(.Succeeded, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary() + let integration = try self.integration(.Succeeded, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() summary.linkBuilder = self.linkBuilder() @@ -65,10 +65,10 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.targetUrl) == exp_link } - func testPassing_noTests_withCoverage() { + func testPassing_noTests_withCoverage() throws { - let buildResultSummary = MockBuildResultSummary(codeCoveragePercentage: 12) - let integration = self.integration(.Succeeded, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary(codeCoveragePercentage: 12) + let integration = try self.integration(.Succeeded, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildPassing(integration) @@ -81,11 +81,11 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.state) == exp_state } - func testPassing_withTests_withCoverage() { + func testPassing_withTests_withCoverage() throws { //got 99 tests but failing ain't one - let buildResultSummary = MockBuildResultSummary(testsCount: 99, codeCoveragePercentage: 12) - let integration = self.integration(.Succeeded, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary(testsCount: 99, codeCoveragePercentage: 12) + let integration = try self.integration(.Succeeded, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildPassing(integration) @@ -98,10 +98,10 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.state) == exp_state } - func testPassing_withTests_withWarnings() { + func testPassing_withTests_withWarnings() throws { - let buildResultSummary = MockBuildResultSummary(testsCount: 99, warningCount: 2, codeCoveragePercentage: 12) - let integration = self.integration(.Warnings, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary(testsCount: 99, warningCount: 2, codeCoveragePercentage: 12) + let integration = try self.integration(.Warnings, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildPassing(integration) @@ -114,10 +114,10 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.state) == exp_state } - func testPassing_withTests_withAnalyzerWarnings() { + func testPassing_withTests_withAnalyzerWarnings() throws { - let buildResultSummary = MockBuildResultSummary(analyzerWarningCount: 3, testsCount: 99, codeCoveragePercentage: 12) - let integration = self.integration(.AnalyzerWarnings, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary(analyzerWarningCount: 3, testsCount: 99, codeCoveragePercentage: 12) + let integration = try self.integration(.AnalyzerWarnings, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildPassing(integration) @@ -130,10 +130,10 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.state) == exp_state } - func testPassing_withTests_withWarningsAndAnalyzerWarnings() { + func testPassing_withTests_withWarningsAndAnalyzerWarnings() throws { - let buildResultSummary = MockBuildResultSummary(analyzerWarningCount: 10, testsCount: 99, warningCount: 2, codeCoveragePercentage: 12) - let integration = self.integration(.Warnings, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary(analyzerWarningCount: 10, testsCount: 99, warningCount: 2, codeCoveragePercentage: 12) + let integration = try self.integration(.Warnings, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildPassing(integration) @@ -146,11 +146,11 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.state) == exp_state } - func testFailingTests() { + func testFailingTests() throws { //got 99 tests but failing's just one - let buildResultSummary = MockBuildResultSummary(testFailureCount: 1, testsCount: 99) - let integration = self.integration(.TestFailures, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary(testFailureCount: 1, testsCount: 99) + let integration = try self.integration(.TestFailures, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildFailingTests(integration) @@ -163,10 +163,10 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.state) == exp_state } - func testErrors() { + func testErrors() throws { - let buildResultSummary = MockBuildResultSummary(errorCount: 4) - let integration = self.integration(.BuildErrors, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary(errorCount: 4) + let integration = try self.integration(.BuildErrors, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildErrorredIntegration(integration) @@ -179,10 +179,10 @@ class GitHubSummaryBuilderTests: XCTestCase { expect(result.status.state) == exp_state } - func testCanceled() { + func testCanceled() throws { - let buildResultSummary = MockBuildResultSummary() - let integration = self.integration(.Canceled, buildResultSummary: buildResultSummary) + let buildResultSummary = try MockBuildResultSummary() + let integration = try self.integration(.Canceled, buildResultSummary: buildResultSummary) let summary = SummaryBuilder() summary.statusCreator = MockGitHubServer() let result = summary.buildCanceledIntegration(integration) diff --git a/BuildaKitTests/Mocks.swift b/BuildaKitTests/Mocks.swift index 4c3e3a6..bf72342 100644 --- a/BuildaKitTests/Mocks.swift +++ b/BuildaKitTests/Mocks.swift @@ -161,8 +161,8 @@ class MockSourceControlBlueprint: SourceControlBlueprint { super.init(branch: "branch", projectWCCIdentifier: "wcc_id", wCCName: "wcc_name", projectName: "project_name", projectURL: "project_url", projectPath: "project_path", publicSSHKey: "SSH public", privateSSHKey: "SSH private", sshPassphrase: "SSH passphrase") } - required init(json: NSDictionary) { - super.init(json: json) + required init(json: NSDictionary) throws { + try super.init(json: json) } } @@ -181,8 +181,8 @@ class MockBotConfiguration: BotConfiguration { sourceControlBlueprint: MockSourceControlBlueprint()) } - required init(json: NSDictionary) { - super.init(json: json) + required init(json: NSDictionary) throws { + try super.init(json: json) } } @@ -192,14 +192,14 @@ class MockBot: Bot { super.init(name: name, configuration: MockBotConfiguration()) } - required init(json: NSDictionary) { - super.init(json: json) + required init(json: NSDictionary) throws { + try super.init(json: json) } } class MockIntegration: Integration { - init(number: Int = 1, step: Step = Step.Completed, sha: String = "head_sha", result: Result = Result.Succeeded, buildResultSummary: BuildResultSummary? = nil) { + init(number: Int = 1, step: Step = Step.Completed, sha: String = "head_sha", result: Result = Result.Succeeded, buildResultSummary: BuildResultSummary? = nil) throws { let dict = MockHelpers.loadSampleIntegration() dict["currentStep"] = step.rawValue @@ -210,11 +210,11 @@ class MockIntegration: Integration { let d2 = d1["DVTSourceControlWorkspaceBlueprintLocationsKey"] as! NSMutableDictionary let d3 = d2["CEE8472CC4AB69CD27173B930EB93B6B4AA4BAFC"] as! NSMutableDictionary d3["DVTSourceControlLocationRevisionKey"] = sha - super.init(json: dict) + try super.init(json: dict) } - required init(json: NSDictionary) { - super.init(json: json) + required init(json: NSDictionary) throws { + try super.init(json: json) } } @@ -227,7 +227,7 @@ class MockBuildResultSummary: BuildResultSummary { testsCount: Int = 0, warningCount: Int = 0, codeCoveragePercentage: Int = 0 - ) { + ) throws { let json: NSDictionary = [ "analyzerWarningCount": analyzerWarningCount, @@ -245,11 +245,11 @@ class MockBuildResultSummary: BuildResultSummary { "codeCoveragePercentage": codeCoveragePercentage, "codeCoveragePercentageDelta": 0 ] - self.init(json: json) + try self.init(json: json) } - required init(json: NSDictionary) { - super.init(json: json) + required init(json: NSDictionary) throws { + try super.init(json: json) } } diff --git a/BuildaKitTests/SyncPair_PR_Bot_Tests.swift b/BuildaKitTests/SyncPair_PR_Bot_Tests.swift index bc0e545..abde145 100644 --- a/BuildaKitTests/SyncPair_PR_Bot_Tests.swift +++ b/BuildaKitTests/SyncPair_PR_Bot_Tests.swift @@ -47,11 +47,11 @@ class SyncPair_PR_Bot_Tests: XCTestCase { XCTAssertNotNil(actions.startNewIntegrationBot) } - func testFirstIntegrationPending() { + func testFirstIntegrationPending() throws { let (pr, bot, commit, statusCreator) = self.mockedPRAndBotAndCommit() let integrations = [ - MockIntegration(number: 1, step: Integration.Step.Pending) + try MockIntegration(number: 1, step: Integration.Step.Pending) ] let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", buildStatusCreator: statusCreator, integrations: integrations) @@ -61,13 +61,13 @@ class SyncPair_PR_Bot_Tests: XCTestCase { XCTAssertEqual(actions.statusToSet!.status.status.state, BuildState.Pending) } - func testMultipleIntegrationsPending() { + func testMultipleIntegrationsPending() throws { let (pr, bot, commit, statusCreator) = self.mockedPRAndBotAndCommit() let integrations = [ - MockIntegration(number: 1, step: Integration.Step.Pending), - MockIntegration(number: 2, step: Integration.Step.Pending), - MockIntegration(number: 3, step: Integration.Step.Pending) + try MockIntegration(number: 1, step: Integration.Step.Pending), + try MockIntegration(number: 2, step: Integration.Step.Pending), + try MockIntegration(number: 3, step: Integration.Step.Pending) ] let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", buildStatusCreator: statusCreator, integrations: integrations) @@ -82,11 +82,11 @@ class SyncPair_PR_Bot_Tests: XCTestCase { XCTAssertEqual(actions.statusToSet!.status.status.state, BuildState.Pending) } - func testOneIntegrationRunning() { + func testOneIntegrationRunning() throws { let (pr, bot, commit, statusCreator) = self.mockedPRAndBotAndCommit() let integrations = [ - MockIntegration(number: 1, step: Integration.Step.Building), + try MockIntegration(number: 1, step: Integration.Step.Building), ] let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", buildStatusCreator: statusCreator, integrations: integrations) @@ -97,11 +97,11 @@ class SyncPair_PR_Bot_Tests: XCTestCase { XCTAssertEqual(actions.statusToSet!.status.status.state, BuildState.Pending) } - func testOneIntegrationTestsFailed() { + func testOneIntegrationTestsFailed() throws { let (pr, bot, commit, statusCreator) = self.mockedPRAndBotAndCommit() let integrations = [ - MockIntegration(number: 1, step: Integration.Step.Completed, sha: "head_sha", result: Integration.Result.TestFailures) + try MockIntegration(number: 1, step: Integration.Step.Completed, sha: "head_sha", result: Integration.Result.TestFailures) ] let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", buildStatusCreator: statusCreator, integrations: integrations) @@ -112,11 +112,11 @@ class SyncPair_PR_Bot_Tests: XCTestCase { XCTAssertEqual(actions.statusToSet!.status.status.state, BuildState.Failure) } - func testOneIntegrationSuccess() { + func testOneIntegrationSuccess() throws { let (pr, bot, commit, statusCreator) = self.mockedPRAndBotAndCommit() let integrations = [ - MockIntegration(number: 1, step: Integration.Step.Completed, sha: "head_sha", result: Integration.Result.Succeeded) + try MockIntegration(number: 1, step: Integration.Step.Completed, sha: "head_sha", result: Integration.Result.Succeeded) ] let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", buildStatusCreator: statusCreator, integrations: integrations) @@ -127,12 +127,12 @@ class SyncPair_PR_Bot_Tests: XCTestCase { XCTAssertEqual(actions.statusToSet!.status.status.state, BuildState.Success) } - func testTwoIntegrationOneRunningOnePending() { + func testTwoIntegrationOneRunningOnePending() throws { let (pr, bot, commit, statusCreator) = self.mockedPRAndBotAndCommit() let integrations = [ - MockIntegration(number: 1, step: Integration.Step.Building, sha: "head_sha"), - MockIntegration(number: 2, step: Integration.Step.Pending, sha: "head_sha") + try MockIntegration(number: 1, step: Integration.Step.Building, sha: "head_sha"), + try MockIntegration(number: 2, step: Integration.Step.Pending, sha: "head_sha") ] let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", buildStatusCreator: statusCreator, integrations: integrations) @@ -143,11 +143,11 @@ class SyncPair_PR_Bot_Tests: XCTestCase { XCTAssertEqual(actions.statusToSet!.status.status.state, BuildState.Pending) } - func testTwoIntegrationsDifferentCommits() { + func testTwoIntegrationsDifferentCommits() throws { let (pr, bot, commit, statusCreator) = self.mockedPRAndBotAndCommit() let integrations = [ - MockIntegration(number: 1, step: Integration.Step.Building, sha: "old_head_sha"), + try MockIntegration(number: 1, step: Integration.Step.Building, sha: "old_head_sha"), ] let actions = SyncPairPRResolver().resolveActionsForCommitAndIssueWithBotIntegrations(commit, issue: pr, bot: bot, hostname: "localhost", buildStatusCreator: statusCreator, integrations: integrations) diff --git a/Buildasaur.xcodeproj/project.pbxproj b/Buildasaur.xcodeproj/project.pbxproj index 1ee2bd9..db13e9a 100644 --- a/Buildasaur.xcodeproj/project.pbxproj +++ b/Buildasaur.xcodeproj/project.pbxproj @@ -965,14 +965,14 @@ isa = PBXNativeTarget; buildConfigurationList = 3A56878C1A3B93BD0066DB2B /* Build configuration list for PBXNativeTarget "Buildasaur" */; buildPhases = ( - 7F7B5A38B90C0DC548380B41 /* Check Pods Manifest.lock */, + 7F7B5A38B90C0DC548380B41 /* [CP] Check Pods Manifest.lock */, 3A56876C1A3B93BD0066DB2B /* Sources */, 3A56876D1A3B93BD0066DB2B /* Frameworks */, 3A56876E1A3B93BD0066DB2B /* Resources */, 3A58B14E1A3B9604003E0266 /* Embed Frameworks */, 3ABEF9741C4B1DD800ED983F /* Crashlytics */, - 95810B17A48B7A0701C0D988 /* Embed Pods Frameworks */, - 2C56A540DDB9310EB6066F2E /* Copy Pods Resources */, + 95810B17A48B7A0701C0D988 /* [CP] Embed Pods Frameworks */, + 2C56A540DDB9310EB6066F2E /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -990,12 +990,12 @@ isa = PBXNativeTarget; buildConfigurationList = 3A756DC91BAB425E00508B69 /* Build configuration list for PBXNativeTarget "BuildaHeartbeatKit" */; buildPhases = ( - A357470D0074E00EB65486C4 /* Check Pods Manifest.lock */, + A357470D0074E00EB65486C4 /* [CP] Check Pods Manifest.lock */, 3A756DB81BAB425E00508B69 /* Sources */, 3A756DB91BAB425E00508B69 /* Frameworks */, 3A756DBA1BAB425E00508B69 /* Headers */, 3A756DBB1BAB425E00508B69 /* Resources */, - FCA2AC3A5FAE55B062298D99 /* Copy Pods Resources */, + FCA2AC3A5FAE55B062298D99 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1010,12 +1010,12 @@ isa = PBXNativeTarget; buildConfigurationList = 3A81BB331B5A77E9004732CD /* Build configuration list for PBXNativeTarget "BuildaKit" */; buildPhases = ( - B1C478B6293E2189D88A1ED0 /* Check Pods Manifest.lock */, + B1C478B6293E2189D88A1ED0 /* [CP] Check Pods Manifest.lock */, 3A81BB111B5A77E9004732CD /* Sources */, 3A81BB121B5A77E9004732CD /* Frameworks */, 3A81BB131B5A77E9004732CD /* Headers */, 3A81BB141B5A77E9004732CD /* Resources */, - B7714B96633F79A27D1C8661 /* Copy Pods Resources */, + B7714B96633F79A27D1C8661 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1031,12 +1031,12 @@ isa = PBXNativeTarget; buildConfigurationList = 3A81BB341B5A77E9004732CD /* Build configuration list for PBXNativeTarget "BuildaKitTests" */; buildPhases = ( - 350D4892586930B7AED3C4FA /* Check Pods Manifest.lock */, + 350D4892586930B7AED3C4FA /* [CP] Check Pods Manifest.lock */, 3A81BB1B1B5A77E9004732CD /* Sources */, 3A81BB1C1B5A77E9004732CD /* Frameworks */, 3A81BB1D1B5A77E9004732CD /* Resources */, - 64FEAE1B37282010DE92435F /* Embed Pods Frameworks */, - 4D620C21D25FEA24CC14A453 /* Copy Pods Resources */, + 64FEAE1B37282010DE92435F /* [CP] Embed Pods Frameworks */, + 4D620C21D25FEA24CC14A453 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1052,12 +1052,12 @@ isa = PBXNativeTarget; buildConfigurationList = 3AAF6EFD1A3CE5BA00C657FB /* Build configuration list for PBXNativeTarget "BuildaGitServer" */; buildPhases = ( - CA239972B01BEAB058E5288C /* Check Pods Manifest.lock */, + CA239972B01BEAB058E5288C /* [CP] Check Pods Manifest.lock */, 3AAF6EDF1A3CE5BA00C657FB /* Sources */, 3AAF6EE01A3CE5BA00C657FB /* Frameworks */, 3AAF6EE11A3CE5BA00C657FB /* Headers */, 3AAF6EE21A3CE5BA00C657FB /* Resources */, - 567E9244948E61DA4DDCAC68 /* Copy Pods Resources */, + 567E9244948E61DA4DDCAC68 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1072,12 +1072,12 @@ isa = PBXNativeTarget; buildConfigurationList = 3AAF6F001A3CE5BA00C657FB /* Build configuration list for PBXNativeTarget "BuildaGitServerTests" */; buildPhases = ( - 3FADD00C3BA8BD1EE7164D23 /* Check Pods Manifest.lock */, + 3FADD00C3BA8BD1EE7164D23 /* [CP] Check Pods Manifest.lock */, 3AAF6EEA1A3CE5BA00C657FB /* Sources */, 3AAF6EEB1A3CE5BA00C657FB /* Frameworks */, 3AAF6EEC1A3CE5BA00C657FB /* Resources */, - 27B14128279E4AB1336EECDF /* Embed Pods Frameworks */, - 6E96A2CDDE06356C87CFC70A /* Copy Pods Resources */, + 27B14128279E4AB1336EECDF /* [CP] Embed Pods Frameworks */, + 6E96A2CDDE06356C87CFC70A /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1213,14 +1213,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 27B14128279E4AB1336EECDF /* Embed Pods Frameworks */ = { + 27B14128279E4AB1336EECDF /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1228,14 +1228,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BuildaGitServerTests/Pods-BuildaGitServerTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 2C56A540DDB9310EB6066F2E /* Copy Pods Resources */ = { + 2C56A540DDB9310EB6066F2E /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1243,14 +1243,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Buildasaur/Pods-Buildasaur-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 350D4892586930B7AED3C4FA /* Check Pods Manifest.lock */ = { + 350D4892586930B7AED3C4FA /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1272,14 +1272,14 @@ shellPath = /bin/bash; shellScript = "#if [ \"Release\" = \"${CONFIGURATION}\" ]; then\n if [[ $(whoami) == \"honzadvorsky\" ]] ; then\n source ~/.profile\n echo \"Running Crashlytics\"\n \"${PODS_ROOT}/Fabric/run\" $KEY_FABRIC_BUILDASAUR_PUBLIC $KEY_FABRIC_BUILDASAUR_PRIVATE\n fi\n#fi"; }; - 3FADD00C3BA8BD1EE7164D23 /* Check Pods Manifest.lock */ = { + 3FADD00C3BA8BD1EE7164D23 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1287,14 +1287,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 4D620C21D25FEA24CC14A453 /* Copy Pods Resources */ = { + 4D620C21D25FEA24CC14A453 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1302,14 +1302,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BuildaKitTests/Pods-BuildaKitTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 567E9244948E61DA4DDCAC68 /* Copy Pods Resources */ = { + 567E9244948E61DA4DDCAC68 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1317,14 +1317,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BuildaGitServer/Pods-BuildaGitServer-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 64FEAE1B37282010DE92435F /* Embed Pods Frameworks */ = { + 64FEAE1B37282010DE92435F /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1332,14 +1332,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BuildaKitTests/Pods-BuildaKitTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 6E96A2CDDE06356C87CFC70A /* Copy Pods Resources */ = { + 6E96A2CDDE06356C87CFC70A /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1347,14 +1347,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BuildaGitServerTests/Pods-BuildaGitServerTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 7F7B5A38B90C0DC548380B41 /* Check Pods Manifest.lock */ = { + 7F7B5A38B90C0DC548380B41 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1362,14 +1362,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 95810B17A48B7A0701C0D988 /* Embed Pods Frameworks */ = { + 95810B17A48B7A0701C0D988 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1377,14 +1377,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Buildasaur/Pods-Buildasaur-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - A357470D0074E00EB65486C4 /* Check Pods Manifest.lock */ = { + A357470D0074E00EB65486C4 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1392,14 +1392,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - B1C478B6293E2189D88A1ED0 /* Check Pods Manifest.lock */ = { + B1C478B6293E2189D88A1ED0 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1407,14 +1407,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - B7714B96633F79A27D1C8661 /* Copy Pods Resources */ = { + B7714B96633F79A27D1C8661 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1422,14 +1422,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BuildaKit/Pods-BuildaKit-resources.sh\"\n"; showEnvVarsInLog = 0; }; - CA239972B01BEAB058E5288C /* Check Pods Manifest.lock */ = { + CA239972B01BEAB058E5288C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1437,14 +1437,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - FCA2AC3A5FAE55B062298D99 /* Copy Pods Resources */ = { + FCA2AC3A5FAE55B062298D99 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Buildasaur/MenuItemManager.swift b/Buildasaur/MenuItemManager.swift index 27d4070..92a276c 100644 --- a/Buildasaur/MenuItemManager.swift +++ b/Buildasaur/MenuItemManager.swift @@ -47,7 +47,7 @@ class MenuItemManager : NSObject, NSMenuDelegate { //this many items need to be created or destroyed if diffItems > 0 { for _ in 0.. 0.2.7' + pod 'BuildaUtils', '~> 0.3.2' end def rac @@ -26,7 +26,7 @@ end def also_xcode_pods pods_for_errbody - pod 'XcodeServerSDK', '~> 0.5.7' + pod 'XcodeServerSDK', '~> 0.6.0' pod 'ekgclient', '~> 0.3.2' end diff --git a/Podfile.lock b/Podfile.lock index aa8f55f..b0addcb 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,6 +1,6 @@ PODS: - Alamofire (2.0.0-beta.3) - - BuildaUtils (0.2.8): + - BuildaUtils (0.3.2): - SwiftSafe (~> 0.1) - Crashlytics (3.7.0): - Fabric (~> 1.6.3) @@ -32,11 +32,11 @@ PODS: - Result (1.0.2) - Sparkle (1.13.1) - SwiftSafe (0.1) - - XcodeServerSDK (0.5.8): - - BuildaUtils (~> 0.2.3) + - XcodeServerSDK (0.6.0): + - BuildaUtils (~> 0.3.2) DEPENDENCIES: - - BuildaUtils (~> 0.2.7) + - BuildaUtils (~> 0.3.2) - Crashlytics - CryptoSwift - DVR (~> 0.2.1-snap1) @@ -48,7 +48,7 @@ DEPENDENCIES: - OAuthSwift - ReactiveCocoa (~> 4.0.1) - Sparkle - - XcodeServerSDK (~> 0.5.7) + - XcodeServerSDK (~> 0.6.0) EXTERNAL SOURCES: Keys: @@ -64,7 +64,7 @@ CHECKOUT OPTIONS: SPEC CHECKSUMS: Alamofire: 39dddb7d3725d1771b1d2f7099c8bd45bd83ffbb - BuildaUtils: 0974c128ace30916b9b9429e8585c1c6402593dd + BuildaUtils: 1c6bf3a28948c3aae242171abf2474cd4746a2d1 Crashlytics: c3a2333dea9e2733d2777f730910321fc9e25c0d CryptoSwift: b2bf37b8e7cc6d682ef3365cb966bc5ae5174aa5 DVR: 05cb292d3f71608e0a35afa85d475cbb56e37132 @@ -79,8 +79,8 @@ SPEC CHECKSUMS: Result: dd3dd71af3fa2e262f1a999e14fba2c25ec14f16 Sparkle: 2fbd47b869621d1e679c7554e3e19dda02104818 SwiftSafe: 77ffd12b02678790bec1ef56a2d14ec5036f1fd6 - XcodeServerSDK: c8ab7afc40cd7eedee41ef6bc0abfd2687aff115 + XcodeServerSDK: 9e0873833a55f3833504ec8ed8f8fe9d125a28c1 -PODFILE CHECKSUM: 6ad46ead67ccbcc642faf2bcb006f3ddabd3ccba +PODFILE CHECKSUM: 520631cbf54271d722cd6e2e64fa066c32b50023 -COCOAPODS: 1.0.0.beta.4 +COCOAPODS: 1.0.1