Skip to content

Commit

Permalink
🎨 Format source with SwiftFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
phatblat committed Mar 31, 2019
1 parent 1ed6a7e commit 2958c74
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion MasKit/Commands/Upgrade.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions MasKit/Models/MacOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down
14 changes: 7 additions & 7 deletions MasKitTests/Commands/InfoCommandSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion MasKitTests/Models/MacOSSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
2 changes: 1 addition & 1 deletion docs/sample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 2958c74

Please sign in to comment.