diff --git a/Sources/mas/Commands/Account.swift b/Sources/mas/Commands/Account.swift index bd172f6..a9f90a6 100644 --- a/Sources/mas/Commands/Account.swift +++ b/Sources/mas/Commands/Account.swift @@ -9,7 +9,7 @@ import ArgumentParser import StoreFoundation -extension Mas { +extension MAS { struct Account: ParsableCommand { static let configuration = CommandConfiguration( abstract: "Prints the primary account Apple ID" diff --git a/Sources/mas/Commands/Home.swift b/Sources/mas/Commands/Home.swift index 18a7a53..d9d3b23 100644 --- a/Sources/mas/Commands/Home.swift +++ b/Sources/mas/Commands/Home.swift @@ -8,7 +8,7 @@ import ArgumentParser -extension Mas { +extension MAS { /// Opens app page on MAS Preview. Uses the iTunes Lookup API: /// https://performance-partners.apple.com/search-api struct Home: ParsableCommand { diff --git a/Sources/mas/Commands/Info.swift b/Sources/mas/Commands/Info.swift index ca862d2..e832d20 100644 --- a/Sources/mas/Commands/Info.swift +++ b/Sources/mas/Commands/Info.swift @@ -9,7 +9,7 @@ import ArgumentParser import Foundation -extension Mas { +extension MAS { /// Displays app details. Uses the iTunes Lookup API: /// https://performance-partners.apple.com/search-api struct Info: ParsableCommand { diff --git a/Sources/mas/Commands/Install.swift b/Sources/mas/Commands/Install.swift index 1ba12b0..2b13081 100644 --- a/Sources/mas/Commands/Install.swift +++ b/Sources/mas/Commands/Install.swift @@ -9,7 +9,7 @@ import ArgumentParser import CommerceKit -extension Mas { +extension MAS { /// Installs previously purchased apps from the Mac App Store. struct Install: ParsableCommand { static let configuration = CommandConfiguration( diff --git a/Sources/mas/Commands/List.swift b/Sources/mas/Commands/List.swift index 492f58c..eb782e2 100644 --- a/Sources/mas/Commands/List.swift +++ b/Sources/mas/Commands/List.swift @@ -8,7 +8,7 @@ import ArgumentParser -extension Mas { +extension MAS { /// Command which lists all installed apps. struct List: ParsableCommand { static let configuration = CommandConfiguration( diff --git a/Sources/mas/Commands/Lucky.swift b/Sources/mas/Commands/Lucky.swift index 886b864..f2a33c3 100644 --- a/Sources/mas/Commands/Lucky.swift +++ b/Sources/mas/Commands/Lucky.swift @@ -9,7 +9,7 @@ import ArgumentParser import CommerceKit -extension Mas { +extension MAS { /// Command which installs the first search result. /// /// This is handy as many MAS titles can be long with embedded keywords. diff --git a/Sources/mas/Commands/Open.swift b/Sources/mas/Commands/Open.swift index 82e98de..c2369e9 100644 --- a/Sources/mas/Commands/Open.swift +++ b/Sources/mas/Commands/Open.swift @@ -11,7 +11,7 @@ import Foundation private let masScheme = "macappstore" -extension Mas { +extension MAS { /// Opens app page in MAS app. Uses the iTunes Lookup API: /// https://performance-partners.apple.com/search-api struct Open: ParsableCommand { diff --git a/Sources/mas/Commands/Outdated.swift b/Sources/mas/Commands/Outdated.swift index 2164a4b..77325ba 100644 --- a/Sources/mas/Commands/Outdated.swift +++ b/Sources/mas/Commands/Outdated.swift @@ -10,7 +10,7 @@ import ArgumentParser import Foundation import PromiseKit -extension Mas { +extension MAS { /// Command which displays a list of installed apps which have available updates /// ready to be installed from the Mac App Store. struct Outdated: ParsableCommand { diff --git a/Sources/mas/Commands/Purchase.swift b/Sources/mas/Commands/Purchase.swift index 58a7a48..66f4c92 100644 --- a/Sources/mas/Commands/Purchase.swift +++ b/Sources/mas/Commands/Purchase.swift @@ -9,7 +9,7 @@ import ArgumentParser import CommerceKit -extension Mas { +extension MAS { struct Purchase: ParsableCommand { static let configuration = CommandConfiguration( abstract: "Purchase and download free apps from the Mac App Store" diff --git a/Sources/mas/Commands/Reset.swift b/Sources/mas/Commands/Reset.swift index 76a32bd..37ff3e4 100644 --- a/Sources/mas/Commands/Reset.swift +++ b/Sources/mas/Commands/Reset.swift @@ -9,7 +9,7 @@ import ArgumentParser import CommerceKit -extension Mas { +extension MAS { /// Kills several macOS processes as a means to reset the app store. struct Reset: ParsableCommand { static let configuration = CommandConfiguration( diff --git a/Sources/mas/Commands/Search.swift b/Sources/mas/Commands/Search.swift index 6e6c07e..ef14e1e 100644 --- a/Sources/mas/Commands/Search.swift +++ b/Sources/mas/Commands/Search.swift @@ -8,7 +8,7 @@ import ArgumentParser -extension Mas { +extension MAS { /// Search the Mac App Store using the iTunes Search API. /// /// See - https://performance-partners.apple.com/search-api diff --git a/Sources/mas/Commands/SignIn.swift b/Sources/mas/Commands/SignIn.swift index aaa4a96..c94da79 100644 --- a/Sources/mas/Commands/SignIn.swift +++ b/Sources/mas/Commands/SignIn.swift @@ -9,7 +9,7 @@ import ArgumentParser import StoreFoundation -extension Mas { +extension MAS { struct SignIn: ParsableCommand { static let configuration = CommandConfiguration( commandName: "signin", diff --git a/Sources/mas/Commands/SignOut.swift b/Sources/mas/Commands/SignOut.swift index 3384d8e..1c0d49d 100644 --- a/Sources/mas/Commands/SignOut.swift +++ b/Sources/mas/Commands/SignOut.swift @@ -9,7 +9,7 @@ import ArgumentParser import CommerceKit -extension Mas { +extension MAS { struct SignOut: ParsableCommand { static let configuration = CommandConfiguration( commandName: "signout", diff --git a/Sources/mas/Commands/Uninstall.swift b/Sources/mas/Commands/Uninstall.swift index b73378b..68561c7 100644 --- a/Sources/mas/Commands/Uninstall.swift +++ b/Sources/mas/Commands/Uninstall.swift @@ -9,7 +9,7 @@ import ArgumentParser import Foundation -extension Mas { +extension MAS { /// Command which uninstalls apps managed by the Mac App Store. struct Uninstall: ParsableCommand { static let configuration = CommandConfiguration( diff --git a/Sources/mas/Commands/Upgrade.swift b/Sources/mas/Commands/Upgrade.swift index 83c4788..079550e 100644 --- a/Sources/mas/Commands/Upgrade.swift +++ b/Sources/mas/Commands/Upgrade.swift @@ -10,7 +10,7 @@ import ArgumentParser import Foundation import PromiseKit -extension Mas { +extension MAS { /// Command which upgrades apps with new versions available in the Mac App Store. struct Upgrade: ParsableCommand { static let configuration = CommandConfiguration( diff --git a/Sources/mas/Commands/Vendor.swift b/Sources/mas/Commands/Vendor.swift index 7380ca0..d3004a1 100644 --- a/Sources/mas/Commands/Vendor.swift +++ b/Sources/mas/Commands/Vendor.swift @@ -8,7 +8,7 @@ import ArgumentParser -extension Mas { +extension MAS { /// Opens vendor's app page in a browser. Uses the iTunes Lookup API: /// https://performance-partners.apple.com/search-api struct Vendor: ParsableCommand { diff --git a/Sources/mas/Commands/Version.swift b/Sources/mas/Commands/Version.swift index 00c0e5b..4493088 100644 --- a/Sources/mas/Commands/Version.swift +++ b/Sources/mas/Commands/Version.swift @@ -8,7 +8,7 @@ import ArgumentParser -extension Mas { +extension MAS { /// Command which displays the version of the mas tool. struct Version: ParsableCommand { static let configuration = CommandConfiguration( diff --git a/Sources/mas/Mas.swift b/Sources/mas/MAS.swift similarity index 97% rename from Sources/mas/Mas.swift rename to Sources/mas/MAS.swift index 89aeacb..aee1262 100644 --- a/Sources/mas/Mas.swift +++ b/Sources/mas/MAS.swift @@ -1,5 +1,5 @@ // -// Mas.swift +// MAS.swift // mas // // Created by Chris Araman on 4/22/21. @@ -11,7 +11,7 @@ import Foundation import PromiseKit @main -struct Mas: ParsableCommand { +struct MAS: ParsableCommand { static let configuration = CommandConfiguration( abstract: "Mac App Store command-line interface", subcommands: [ diff --git a/Tests/masTests/Commands/AccountSpec.swift b/Tests/masTests/Commands/AccountSpec.swift index db220c4..8885916 100644 --- a/Tests/masTests/Commands/AccountSpec.swift +++ b/Tests/masTests/Commands/AccountSpec.swift @@ -15,13 +15,13 @@ import Quick public class AccountSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } // account command disabled since macOS 12 Monterey https://github.com/mas-cli/mas#known-issues describe("Account command") { it("displays active account") { expect { - try Mas.Account.parse([]).run() + try MAS.Account.parse([]).run() } .to(throwError(MASError.notSupported)) } diff --git a/Tests/masTests/Commands/HomeSpec.swift b/Tests/masTests/Commands/HomeSpec.swift index 097855e..46d22f6 100644 --- a/Tests/masTests/Commands/HomeSpec.swift +++ b/Tests/masTests/Commands/HomeSpec.swift @@ -17,7 +17,7 @@ public class HomeSpec: QuickSpec { let openCommand = OpenSystemCommandMock() beforeSuite { - Mas.initialize() + MAS.initialize() } describe("home command") { beforeEach { @@ -25,13 +25,13 @@ public class HomeSpec: QuickSpec { } it("fails to open app with invalid ID") { expect { - try Mas.Home.parse(["--", "-999"]).run(storeSearch: storeSearch, openCommand: openCommand) + try MAS.Home.parse(["--", "-999"]).run(storeSearch: storeSearch, openCommand: openCommand) } .to(throwError()) } it("can't find app with unknown ID") { expect { - try Mas.Home.parse(["999"]).run(storeSearch: storeSearch, openCommand: openCommand) + try MAS.Home.parse(["999"]).run(storeSearch: storeSearch, openCommand: openCommand) } .to(throwError(MASError.noSearchResultsFound)) } @@ -43,7 +43,7 @@ public class HomeSpec: QuickSpec { ) storeSearch.apps[mockResult.trackId] = mockResult expect { - try Mas.Home.parse([String(mockResult.trackId)]) + try MAS.Home.parse([String(mockResult.trackId)]) .run(storeSearch: storeSearch, openCommand: openCommand) return openCommand.arguments } diff --git a/Tests/masTests/Commands/InfoSpec.swift b/Tests/masTests/Commands/InfoSpec.swift index 7271451..400ddb6 100644 --- a/Tests/masTests/Commands/InfoSpec.swift +++ b/Tests/masTests/Commands/InfoSpec.swift @@ -17,7 +17,7 @@ public class InfoSpec: QuickSpec { let storeSearch = StoreSearchMock() beforeSuite { - Mas.initialize() + MAS.initialize() } describe("Info command") { beforeEach { @@ -25,13 +25,13 @@ public class InfoSpec: QuickSpec { } it("fails to open app with invalid ID") { expect { - try Mas.Info.parse(["--", "-999"]).run(storeSearch: storeSearch) + try MAS.Info.parse(["--", "-999"]).run(storeSearch: storeSearch) } .to(throwError()) } it("can't find app with unknown ID") { expect { - try Mas.Info.parse(["999"]).run(storeSearch: storeSearch) + try MAS.Info.parse(["999"]).run(storeSearch: storeSearch) } .to(throwError(MASError.noSearchResultsFound)) } @@ -50,7 +50,7 @@ public class InfoSpec: QuickSpec { storeSearch.apps[mockResult.trackId] = mockResult expect { try captureStream(stdout) { - try Mas.Info.parse([String(mockResult.trackId)]).run(storeSearch: storeSearch) + try MAS.Info.parse([String(mockResult.trackId)]).run(storeSearch: storeSearch) } } == """ diff --git a/Tests/masTests/Commands/InstallSpec.swift b/Tests/masTests/Commands/InstallSpec.swift index 4baeead..88ad308 100644 --- a/Tests/masTests/Commands/InstallSpec.swift +++ b/Tests/masTests/Commands/InstallSpec.swift @@ -14,12 +14,12 @@ import Quick public class InstallSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } xdescribe("install command") { xit("installs apps") { expect { - try Mas.Install.parse([]).run(appLibrary: AppLibraryMock()) + try MAS.Install.parse([]).run(appLibrary: AppLibraryMock()) } .toNot(throwError()) } diff --git a/Tests/masTests/Commands/ListSpec.swift b/Tests/masTests/Commands/ListSpec.swift index 7388e80..c72bdf6 100644 --- a/Tests/masTests/Commands/ListSpec.swift +++ b/Tests/masTests/Commands/ListSpec.swift @@ -15,13 +15,13 @@ import Quick public class ListSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("list command") { it("lists apps") { expect { try captureStream(stderr) { - try Mas.List.parse([]).run(appLibrary: AppLibraryMock()) + try MAS.List.parse([]).run(appLibrary: AppLibraryMock()) } } == "Error: No installed apps found\n" diff --git a/Tests/masTests/Commands/LuckySpec.swift b/Tests/masTests/Commands/LuckySpec.swift index 4e373c2..fa73ab9 100644 --- a/Tests/masTests/Commands/LuckySpec.swift +++ b/Tests/masTests/Commands/LuckySpec.swift @@ -17,12 +17,12 @@ public class LuckySpec: QuickSpec { let storeSearch = MasStoreSearch(networkManager: NetworkManager(session: networkSession)) beforeSuite { - Mas.initialize() + MAS.initialize() } xdescribe("lucky command") { xit("installs the first app matching a search") { expect { - try Mas.Lucky.parse(["Slack"]).run(appLibrary: AppLibraryMock(), storeSearch: storeSearch) + try MAS.Lucky.parse(["Slack"]).run(appLibrary: AppLibraryMock(), storeSearch: storeSearch) } .toNot(throwError()) } diff --git a/Tests/masTests/Commands/OpenSpec.swift b/Tests/masTests/Commands/OpenSpec.swift index 13693fb..23b7119 100644 --- a/Tests/masTests/Commands/OpenSpec.swift +++ b/Tests/masTests/Commands/OpenSpec.swift @@ -18,7 +18,7 @@ public class OpenSpec: QuickSpec { let openCommand = OpenSystemCommandMock() beforeSuite { - Mas.initialize() + MAS.initialize() } describe("open command") { beforeEach { @@ -26,13 +26,13 @@ public class OpenSpec: QuickSpec { } it("fails to open app with invalid ID") { expect { - try Mas.Open.parse(["--", "-999"]).run(storeSearch: storeSearch, openCommand: openCommand) + try MAS.Open.parse(["--", "-999"]).run(storeSearch: storeSearch, openCommand: openCommand) } .to(throwError()) } it("can't find app with unknown ID") { expect { - try Mas.Open.parse(["999"]).run(storeSearch: storeSearch, openCommand: openCommand) + try MAS.Open.parse(["999"]).run(storeSearch: storeSearch, openCommand: openCommand) } .to(throwError(MASError.noSearchResultsFound)) } @@ -44,7 +44,7 @@ public class OpenSpec: QuickSpec { ) storeSearch.apps[mockResult.trackId] = mockResult expect { - try Mas.Open.parse([mockResult.trackId.description]) + try MAS.Open.parse([mockResult.trackId.description]) .run(storeSearch: storeSearch, openCommand: openCommand) return openCommand.arguments } @@ -52,7 +52,7 @@ public class OpenSpec: QuickSpec { } it("just opens MAS if no app specified") { expect { - try Mas.Open.parse([]).run(storeSearch: storeSearch, openCommand: openCommand) + try MAS.Open.parse([]).run(storeSearch: storeSearch, openCommand: openCommand) return openCommand.arguments } == ["macappstore://"] diff --git a/Tests/masTests/Commands/OutdatedSpec.swift b/Tests/masTests/Commands/OutdatedSpec.swift index d47b067..72e0f50 100644 --- a/Tests/masTests/Commands/OutdatedSpec.swift +++ b/Tests/masTests/Commands/OutdatedSpec.swift @@ -15,7 +15,7 @@ import Quick public class OutdatedSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("outdated command") { it("displays apps with pending updates") { @@ -48,7 +48,7 @@ public class OutdatedSpec: QuickSpec { ) expect { try captureStream(stdout) { - try Mas.Outdated.parse([]).run(appLibrary: mockAppLibrary, storeSearch: mockStoreSearch) + try MAS.Outdated.parse([]).run(appLibrary: mockAppLibrary, storeSearch: mockStoreSearch) } } == "490461369 Bandwidth+ (1.27 -> 1.28)\n" diff --git a/Tests/masTests/Commands/PurchaseSpec.swift b/Tests/masTests/Commands/PurchaseSpec.swift index 51f84f5..798a5e8 100644 --- a/Tests/masTests/Commands/PurchaseSpec.swift +++ b/Tests/masTests/Commands/PurchaseSpec.swift @@ -14,12 +14,12 @@ import Quick public class PurchaseSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } xdescribe("purchase command") { xit("purchases apps") { expect { - try Mas.Purchase.parse(["999"]).run(appLibrary: AppLibraryMock()) + try MAS.Purchase.parse(["999"]).run(appLibrary: AppLibraryMock()) } .toNot(throwError()) } diff --git a/Tests/masTests/Commands/ResetSpec.swift b/Tests/masTests/Commands/ResetSpec.swift index ca39e2b..96e8adb 100644 --- a/Tests/masTests/Commands/ResetSpec.swift +++ b/Tests/masTests/Commands/ResetSpec.swift @@ -14,12 +14,12 @@ import Quick public class ResetSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("reset command") { it("resets the App Store state") { expect { - try Mas.Reset.parse([]).run() + try MAS.Reset.parse([]).run() } .toNot(throwError()) } diff --git a/Tests/masTests/Commands/SearchSpec.swift b/Tests/masTests/Commands/SearchSpec.swift index 91a3a45..3984fa1 100644 --- a/Tests/masTests/Commands/SearchSpec.swift +++ b/Tests/masTests/Commands/SearchSpec.swift @@ -17,7 +17,7 @@ public class SearchSpec: QuickSpec { let storeSearch = StoreSearchMock() beforeSuite { - Mas.initialize() + MAS.initialize() } describe("search command") { beforeEach { @@ -33,14 +33,14 @@ public class SearchSpec: QuickSpec { storeSearch.apps[mockResult.trackId] = mockResult expect { try captureStream(stdout) { - try Mas.Search.parse(["slack"]).run(storeSearch: storeSearch) + try MAS.Search.parse(["slack"]).run(storeSearch: storeSearch) } } == " 1111 slack (0.0)\n" } it("fails when searching for nonexistent app") { expect { - try Mas.Search.parse(["nonexistent"]).run(storeSearch: storeSearch) + try MAS.Search.parse(["nonexistent"]).run(storeSearch: storeSearch) } .to(throwError(MASError.noSearchResultsFound)) } diff --git a/Tests/masTests/Commands/SignInSpec.swift b/Tests/masTests/Commands/SignInSpec.swift index f7f5d33..ceea01c 100644 --- a/Tests/masTests/Commands/SignInSpec.swift +++ b/Tests/masTests/Commands/SignInSpec.swift @@ -15,13 +15,13 @@ import Quick public class SignInSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } // account command disabled since macOS 10.13 High Sierra https://github.com/mas-cli/mas#known-issues describe("signin command") { it("signs in") { expect { - try Mas.SignIn.parse(["", ""]).run() + try MAS.SignIn.parse(["", ""]).run() } .to(throwError(MASError.notSupported)) } diff --git a/Tests/masTests/Commands/SignOutSpec.swift b/Tests/masTests/Commands/SignOutSpec.swift index a5b5466..7aeaa01 100644 --- a/Tests/masTests/Commands/SignOutSpec.swift +++ b/Tests/masTests/Commands/SignOutSpec.swift @@ -14,12 +14,12 @@ import Quick public class SignOutSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("signout command") { it("signs out") { expect { - try Mas.SignOut.parse([]).run() + try MAS.SignOut.parse([]).run() } .toNot(throwError()) } diff --git a/Tests/masTests/Commands/UninstallSpec.swift b/Tests/masTests/Commands/UninstallSpec.swift index 69cb44e..fbc3c1a 100644 --- a/Tests/masTests/Commands/UninstallSpec.swift +++ b/Tests/masTests/Commands/UninstallSpec.swift @@ -15,7 +15,7 @@ import Quick public class UninstallSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } xdescribe("uninstall command") { let appID: AppID = 12345 @@ -29,7 +29,7 @@ public class UninstallSpec: QuickSpec { let mockLibrary = AppLibraryMock() context("dry run") { - let uninstall = try! Mas.Uninstall.parse(["--dry-run", String(appID)]) + let uninstall = try! MAS.Uninstall.parse(["--dry-run", String(appID)]) beforeEach { mockLibrary.reset() @@ -51,7 +51,7 @@ public class UninstallSpec: QuickSpec { } } context("wet run") { - let uninstall = try! Mas.Uninstall.parse([String(appID)]) + let uninstall = try! MAS.Uninstall.parse([String(appID)]) beforeEach { mockLibrary.reset() diff --git a/Tests/masTests/Commands/UpgradeSpec.swift b/Tests/masTests/Commands/UpgradeSpec.swift index 5c104bb..585e751 100644 --- a/Tests/masTests/Commands/UpgradeSpec.swift +++ b/Tests/masTests/Commands/UpgradeSpec.swift @@ -15,13 +15,13 @@ import Quick public class UpgradeSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("upgrade command") { it("finds no upgrades") { expect { try captureStream(stderr) { - try Mas.Upgrade.parse([]) + try MAS.Upgrade.parse([]) .run(appLibrary: AppLibraryMock(), storeSearch: StoreSearchMock()) } } diff --git a/Tests/masTests/Commands/VendorSpec.swift b/Tests/masTests/Commands/VendorSpec.swift index 624f3a3..a73d1e1 100644 --- a/Tests/masTests/Commands/VendorSpec.swift +++ b/Tests/masTests/Commands/VendorSpec.swift @@ -17,7 +17,7 @@ public class VendorSpec: QuickSpec { let openCommand = OpenSystemCommandMock() beforeSuite { - Mas.initialize() + MAS.initialize() } describe("vendor command") { beforeEach { @@ -25,13 +25,13 @@ public class VendorSpec: QuickSpec { } it("fails to open app with invalid ID") { expect { - try Mas.Vendor.parse(["--", "-999"]).run(storeSearch: storeSearch, openCommand: openCommand) + try MAS.Vendor.parse(["--", "-999"]).run(storeSearch: storeSearch, openCommand: openCommand) } .to(throwError()) } it("can't find app with unknown ID") { expect { - try Mas.Vendor.parse(["999"]).run(storeSearch: storeSearch, openCommand: openCommand) + try MAS.Vendor.parse(["999"]).run(storeSearch: storeSearch, openCommand: openCommand) } .to(throwError(MASError.noSearchResultsFound)) } @@ -44,7 +44,7 @@ public class VendorSpec: QuickSpec { ) storeSearch.apps[mockResult.trackId] = mockResult expect { - try Mas.Vendor.parse([String(mockResult.trackId)]) + try MAS.Vendor.parse([String(mockResult.trackId)]) .run(storeSearch: storeSearch, openCommand: openCommand) return openCommand.arguments } diff --git a/Tests/masTests/Commands/VersionSpec.swift b/Tests/masTests/Commands/VersionSpec.swift index 0828749..ec66b55 100644 --- a/Tests/masTests/Commands/VersionSpec.swift +++ b/Tests/masTests/Commands/VersionSpec.swift @@ -15,13 +15,13 @@ import Quick public class VersionSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("version command") { it("displays the current version") { expect { try captureStream(stdout) { - try Mas.Version.parse([]).run() + try MAS.Version.parse([]).run() } } == "\(Package.version)\n" diff --git a/Tests/masTests/Controllers/MasAppLibrarySpec.swift b/Tests/masTests/Controllers/MasAppLibrarySpec.swift index 69c2cc9..f484eb5 100644 --- a/Tests/masTests/Controllers/MasAppLibrarySpec.swift +++ b/Tests/masTests/Controllers/MasAppLibrarySpec.swift @@ -16,7 +16,7 @@ public class MasAppLibrarySpec: QuickSpec { let library = MasAppLibrary(softwareMap: SoftwareMapMock(products: apps)) beforeSuite { - Mas.initialize() + MAS.initialize() } describe("mas app library") { it("contains all installed apps") { diff --git a/Tests/masTests/Controllers/MasStoreSearchSpec.swift b/Tests/masTests/Controllers/MasStoreSearchSpec.swift index b6ce5df..3d75ff9 100644 --- a/Tests/masTests/Controllers/MasStoreSearchSpec.swift +++ b/Tests/masTests/Controllers/MasStoreSearchSpec.swift @@ -14,7 +14,7 @@ import Quick public class MasStoreSearchSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("url string") { it("contains the app name") { diff --git a/Tests/masTests/Errors/MASErrorTestCase.swift b/Tests/masTests/Errors/MASErrorTestCase.swift index 15cecfc..027a196 100644 --- a/Tests/masTests/Errors/MASErrorTestCase.swift +++ b/Tests/masTests/Errors/MASErrorTestCase.swift @@ -32,7 +32,7 @@ class MASErrorTestCase: XCTestCase { override func setUp() { super.setUp() - Mas.initialize() + MAS.initialize() nserror = NSError(domain: errorDomain, code: 999) localizedDescription = "foo" } diff --git a/Tests/masTests/ExternalCommands/OpenSystemCommandSpec.swift b/Tests/masTests/ExternalCommands/OpenSystemCommandSpec.swift index a9a5f0e..9b8c1f5 100644 --- a/Tests/masTests/ExternalCommands/OpenSystemCommandSpec.swift +++ b/Tests/masTests/ExternalCommands/OpenSystemCommandSpec.swift @@ -14,7 +14,7 @@ import Quick public class OpenSystemCommandSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("open system command") { context("binary path") { diff --git a/Tests/masTests/Formatters/AppListFormatterSpec.swift b/Tests/masTests/Formatters/AppListFormatterSpec.swift index 47b3b18..e8c61d6 100644 --- a/Tests/masTests/Formatters/AppListFormatterSpec.swift +++ b/Tests/masTests/Formatters/AppListFormatterSpec.swift @@ -18,7 +18,7 @@ public class AppListFormatterSpec: QuickSpec { var products: [SoftwareProduct] = [] beforeSuite { - Mas.initialize() + MAS.initialize() } describe("app list formatter") { beforeEach { diff --git a/Tests/masTests/Formatters/SearchResultFormatterSpec.swift b/Tests/masTests/Formatters/SearchResultFormatterSpec.swift index 1689fa0..f35a44d 100644 --- a/Tests/masTests/Formatters/SearchResultFormatterSpec.swift +++ b/Tests/masTests/Formatters/SearchResultFormatterSpec.swift @@ -18,7 +18,7 @@ public class SearchResultFormatterSpec: QuickSpec { var results: [SearchResult] = [] beforeSuite { - Mas.initialize() + MAS.initialize() } describe("search results formatter") { beforeEach { diff --git a/Tests/masTests/Models/SearchResultListSpec.swift b/Tests/masTests/Models/SearchResultListSpec.swift index 2804491..7895b1c 100644 --- a/Tests/masTests/Models/SearchResultListSpec.swift +++ b/Tests/masTests/Models/SearchResultListSpec.swift @@ -15,7 +15,7 @@ import Quick public class SearchResultListSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("search result list") { it("can parse bbedit") { diff --git a/Tests/masTests/Models/SearchResultSpec.swift b/Tests/masTests/Models/SearchResultSpec.swift index 460e961..9462456 100644 --- a/Tests/masTests/Models/SearchResultSpec.swift +++ b/Tests/masTests/Models/SearchResultSpec.swift @@ -15,7 +15,7 @@ import Quick public class SearchResultSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("search result") { it("can parse things") { diff --git a/Tests/masTests/Models/SoftwareProductSpec.swift b/Tests/masTests/Models/SoftwareProductSpec.swift index 80cbde3..ef0e6f1 100644 --- a/Tests/masTests/Models/SoftwareProductSpec.swift +++ b/Tests/masTests/Models/SoftwareProductSpec.swift @@ -15,7 +15,7 @@ import Quick public class SoftwareProductSpec: QuickSpec { override public func spec() { beforeSuite { - Mas.initialize() + MAS.initialize() } describe("software product") { let app = SoftwareProductMock( diff --git a/Tests/masTests/Network/NetworkManagerTests.swift b/Tests/masTests/Network/NetworkManagerTests.swift index 450bb39..751271c 100644 --- a/Tests/masTests/Network/NetworkManagerTests.swift +++ b/Tests/masTests/Network/NetworkManagerTests.swift @@ -13,7 +13,7 @@ import XCTest class NetworkManagerTests: XCTestCase { override func setUp() { super.setUp() - Mas.initialize() + MAS.initialize() } func testSuccessfulAsyncResponse() throws {