From 2958c7486e5f1f5ee3fe3f765ee361ad79a5cd0e Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sun, 31 Mar 2019 10:38:23 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Format=20source=20with=20SwiftFo?= =?UTF-8?q?rmat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MasKit/Commands/Upgrade.swift | 2 +- MasKit/Models/MacOS.swift | 12 ++++++------ MasKitTests/Commands/InfoCommandSpec.swift | 14 +++++++------- MasKitTests/Models/MacOSSpec.swift | 2 +- docs/sample.swift | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/MasKit/Commands/Upgrade.swift b/MasKit/Commands/Upgrade.swift index fb993d105..a9f615cf4 100644 --- a/MasKit/Commands/Upgrade.swift +++ b/MasKit/Commands/Upgrade.swift @@ -64,7 +64,7 @@ public struct UpgradeCommand: CommandProtocol { } print("Upgrading \(updates.count) outdated application\(updates.count > 1 ? "s" : ""):") - print(updates.map({ "\($0.title) (\($0.bundleVersion))" }).joined(separator: ", ")) + print(updates.map { "\($0.title) (\($0.bundleVersion))" }.joined(separator: ", ")) let updateResults = updates.compactMap { download($0.itemIdentifier.uint64Value) diff --git a/MasKit/Models/MacOS.swift b/MasKit/Models/MacOS.swift index 98c680ad0..4dd4de3af 100644 --- a/MasKit/Models/MacOS.swift +++ b/MasKit/Models/MacOS.swift @@ -53,12 +53,12 @@ enum MacOS: CaseIterable { /// Bundle identifier var bundleIdentifier: String { switch self { - case .mojave: return "\(MacOS.bundleIdentifierBase).Mojave" - case .highSierra: return "\(MacOS.bundleIdentifierBase).HighSierra" - case .sierra: return "\(MacOS.bundleIdentifierBase).Sierra" // UNCONFIRMED - case .elCapitan: return "\(MacOS.bundleIdentifierBase).ElCapitan" // UNCONFIRMED - case .yosemite: return "\(MacOS.bundleIdentifierBase).Yosemite" - case .mavericks: return "\(MacOS.bundleIdentifierBase).Mavericks" + case .mojave: return "\(MacOS.bundleIdentifierBase).Mojave" + case .highSierra: return "\(MacOS.bundleIdentifierBase).HighSierra" + case .sierra: return "\(MacOS.bundleIdentifierBase).Sierra" // UNCONFIRMED + case .elCapitan: return "\(MacOS.bundleIdentifierBase).ElCapitan" // UNCONFIRMED + case .yosemite: return "\(MacOS.bundleIdentifierBase).Yosemite" + case .mavericks: return "\(MacOS.bundleIdentifierBase).Mavericks" } } diff --git a/MasKitTests/Commands/InfoCommandSpec.swift b/MasKitTests/Commands/InfoCommandSpec.swift index 56255e78b..ede5b9fc6 100644 --- a/MasKitTests/Commands/InfoCommandSpec.swift +++ b/MasKitTests/Commands/InfoCommandSpec.swift @@ -80,14 +80,14 @@ class InfoCommandSpec: QuickSpec { ) let expectedOutput = """ - Install macOS Mojave [0.0] - By: Apple Inc. - Released: - Minimum OS: - Size: Zero KB - From: https://itunes.apple.com/us/app/macos-mojave/id1398502828?mt=12 + Install macOS Mojave [0.0] + By: Apple Inc. + Released: + Minimum OS: + Size: Zero KB + From: https://itunes.apple.com/us/app/macos-mojave/id1398502828?mt=12 - """ + """ storeSearch.apps[searchResult.trackId] = searchResult let output = OutputListener() diff --git a/MasKitTests/Models/MacOSSpec.swift b/MasKitTests/Models/MacOSSpec.swift index eef4da128..78b4eb601 100644 --- a/MasKitTests/Models/MacOSSpec.swift +++ b/MasKitTests/Models/MacOSSpec.swift @@ -36,7 +36,7 @@ class MacOSSpec: QuickSpec { } it("has a description") { expect(macos.description) == - "Mojave 10.14 (1398502828) https://itunes.apple.com/us/app/macos-mojave/id1398502828?mt=12" + "Mojave 10.14 (1398502828) https://itunes.apple.com/us/app/macos-mojave/id1398502828?mt=12" } } it("can be found by token") { diff --git a/docs/sample.swift b/docs/sample.swift index 793d94721..ed2cb96dd 100644 --- a/docs/sample.swift +++ b/docs/sample.swift @@ -49,7 +49,7 @@ let cool = yTown(5) { foo in // Strongify weak references in async closures APIClient.getAwesomeness { [weak self] result in - guard let `self` = self else { return } + guard let self = self else { return } self.stopLoadingSpinner() self.show(result) }