diff --git a/BuildaKit/HDGitHubXCBotSyncer.swift b/BuildaKit/HDGitHubXCBotSyncer.swift index d90b9eb..e1036d6 100644 --- a/BuildaKit/HDGitHubXCBotSyncer.swift +++ b/BuildaKit/HDGitHubXCBotSyncer.swift @@ -305,7 +305,7 @@ public class HDGitHubXCBotSyncer : Syncer { } //bots that don't have a PR or a branch, to delete - let botsToDelete = mappedBots.values.array + let botsToDelete = Array(mappedBots.values) return (prsToSync, prBotsToCreate, branchesToSync, branchBotsToCreate, botsToDelete) } diff --git a/BuildaKit/Persistence.swift b/BuildaKit/Persistence.swift index a08b343..87fc543 100644 --- a/BuildaKit/Persistence.swift +++ b/BuildaKit/Persistence.swift @@ -69,7 +69,7 @@ public class Persistence { let fm = NSFileManager.defaultManager() do { let contents = try fm.contentsOfDirectoryAtURL(folderUrl, includingPropertiesForKeys: nil, options: [.SkipsHiddenFiles, .SkipsSubdirectoryDescendants]) - contents.map { visit(url: $0) } + contents.forEach { visit(url: $0) } } catch { Log.error("Couldn't read folder \(folderUrl), error \(error)") diff --git a/BuildaKit/Project.swift b/BuildaKit/Project.swift index 7c52855..f8de60a 100644 --- a/BuildaKit/Project.swift +++ b/BuildaKit/Project.swift @@ -142,7 +142,7 @@ public class Project : JSONSerializable { //validate allowed remote url if self.parseCheckoutType(meta) == nil { //disallowed - let allowedString = ", ".join([AllowedCheckoutTypes.SSH].map({ $0.rawValue })) + let allowedString = [AllowedCheckoutTypes.SSH].map({ $0.rawValue }).joinWithSeparator(", ") let error = Error.withInfo("Disallowed checkout type, the project must be checked out over one of the supported schemes: \(allowedString)") throw error } @@ -281,7 +281,7 @@ public class Project : JSONSerializable { if let githubRange = stringUrl.rangeOfString("github.com", options: NSStringCompareOptions(), range: nil, locale: nil), let dotGitRange = stringUrl.rangeOfString(".git", options: NSStringCompareOptions.BackwardsSearch, range: nil, locale: nil) { - let start = advance(githubRange.endIndex, 1) + let start = githubRange.endIndex.advancedBy(1) let end = dotGitRange.startIndex let repoName = originalStringUrl.substringWithRange(Range(start: start, end: end)) diff --git a/BuildaKit/StorageManager.swift b/BuildaKit/StorageManager.swift index 93b9ce9..3c80716 100644 --- a/BuildaKit/StorageManager.swift +++ b/BuildaKit/StorageManager.swift @@ -158,7 +158,7 @@ public class StorageManager { Log.error("Some configs failed to parse, will be ignored.") //maybe show a popup } - parsedConfigs.map { self.servers.append($0) } + parsedConfigs.forEach { self.servers.append($0) } return } } catch { @@ -184,7 +184,7 @@ public class StorageManager { Log.error("Some projects failed to parse, will be ignored.") //maybe show a popup } - parsedProjects.map { self.projects.append($0) } + parsedProjects.forEach { self.projects.append($0) } return } } catch { @@ -210,7 +210,7 @@ public class StorageManager { Log.error("Some syncers failed to parse, will be ignored.") //maybe show a popup } - parsedSyncers.map { self.syncers.append($0) } + parsedSyncers.forEach { self.syncers.append($0) } return } } catch { @@ -279,7 +279,7 @@ public class StorageManager { public func saveBuildTemplates() { let templatesFolderUrl = Persistence.getFileInAppSupportWithName("BuildTemplates", isDirectory: true) - self.buildTemplates.map { + self.buildTemplates.forEach { (template: BuildTemplate) -> () in let json = template.jsonify() diff --git a/BuildaKit/SyncPairResolver.swift b/BuildaKit/SyncPairResolver.swift index 2b705b9..496be36 100644 --- a/BuildaKit/SyncPairResolver.swift +++ b/BuildaKit/SyncPairResolver.swift @@ -249,7 +249,7 @@ public class SyncPairResolver { if lines.count == 0 { comment = nil } else { - comment = "\n".join(lines) + comment = lines.joinWithSeparator("\n") } return (status: status, comment: comment) } diff --git a/Buildasaur/StatusSyncerViewController.swift b/Buildasaur/StatusSyncerViewController.swift index 3edc3c5..f814765 100644 --- a/Buildasaur/StatusSyncerViewController.swift +++ b/Buildasaur/StatusSyncerViewController.swift @@ -114,9 +114,9 @@ class StatusSyncerViewController: StatusViewController, SyncerDelegate { itemsToReport.append(lastSyncString) } - strings.map { itemsToReport.append($0) } + strings.forEach { itemsToReport.append($0) } - self.statusTextField.stringValue = "\n".join(itemsToReport) + self.statusTextField.stringValue = itemsToReport.joinWithSeparator("\n") } override func viewDidLoad() { diff --git a/Buildasaur/TriggerViewController.swift b/Buildasaur/TriggerViewController.swift index a7c3d53..8145e45 100644 --- a/Buildasaur/TriggerViewController.swift +++ b/Buildasaur/TriggerViewController.swift @@ -63,7 +63,7 @@ class TriggerViewController: SetupViewController, NSComboBoxDelegate { if trigger.kind == Trigger.Kind.RunScript { self.bodyTextField.stringValue = trigger.scriptBody } else { - self.bodyTextField.stringValue = ",".join(trigger.emailConfiguration!.additionalRecipients) + self.bodyTextField.stringValue = trigger.emailConfiguration!.additionalRecipients.joinWithSeparator(",") } if let conditions = trigger.conditions { @@ -127,14 +127,14 @@ class TriggerViewController: SetupViewController, NSComboBoxDelegate { self.bodyDescriptionLabel.stringValue = desc let isEmail = triggerKind == Trigger.Kind.EmailNotification - self.emailCheckboxes().map { $0.enabled = isEmail } + self.emailCheckboxes().forEach { $0.enabled = isEmail } } let phaseIndex = self.phaseComboBox.indexOfSelectedItem if phaseIndex > -1 { let triggerPhase = self.allPhases()[phaseIndex] let isPostbuild = triggerPhase == Trigger.Phase.Postbuild - self.conditionsCheckboxes().map { $0.enabled = isPostbuild } + self.conditionsCheckboxes().forEach { $0.enabled = isPostbuild } } super.reloadUI() diff --git a/Buildasaur/UIUtils.swift b/Buildasaur/UIUtils.swift index 17b87a5..61a8b4c 100644 --- a/Buildasaur/UIUtils.swift +++ b/Buildasaur/UIUtils.swift @@ -33,7 +33,7 @@ public class UIUtils { let alert = self.createAlert(text, style: nil) - buttons.map { alert.addButtonWithTitle($0) } + buttons.forEach { alert.addButtonWithTitle($0) } self.presentAlert(alert, completion: { (resp) -> () in diff --git a/Podfile b/Podfile index f8df04d..960d0a1 100644 --- a/Podfile +++ b/Podfile @@ -2,12 +2,12 @@ platform :osx, '10.10' use_frameworks! def pods_for_errbody - pod 'BuildaUtils', '0.0.10' + pod 'BuildaUtils', '0.0.11' end def also_xcode_pods pods_for_errbody - pod 'XcodeServerSDK', '0.1.9' + pod 'XcodeServerSDK', '0.1.10' end target 'Buildasaur' do diff --git a/Podfile.lock b/Podfile.lock index 120300f..7c9e138 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,14 +1,14 @@ PODS: - - BuildaUtils (0.0.10) - - XcodeServerSDK (0.1.9): - - BuildaUtils (= 0.0.10) + - BuildaUtils (0.0.11) + - XcodeServerSDK (0.1.10): + - BuildaUtils (= 0.0.11) DEPENDENCIES: - - BuildaUtils (= 0.0.10) - - XcodeServerSDK (= 0.1.9) + - BuildaUtils (= 0.0.11) + - XcodeServerSDK (= 0.1.10) SPEC CHECKSUMS: - BuildaUtils: a6d3a5d27d4b96c86e4ce2ef6f2ba9d1ea32fa92 - XcodeServerSDK: 1e37d7f559c8b158784ced337ed32928e8574924 + BuildaUtils: be29c9977230329a330a02c6f97454a7422ae534 + XcodeServerSDK: 8e0e4552b3f330b928cb4d38f2ded7d5a25cf751 COCOAPODS: 0.38.2