From d413d8cfa1568259a84509cfc56c49ea60eafd70 Mon Sep 17 00:00:00 2001 From: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:05:41 -0400 Subject: [PATCH] Move MasKit module to mas. Move MasKitTests module to masTests. Rename MasKit enum as Mas. Upgrade swift-tools-version from 5.3 to 5.6.1. swift-tools-version 5.5+ is necessary to allow test code to import executable target code, to allow MasKit library code to be moved into the mas executable. Upgrade to swift-tools-version to 5.6.1 instead of to 5.5 because they support all the same macOS versions. Standardize comments. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> --- .gitignore | 1 + Package.resolved | 150 +++++++++--------- Package.swift | 24 +-- README.md | 2 +- .../AppStore/CKSoftwareMap+SoftwareMap.swift | 2 +- .../CKSoftwareProduct+SoftwareProduct.swift | 2 +- .../{MasKit => mas}/AppStore/Downloader.swift | 2 +- .../AppStore/ISStoreAccount.swift | 2 +- .../AppStore/PurchaseDownloadObserver.swift | 2 +- .../{MasKit => mas}/AppStore/SSPurchase.swift | 2 +- .../AppStore/StoreAccount.swift | 2 +- .../{MasKit => mas}/Commands/Account.swift | 2 +- Sources/{MasKit => mas}/Commands/Home.swift | 2 +- Sources/{MasKit => mas}/Commands/Info.swift | 2 +- .../{MasKit => mas}/Commands/Install.swift | 2 +- Sources/{MasKit => mas}/Commands/List.swift | 2 +- Sources/{MasKit => mas}/Commands/Lucky.swift | 2 +- Sources/{MasKit => mas}/Commands/Open.swift | 2 +- .../{MasKit => mas}/Commands/Outdated.swift | 2 +- .../{MasKit => mas}/Commands/Purchase.swift | 2 +- Sources/{MasKit => mas}/Commands/Reset.swift | 2 +- Sources/{MasKit => mas}/Commands/Search.swift | 2 +- Sources/{MasKit => mas}/Commands/SignIn.swift | 2 +- .../{MasKit => mas}/Commands/SignOut.swift | 2 +- .../{MasKit => mas}/Commands/Uninstall.swift | 2 +- .../{MasKit => mas}/Commands/Upgrade.swift | 2 +- Sources/{MasKit => mas}/Commands/Vendor.swift | 2 +- .../{MasKit => mas}/Commands/Version.swift | 2 +- .../Controllers/AppLibrary.swift | 2 +- .../Controllers/MasAppLibrary.swift | 2 +- .../Controllers/MasStoreSearch.swift | 2 +- .../Controllers/SoftwareMap.swift | 2 +- .../Controllers/StoreSearch.swift | 2 +- Sources/{MasKit => mas}/Errors/MASError.swift | 2 +- .../ExternalCommands/ExternalCommand.swift | 2 +- .../ExternalCommands/OpenSystemCommand.swift | 2 +- .../SysCtlSystemCommand.swift | 2 +- .../Formatters/AppInfoFormatter.swift | 2 +- .../Formatters/AppListFormatter.swift | 2 +- .../Formatters/SearchResultFormatter.swift | 2 +- .../Formatters/Utilities.swift | 4 +- .../{MasKit/MasKit.swift => mas/Mas.swift} | 6 +- .../{MasKit => mas}/Models/SearchResult.swift | 2 +- .../Models/SearchResultList.swift | 2 +- .../Models/SoftwareProduct.swift | 4 +- .../Network/NetworkManager.swift | 2 +- .../Network/NetworkSession.swift | 2 +- .../Network/URLSession+NetworkSession.swift | 2 +- Sources/mas/main.swift | 5 +- .../{MasKitTests => masTests}/.swiftlint.yml | 2 +- .../Commands/AccountCommandSpec.swift | 6 +- .../Commands/HomeCommandSpec.swift | 6 +- .../Commands/InfoCommandSpec.swift | 6 +- .../Commands/InstallCommandSpec.swift | 6 +- .../Commands/ListCommandSpec.swift | 6 +- .../Commands/LuckyCommandSpec.swift | 6 +- .../Commands/OpenCommandSpec.swift | 6 +- .../Commands/OutdatedCommandSpec.swift | 6 +- .../Commands/PurchaseCommandSpec.swift | 6 +- .../Commands/ResetCommandSpec.swift | 6 +- .../Commands/SearchCommandSpec.swift | 6 +- .../Commands/SignInCommandSpec.swift | 6 +- .../Commands/SignOutCommandSpec.swift | 6 +- .../Commands/UninstallCommandSpec.swift | 6 +- .../Commands/UpgradeCommandSpec.swift | 6 +- .../Commands/VendorCommandSpec.swift | 6 +- .../Commands/VersionCommandSpec.swift | 6 +- .../Controllers/AppLibraryMock.swift | 4 +- .../Controllers/MasAppLibrarySpec.swift | 6 +- .../Controllers/MasStoreSearchSpec.swift | 6 +- .../Controllers/StoreSearchMock.swift | 4 +- .../Errors/MASErrorTestCase.swift | 6 +- .../Extensions/Bundle+JSON.swift | 4 +- .../Extensions/String+FileExtension.swift | 2 +- .../OpenSystemCommandMock.swift | 4 +- .../OpenSystemCommandSpec.swift | 6 +- .../Formatters/AppListFormatterSpec.swift | 6 +- .../SearchResultFormatterSpec.swift | 6 +- .../JSON/lookup/fantastical.json | 0 .../JSON/lookup/notability.json | 0 .../JSON/lookup/slack.json | 0 .../JSON/lookup/things.json | 0 .../JSON/search/bbedit.json | 0 .../JSON/search/bear.json | 0 .../JSON/search/deliveries.json | 0 .../JSON/search/fantastical.json | 0 .../JSON/search/mojave.json | 0 .../JSON/search/nonexistent.json | 0 .../JSON/search/notability.json | 0 .../JSON/search/slack.json | 0 .../JSON/search/things-3.json | 0 .../JSON/search/things-that-go-bump.json | 0 .../JSON/search/things.json | 0 .../JSON/search/tweetbot.json | 0 .../Models/SearchResultListSpec.swift | 6 +- .../Models/SearchResultSpec.swift | 6 +- .../Models/SoftwareProductMock.swift | 4 +- .../Models/SoftwareProductSpec.swift | 6 +- .../Network/NetworkManagerTests.swift | 6 +- .../Network/NetworkSessionMock.swift | 4 +- .../Network/NetworkSessionMockFromFile.swift | 2 +- .../Nimble/ResultPredicates.swift | 4 +- .../OutputListener.swift | 4 +- .../OutputListenerSpec.swift | 6 +- .../{MasKitTests => masTests}/Strongify.swift | 2 +- script/version | 2 +- 106 files changed, 236 insertions(+), 252 deletions(-) rename Sources/{MasKit => mas}/AppStore/CKSoftwareMap+SoftwareMap.swift (97%) rename Sources/{MasKit => mas}/AppStore/CKSoftwareProduct+SoftwareProduct.swift (95%) rename Sources/{MasKit => mas}/AppStore/Downloader.swift (99%) rename Sources/{MasKit => mas}/AppStore/ISStoreAccount.swift (99%) rename Sources/{MasKit => mas}/AppStore/PurchaseDownloadObserver.swift (99%) rename Sources/{MasKit => mas}/AppStore/SSPurchase.swift (99%) rename Sources/{MasKit => mas}/AppStore/StoreAccount.swift (96%) rename Sources/{MasKit => mas}/Commands/Account.swift (98%) rename Sources/{MasKit => mas}/Commands/Home.swift (99%) rename Sources/{MasKit => mas}/Commands/Info.swift (99%) rename Sources/{MasKit => mas}/Commands/Install.swift (99%) rename Sources/{MasKit => mas}/Commands/List.swift (98%) rename Sources/{MasKit => mas}/Commands/Lucky.swift (99%) rename Sources/{MasKit => mas}/Commands/Open.swift (99%) rename Sources/{MasKit => mas}/Commands/Outdated.swift (99%) rename Sources/{MasKit => mas}/Commands/Purchase.swift (99%) rename Sources/{MasKit => mas}/Commands/Reset.swift (99%) rename Sources/{MasKit => mas}/Commands/Search.swift (99%) rename Sources/{MasKit => mas}/Commands/SignIn.swift (99%) rename Sources/{MasKit => mas}/Commands/SignOut.swift (98%) rename Sources/{MasKit => mas}/Commands/Uninstall.swift (99%) rename Sources/{MasKit => mas}/Commands/Upgrade.swift (99%) rename Sources/{MasKit => mas}/Commands/Vendor.swift (99%) rename Sources/{MasKit => mas}/Commands/Version.swift (97%) rename Sources/{MasKit => mas}/Controllers/AppLibrary.swift (99%) rename Sources/{MasKit => mas}/Controllers/MasAppLibrary.swift (99%) rename Sources/{MasKit => mas}/Controllers/MasStoreSearch.swift (99%) rename Sources/{MasKit => mas}/Controllers/SoftwareMap.swift (96%) rename Sources/{MasKit => mas}/Controllers/StoreSearch.swift (99%) rename Sources/{MasKit => mas}/Errors/MASError.swift (99%) rename Sources/{MasKit => mas}/ExternalCommands/ExternalCommand.swift (99%) rename Sources/{MasKit => mas}/ExternalCommands/OpenSystemCommand.swift (97%) rename Sources/{MasKit => mas}/ExternalCommands/SysCtlSystemCommand.swift (98%) rename Sources/{MasKit => mas}/Formatters/AppInfoFormatter.swift (99%) rename Sources/{MasKit => mas}/Formatters/AppListFormatter.swift (99%) rename Sources/{MasKit => mas}/Formatters/SearchResultFormatter.swift (99%) rename Sources/{MasKit => mas}/Formatters/Utilities.swift (98%) rename Sources/{MasKit/MasKit.swift => mas/Mas.swift} (93%) rename Sources/{MasKit => mas}/Models/SearchResult.swift (99%) rename Sources/{MasKit => mas}/Models/SearchResultList.swift (95%) rename Sources/{MasKit => mas}/Models/SoftwareProduct.swift (98%) rename Sources/{MasKit => mas}/Network/NetworkManager.swift (98%) rename Sources/{MasKit => mas}/Network/NetworkSession.swift (95%) rename Sources/{MasKit => mas}/Network/URLSession+NetworkSession.swift (98%) rename Tests/{MasKitTests => masTests}/.swiftlint.yml (91%) rename Tests/{MasKitTests => masTests}/Commands/AccountCommandSpec.swift (90%) rename Tests/{MasKitTests => masTests}/Commands/HomeCommandSpec.swift (96%) rename Tests/{MasKitTests => masTests}/Commands/InfoCommandSpec.swift (96%) rename Tests/{MasKitTests => masTests}/Commands/InstallCommandSpec.swift (88%) rename Tests/{MasKitTests => masTests}/Commands/ListCommandSpec.swift (87%) rename Tests/{MasKitTests => masTests}/Commands/LuckyCommandSpec.swift (91%) rename Tests/{MasKitTests => masTests}/Commands/OpenCommandSpec.swift (96%) rename Tests/{MasKitTests => masTests}/Commands/OutdatedCommandSpec.swift (89%) rename Tests/{MasKitTests => masTests}/Commands/PurchaseCommandSpec.swift (88%) rename Tests/{MasKitTests => masTests}/Commands/ResetCommandSpec.swift (88%) rename Tests/{MasKitTests => masTests}/Commands/SearchCommandSpec.swift (95%) rename Tests/{MasKitTests => masTests}/Commands/SignInCommandSpec.swift (90%) rename Tests/{MasKitTests => masTests}/Commands/SignOutCommandSpec.swift (88%) rename Tests/{MasKitTests => masTests}/Commands/UninstallCommandSpec.swift (97%) rename Tests/{MasKitTests => masTests}/Commands/UpgradeCommandSpec.swift (88%) rename Tests/{MasKitTests => masTests}/Commands/VendorCommandSpec.swift (96%) rename Tests/{MasKitTests => masTests}/Commands/VersionCommandSpec.swift (88%) rename Tests/{MasKitTests => masTests}/Controllers/AppLibraryMock.swift (95%) rename Tests/{MasKitTests => masTests}/Controllers/MasAppLibrarySpec.swift (95%) rename Tests/{MasKitTests => masTests}/Controllers/MasStoreSearchSpec.swift (97%) rename Tests/{MasKitTests => masTests}/Controllers/StoreSearchMock.swift (95%) rename Tests/{MasKitTests => masTests}/Errors/MASErrorTestCase.swift (98%) rename Tests/{MasKitTests => masTests}/Extensions/Bundle+JSON.swift (95%) rename Tests/{MasKitTests => masTests}/Extensions/String+FileExtension.swift (96%) rename Tests/{MasKitTests => masTests}/ExternalCommands/OpenSystemCommandMock.swift (92%) rename Tests/{MasKitTests => masTests}/ExternalCommands/OpenSystemCommandSpec.swift (91%) rename Tests/{MasKitTests => masTests}/Formatters/AppListFormatterSpec.swift (96%) rename Tests/{MasKitTests => masTests}/Formatters/SearchResultFormatterSpec.swift (97%) rename Tests/{MasKitTests => masTests}/JSON/lookup/fantastical.json (100%) rename Tests/{MasKitTests => masTests}/JSON/lookup/notability.json (100%) rename Tests/{MasKitTests => masTests}/JSON/lookup/slack.json (100%) rename Tests/{MasKitTests => masTests}/JSON/lookup/things.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/bbedit.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/bear.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/deliveries.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/fantastical.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/mojave.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/nonexistent.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/notability.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/slack.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/things-3.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/things-that-go-bump.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/things.json (100%) rename Tests/{MasKitTests => masTests}/JSON/search/tweetbot.json (100%) rename Tests/{MasKitTests => masTests}/Models/SearchResultListSpec.swift (92%) rename Tests/{MasKitTests => masTests}/Models/SearchResultSpec.swift (90%) rename Tests/{MasKitTests => masTests}/Models/SoftwareProductMock.swift (89%) rename Tests/{MasKitTests => masTests}/Models/SoftwareProductSpec.swift (95%) rename Tests/{MasKitTests => masTests}/Network/NetworkManagerTests.swift (97%) rename Tests/{MasKitTests => masTests}/Network/NetworkSessionMock.swift (95%) rename Tests/{MasKitTests => masTests}/Network/NetworkSessionMockFromFile.swift (98%) rename Tests/{MasKitTests => masTests}/Nimble/ResultPredicates.swift (96%) rename Tests/{MasKitTests => masTests}/OutputListener.swift (93%) rename Tests/{MasKitTests => masTests}/OutputListenerSpec.swift (92%) rename Tests/{MasKitTests => masTests}/Strongify.swift (95%) diff --git a/.gitignore b/.gitignore index 1f92665..70f7959 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,5 @@ build/ default.profraw releases/ xcuserdata +Sources/mas/Package.swift Sources/MasKit/Package.swift diff --git a/Package.resolved b/Package.resolved index 6952cad..a4d32c7 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,79 +1,77 @@ { - "object": { - "pins": [ - { - "package": "Commandant", - "repositoryURL": "https://github.com/Carthage/Commandant.git", - "state": { - "branch": null, - "revision": "a1671cf728db837cf5ec1980a80d276bbba748f6", - "version": "0.18.0" - } - }, - { - "package": "CwlCatchException", - "repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", - "state": { - "branch": null, - "revision": "35f9e770f54ce62dd8526470f14c6e137cef3eea", - "version": "2.1.1" - } - }, - { - "package": "CwlPreconditionTesting", - "repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", - "state": { - "branch": null, - "revision": "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688", - "version": "2.1.0" - } - }, - { - "package": "Nimble", - "repositoryURL": "https://github.com/Quick/Nimble.git", - "state": { - "branch": null, - "revision": "1f3bde57bde12f5e7b07909848c071e9b73d6edc", - "version": "10.0.0" - } - }, - { - "package": "PromiseKit", - "repositoryURL": "https://github.com/mxcl/PromiseKit.git", - "state": { - "branch": null, - "revision": "43772616c46a44a9977e41924ae01d0e55f2f9ca", - "version": "6.18.1" - } - }, - { - "package": "Quick", - "repositoryURL": "https://github.com/Quick/Quick.git", - "state": { - "branch": null, - "revision": "f9d519828bb03dfc8125467d8f7b93131951124c", - "version": "5.0.1" - } - }, - { - "package": "Regex", - "repositoryURL": "https://github.com/sharplet/Regex.git", - "state": { - "branch": null, - "revision": "76c2b73d4281d77fc3118391877efd1bf972f515", - "version": "2.1.1" - } - }, - { - "package": "Version", - "repositoryURL": "https://github.com/mxcl/Version.git", - "state": { - "branch": null, - "revision": "1fe824b80d89201652e7eca7c9252269a1d85e25", - "version": "2.0.1" - } + "pins" : [ + { + "identity" : "commandant", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Carthage/Commandant.git", + "state" : { + "revision" : "a1671cf728db837cf5ec1980a80d276bbba748f6", + "version" : "0.18.0" } - ] - }, - "version": 1 + }, + { + "identity" : "cwlcatchexception", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mattgallagher/CwlCatchException.git", + "state" : { + "revision" : "35f9e770f54ce62dd8526470f14c6e137cef3eea", + "version" : "2.1.1" + } + }, + { + "identity" : "cwlpreconditiontesting", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git", + "state" : { + "revision" : "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688", + "version" : "2.1.0" + } + }, + { + "identity" : "nimble", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Quick/Nimble.git", + "state" : { + "revision" : "1f3bde57bde12f5e7b07909848c071e9b73d6edc", + "version" : "10.0.0" + } + }, + { + "identity" : "promisekit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mxcl/PromiseKit.git", + "state" : { + "revision" : "43772616c46a44a9977e41924ae01d0e55f2f9ca", + "version" : "6.18.1" + } + }, + { + "identity" : "quick", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Quick/Quick.git", + "state" : { + "revision" : "f9d519828bb03dfc8125467d8f7b93131951124c", + "version" : "5.0.1" + } + }, + { + "identity" : "regex", + "kind" : "remoteSourceControl", + "location" : "https://github.com/sharplet/Regex.git", + "state" : { + "revision" : "76c2b73d4281d77fc3118391877efd1bf972f515", + "version" : "2.1.1" + } + }, + { + "identity" : "version", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mxcl/Version.git", + "state" : { + "revision" : "1fe824b80d89201652e7eca7c9252269a1d85e25", + "version" : "2.0.1" + } + } + ], + "version" : 2 } diff --git a/Package.swift b/Package.swift index 2df3ba1..402c576 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.6.1 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -13,11 +13,7 @@ let package = Package( .executable( name: "mas", targets: ["mas"] - ), - .library( - name: "MasKit", - targets: ["MasKit"] - ), + ) ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -31,18 +27,8 @@ let package = Package( targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. - .target( + .executableTarget( name: "mas", - dependencies: ["MasKit"], - swiftSettings: [ - .unsafeFlags([ - "-I", "Sources/PrivateFrameworks/CommerceKit", - "-I", "Sources/PrivateFrameworks/StoreFoundation", - ]) - ] - ), - .target( - name: "MasKit", dependencies: [ "Commandant", "PromiseKit", @@ -62,8 +48,8 @@ let package = Package( ] ), .testTarget( - name: "MasKitTests", - dependencies: ["MasKit", "Nimble", "Quick"], + name: "masTests", + dependencies: ["mas", "Nimble", "Quick"], resources: [.copy("JSON")], swiftSettings: [ .unsafeFlags([ diff --git a/README.md b/README.md index 6bf0ebe..8b76753 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,7 @@ Build output can be found in the `.build/` directory within the project. The tests in this project are a recent work-in-progress. Since Xcode does not officially support tests for command-line tool targets, -all logic is part of the MasKit target with tests in MasKitTests. +all logic is part of the mas target with tests in masTests. Tests are written using [Quick]. ```bash diff --git a/Sources/MasKit/AppStore/CKSoftwareMap+SoftwareMap.swift b/Sources/mas/AppStore/CKSoftwareMap+SoftwareMap.swift similarity index 97% rename from Sources/MasKit/AppStore/CKSoftwareMap+SoftwareMap.swift rename to Sources/mas/AppStore/CKSoftwareMap+SoftwareMap.swift index 5993e4d..dde4535 100644 --- a/Sources/MasKit/AppStore/CKSoftwareMap+SoftwareMap.swift +++ b/Sources/mas/AppStore/CKSoftwareMap+SoftwareMap.swift @@ -1,6 +1,6 @@ // // CKSoftwareMap+SoftwareMap.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/27/18. // Copyright © 2018 mas-cli. All rights reserved. diff --git a/Sources/MasKit/AppStore/CKSoftwareProduct+SoftwareProduct.swift b/Sources/mas/AppStore/CKSoftwareProduct+SoftwareProduct.swift similarity index 95% rename from Sources/MasKit/AppStore/CKSoftwareProduct+SoftwareProduct.swift rename to Sources/mas/AppStore/CKSoftwareProduct+SoftwareProduct.swift index 8bcafcf..9516bac 100644 --- a/Sources/MasKit/AppStore/CKSoftwareProduct+SoftwareProduct.swift +++ b/Sources/mas/AppStore/CKSoftwareProduct+SoftwareProduct.swift @@ -1,6 +1,6 @@ // // CKSoftwareProduct+SoftwareProduct.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/27/18. // Copyright © 2018 mas-cli. All rights reserved. diff --git a/Sources/MasKit/AppStore/Downloader.swift b/Sources/mas/AppStore/Downloader.swift similarity index 99% rename from Sources/MasKit/AppStore/Downloader.swift rename to Sources/mas/AppStore/Downloader.swift index 2208869..b832335 100644 --- a/Sources/MasKit/AppStore/Downloader.swift +++ b/Sources/mas/AppStore/Downloader.swift @@ -1,6 +1,6 @@ // // Downloader.swift -// mas-cli +// mas // // Created by Andrew Naylor on 21/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/AppStore/ISStoreAccount.swift b/Sources/mas/AppStore/ISStoreAccount.swift similarity index 99% rename from Sources/MasKit/AppStore/ISStoreAccount.swift rename to Sources/mas/AppStore/ISStoreAccount.swift index ae62f10..7dcfd30 100644 --- a/Sources/MasKit/AppStore/ISStoreAccount.swift +++ b/Sources/mas/AppStore/ISStoreAccount.swift @@ -1,6 +1,6 @@ // // ISStoreAccount.swift -// mas-cli +// mas // // Created by Andrew Naylor on 22/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/AppStore/PurchaseDownloadObserver.swift b/Sources/mas/AppStore/PurchaseDownloadObserver.swift similarity index 99% rename from Sources/MasKit/AppStore/PurchaseDownloadObserver.swift rename to Sources/mas/AppStore/PurchaseDownloadObserver.swift index 355a91a..343b49c 100644 --- a/Sources/MasKit/AppStore/PurchaseDownloadObserver.swift +++ b/Sources/mas/AppStore/PurchaseDownloadObserver.swift @@ -1,6 +1,6 @@ // // PurchaseDownloadObserver.swift -// mas-cli +// mas // // Created by Andrew Naylor on 21/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/AppStore/SSPurchase.swift b/Sources/mas/AppStore/SSPurchase.swift similarity index 99% rename from Sources/MasKit/AppStore/SSPurchase.swift rename to Sources/mas/AppStore/SSPurchase.swift index c29a16f..3fd5703 100644 --- a/Sources/MasKit/AppStore/SSPurchase.swift +++ b/Sources/mas/AppStore/SSPurchase.swift @@ -1,6 +1,6 @@ // // SSPurchase.swift -// mas-cli +// mas // // Created by Andrew Naylor on 25/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/AppStore/StoreAccount.swift b/Sources/mas/AppStore/StoreAccount.swift similarity index 96% rename from Sources/MasKit/AppStore/StoreAccount.swift rename to Sources/mas/AppStore/StoreAccount.swift index 366cd6e..f434166 100644 --- a/Sources/MasKit/AppStore/StoreAccount.swift +++ b/Sources/mas/AppStore/StoreAccount.swift @@ -1,6 +1,6 @@ // // StoreAccount.swift -// mas-cli +// mas // // Created by Ben Chatelain on 4/3/18. // Copyright © 2018 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Account.swift b/Sources/mas/Commands/Account.swift similarity index 98% rename from Sources/MasKit/Commands/Account.swift rename to Sources/mas/Commands/Account.swift index 333e2d2..6e58cb2 100644 --- a/Sources/MasKit/Commands/Account.swift +++ b/Sources/mas/Commands/Account.swift @@ -1,6 +1,6 @@ // // Account.swift -// mas-cli +// mas // // Created by Andrew Naylor on 21/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Home.swift b/Sources/mas/Commands/Home.swift similarity index 99% rename from Sources/MasKit/Commands/Home.swift rename to Sources/mas/Commands/Home.swift index f3f6bbb..896ae30 100644 --- a/Sources/MasKit/Commands/Home.swift +++ b/Sources/mas/Commands/Home.swift @@ -1,6 +1,6 @@ // // Home.swift -// mas-cli +// mas // // Created by Ben Chatelain on 2018-12-29. // Copyright © 2016 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Commands/Info.swift b/Sources/mas/Commands/Info.swift similarity index 99% rename from Sources/MasKit/Commands/Info.swift rename to Sources/mas/Commands/Info.swift index 82974dc..5530c4d 100644 --- a/Sources/MasKit/Commands/Info.swift +++ b/Sources/mas/Commands/Info.swift @@ -1,6 +1,6 @@ // // Info.swift -// mas-cli +// mas // // Created by Denis Lebedev on 21/10/2016. // Copyright © 2016 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Install.swift b/Sources/mas/Commands/Install.swift similarity index 99% rename from Sources/MasKit/Commands/Install.swift rename to Sources/mas/Commands/Install.swift index f941cbf..12b5378 100644 --- a/Sources/MasKit/Commands/Install.swift +++ b/Sources/mas/Commands/Install.swift @@ -1,6 +1,6 @@ // // Install.swift -// mas-cli +// mas // // Created by Andrew Naylor on 21/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/List.swift b/Sources/mas/Commands/List.swift similarity index 98% rename from Sources/MasKit/Commands/List.swift rename to Sources/mas/Commands/List.swift index 23752e7..e280a4b 100644 --- a/Sources/MasKit/Commands/List.swift +++ b/Sources/mas/Commands/List.swift @@ -1,6 +1,6 @@ // // List.swift -// mas-cli +// mas // // Created by Andrew Naylor on 21/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Lucky.swift b/Sources/mas/Commands/Lucky.swift similarity index 99% rename from Sources/MasKit/Commands/Lucky.swift rename to Sources/mas/Commands/Lucky.swift index 9452eba..f1c7805 100644 --- a/Sources/MasKit/Commands/Lucky.swift +++ b/Sources/mas/Commands/Lucky.swift @@ -1,6 +1,6 @@ // // Lucky.swift -// mas-cli +// mas // // Created by Pablo Varela on 05/11/17. // Copyright © 2016 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Open.swift b/Sources/mas/Commands/Open.swift similarity index 99% rename from Sources/MasKit/Commands/Open.swift rename to Sources/mas/Commands/Open.swift index 85e04db..1a0817e 100644 --- a/Sources/MasKit/Commands/Open.swift +++ b/Sources/mas/Commands/Open.swift @@ -1,6 +1,6 @@ // // Open.swift -// mas-cli +// mas // // Created by Ben Chatelain on 2018-12-29. // Copyright © 2016 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Commands/Outdated.swift b/Sources/mas/Commands/Outdated.swift similarity index 99% rename from Sources/MasKit/Commands/Outdated.swift rename to Sources/mas/Commands/Outdated.swift index ed3545f..893b4b7 100644 --- a/Sources/MasKit/Commands/Outdated.swift +++ b/Sources/mas/Commands/Outdated.swift @@ -1,6 +1,6 @@ // // Outdated.swift -// mas-cli +// mas // // Created by Andrew Naylor on 21/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Purchase.swift b/Sources/mas/Commands/Purchase.swift similarity index 99% rename from Sources/MasKit/Commands/Purchase.swift rename to Sources/mas/Commands/Purchase.swift index 9138027..77df061 100644 --- a/Sources/MasKit/Commands/Purchase.swift +++ b/Sources/mas/Commands/Purchase.swift @@ -1,6 +1,6 @@ // // Purchase.swift -// mas-cli +// mas // // Created by Jakob Rieck on 24/10/2017. // Copyright (c) 2017 Jakob Rieck. All rights reserved. diff --git a/Sources/MasKit/Commands/Reset.swift b/Sources/mas/Commands/Reset.swift similarity index 99% rename from Sources/MasKit/Commands/Reset.swift rename to Sources/mas/Commands/Reset.swift index 37d6c2d..cefcaf2 100644 --- a/Sources/MasKit/Commands/Reset.swift +++ b/Sources/mas/Commands/Reset.swift @@ -1,6 +1,6 @@ // // Reset.swift -// mas-cli +// mas // // Created by Andrew Naylor on 14/09/2016. // Copyright © 2016 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Search.swift b/Sources/mas/Commands/Search.swift similarity index 99% rename from Sources/MasKit/Commands/Search.swift rename to Sources/mas/Commands/Search.swift index cc0f2c7..3d2af78 100644 --- a/Sources/MasKit/Commands/Search.swift +++ b/Sources/mas/Commands/Search.swift @@ -1,6 +1,6 @@ // // Search.swift -// mas-cli +// mas // // Created by Michael Schneider on 4/14/16. // Copyright © 2016 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/SignIn.swift b/Sources/mas/Commands/SignIn.swift similarity index 99% rename from Sources/MasKit/Commands/SignIn.swift rename to Sources/mas/Commands/SignIn.swift index e04769e..8ed6d1c 100644 --- a/Sources/MasKit/Commands/SignIn.swift +++ b/Sources/mas/Commands/SignIn.swift @@ -1,6 +1,6 @@ // // SignIn.swift -// mas-cli +// mas // // Created by Andrew Naylor on 14/02/2016. // Copyright © 2016 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/SignOut.swift b/Sources/mas/Commands/SignOut.swift similarity index 98% rename from Sources/MasKit/Commands/SignOut.swift rename to Sources/mas/Commands/SignOut.swift index b222b8c..65e213a 100644 --- a/Sources/MasKit/Commands/SignOut.swift +++ b/Sources/mas/Commands/SignOut.swift @@ -1,6 +1,6 @@ // // SignOut.swift -// mas-cli +// mas // // Created by Andrew Naylor on 14/02/2016. // Copyright © 2016 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Uninstall.swift b/Sources/mas/Commands/Uninstall.swift similarity index 99% rename from Sources/MasKit/Commands/Uninstall.swift rename to Sources/mas/Commands/Uninstall.swift index 97d3767..0f3570e 100644 --- a/Sources/MasKit/Commands/Uninstall.swift +++ b/Sources/mas/Commands/Uninstall.swift @@ -1,6 +1,6 @@ // // Uninstall.swift -// mas-cli +// mas // // Created by Ben Chatelain on 2018-12-27. // Copyright © 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Upgrade.swift b/Sources/mas/Commands/Upgrade.swift similarity index 99% rename from Sources/MasKit/Commands/Upgrade.swift rename to Sources/mas/Commands/Upgrade.swift index 1acf0f0..a6ba781 100644 --- a/Sources/MasKit/Commands/Upgrade.swift +++ b/Sources/mas/Commands/Upgrade.swift @@ -1,6 +1,6 @@ // // Upgrade.swift -// mas-cli +// mas // // Created by Andrew Naylor on 30/12/2015. // Copyright © 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Commands/Vendor.swift b/Sources/mas/Commands/Vendor.swift similarity index 99% rename from Sources/MasKit/Commands/Vendor.swift rename to Sources/mas/Commands/Vendor.swift index 0fe8401..f0f45f5 100644 --- a/Sources/MasKit/Commands/Vendor.swift +++ b/Sources/mas/Commands/Vendor.swift @@ -1,6 +1,6 @@ // // Vendor.swift -// mas-cli +// mas // // Created by Ben Chatelain on 2018-12-29. // Copyright © 2016 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Commands/Version.swift b/Sources/mas/Commands/Version.swift similarity index 97% rename from Sources/MasKit/Commands/Version.swift rename to Sources/mas/Commands/Version.swift index d166170..1d2d580 100644 --- a/Sources/MasKit/Commands/Version.swift +++ b/Sources/mas/Commands/Version.swift @@ -1,6 +1,6 @@ // // Version.swift -// mas-cli +// mas // // Created by Andrew Naylor on 20/09/2015. // Copyright © 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/Controllers/AppLibrary.swift b/Sources/mas/Controllers/AppLibrary.swift similarity index 99% rename from Sources/MasKit/Controllers/AppLibrary.swift rename to Sources/mas/Controllers/AppLibrary.swift index 2edbc89..d481a52 100644 --- a/Sources/MasKit/Controllers/AppLibrary.swift +++ b/Sources/mas/Controllers/AppLibrary.swift @@ -1,6 +1,6 @@ // // AppLibrary.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/27/18. // Copyright © 2018 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Controllers/MasAppLibrary.swift b/Sources/mas/Controllers/MasAppLibrary.swift similarity index 99% rename from Sources/MasKit/Controllers/MasAppLibrary.swift rename to Sources/mas/Controllers/MasAppLibrary.swift index 7cc86c5..d842194 100644 --- a/Sources/MasKit/Controllers/MasAppLibrary.swift +++ b/Sources/mas/Controllers/MasAppLibrary.swift @@ -1,6 +1,6 @@ // // MasAppLibrary.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/27/18. // Copyright © 2018 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Controllers/MasStoreSearch.swift b/Sources/mas/Controllers/MasStoreSearch.swift similarity index 99% rename from Sources/MasKit/Controllers/MasStoreSearch.swift rename to Sources/mas/Controllers/MasStoreSearch.swift index 0db3268..dda28f8 100644 --- a/Sources/MasKit/Controllers/MasStoreSearch.swift +++ b/Sources/mas/Controllers/MasStoreSearch.swift @@ -1,6 +1,6 @@ // // MasStoreSearch.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/29/18. // Copyright © 2018 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Controllers/SoftwareMap.swift b/Sources/mas/Controllers/SoftwareMap.swift similarity index 96% rename from Sources/MasKit/Controllers/SoftwareMap.swift rename to Sources/mas/Controllers/SoftwareMap.swift index 0294abe..46abea8 100644 --- a/Sources/MasKit/Controllers/SoftwareMap.swift +++ b/Sources/mas/Controllers/SoftwareMap.swift @@ -1,6 +1,6 @@ // // SoftwareMap.swift -// MasKit +// mas // // Created by Ben Chatelain on 3/1/20. // Copyright © 2020 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Controllers/StoreSearch.swift b/Sources/mas/Controllers/StoreSearch.swift similarity index 99% rename from Sources/MasKit/Controllers/StoreSearch.swift rename to Sources/mas/Controllers/StoreSearch.swift index f4866bb..c326699 100644 --- a/Sources/MasKit/Controllers/StoreSearch.swift +++ b/Sources/mas/Controllers/StoreSearch.swift @@ -1,6 +1,6 @@ // // StoreSearch.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/29/18. // Copyright © 2018 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Errors/MASError.swift b/Sources/mas/Errors/MASError.swift similarity index 99% rename from Sources/MasKit/Errors/MASError.swift rename to Sources/mas/Errors/MASError.swift index 7fb0fb2..9008c78 100644 --- a/Sources/MasKit/Errors/MASError.swift +++ b/Sources/mas/Errors/MASError.swift @@ -1,6 +1,6 @@ // // MASError.swift -// mas-cli +// mas // // Created by Andrew Naylor on 21/08/2015. // Copyright (c) 2015 Andrew Naylor. All rights reserved. diff --git a/Sources/MasKit/ExternalCommands/ExternalCommand.swift b/Sources/mas/ExternalCommands/ExternalCommand.swift similarity index 99% rename from Sources/MasKit/ExternalCommands/ExternalCommand.swift rename to Sources/mas/ExternalCommands/ExternalCommand.swift index 785bc84..40946be 100644 --- a/Sources/MasKit/ExternalCommands/ExternalCommand.swift +++ b/Sources/mas/ExternalCommands/ExternalCommand.swift @@ -1,6 +1,6 @@ // // ExternalCommand.swift -// MasKit +// mas // // Created by Ben Chatelain on 1/1/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Sources/MasKit/ExternalCommands/OpenSystemCommand.swift b/Sources/mas/ExternalCommands/OpenSystemCommand.swift similarity index 97% rename from Sources/MasKit/ExternalCommands/OpenSystemCommand.swift rename to Sources/mas/ExternalCommands/OpenSystemCommand.swift index eddb2d6..ebce90d 100644 --- a/Sources/MasKit/ExternalCommands/OpenSystemCommand.swift +++ b/Sources/mas/ExternalCommands/OpenSystemCommand.swift @@ -1,6 +1,6 @@ // // OpenSystemCommand.swift -// MasKit +// mas // // Created by Ben Chatelain on 1/2/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Sources/MasKit/ExternalCommands/SysCtlSystemCommand.swift b/Sources/mas/ExternalCommands/SysCtlSystemCommand.swift similarity index 98% rename from Sources/MasKit/ExternalCommands/SysCtlSystemCommand.swift rename to Sources/mas/ExternalCommands/SysCtlSystemCommand.swift index 3c2a401..41d3dcb 100644 --- a/Sources/MasKit/ExternalCommands/SysCtlSystemCommand.swift +++ b/Sources/mas/ExternalCommands/SysCtlSystemCommand.swift @@ -1,6 +1,6 @@ // // SysCtlSystemCommand.swift -// MasKit +// mas // // Created by Chris Araman on 6/3/21. // Copyright © 2021 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Formatters/AppInfoFormatter.swift b/Sources/mas/Formatters/AppInfoFormatter.swift similarity index 99% rename from Sources/MasKit/Formatters/AppInfoFormatter.swift rename to Sources/mas/Formatters/AppInfoFormatter.swift index 6810cfd..3d5f114 100644 --- a/Sources/MasKit/Formatters/AppInfoFormatter.swift +++ b/Sources/mas/Formatters/AppInfoFormatter.swift @@ -1,6 +1,6 @@ // // AppInfoFormatter.swift -// MasKit +// mas // // Created by Ben Chatelain on 1/7/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Formatters/AppListFormatter.swift b/Sources/mas/Formatters/AppListFormatter.swift similarity index 99% rename from Sources/MasKit/Formatters/AppListFormatter.swift rename to Sources/mas/Formatters/AppListFormatter.swift index 21c915c..5edd055 100644 --- a/Sources/MasKit/Formatters/AppListFormatter.swift +++ b/Sources/mas/Formatters/AppListFormatter.swift @@ -1,6 +1,6 @@ // // AppListFormatter.swift -// MasKit +// mas // // Created by Ben Chatelain on 6/7/20. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Formatters/SearchResultFormatter.swift b/Sources/mas/Formatters/SearchResultFormatter.swift similarity index 99% rename from Sources/MasKit/Formatters/SearchResultFormatter.swift rename to Sources/mas/Formatters/SearchResultFormatter.swift index cd0061e..15fa4aa 100644 --- a/Sources/MasKit/Formatters/SearchResultFormatter.swift +++ b/Sources/mas/Formatters/SearchResultFormatter.swift @@ -1,6 +1,6 @@ // // SearchResultFormatter.swift -// MasKit +// mas // // Created by Ben Chatelain on 1/11/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Formatters/Utilities.swift b/Sources/mas/Formatters/Utilities.swift similarity index 98% rename from Sources/MasKit/Formatters/Utilities.swift rename to Sources/mas/Formatters/Utilities.swift index 33f3b67..7092d57 100644 --- a/Sources/MasKit/Formatters/Utilities.swift +++ b/Sources/mas/Formatters/Utilities.swift @@ -1,6 +1,6 @@ // // Utilities.swift -// mas-cli +// mas // // Created by Andrew Naylor on 14/09/2016. // Copyright © 2016 Andrew Naylor. All rights reserved. @@ -18,7 +18,7 @@ let csi = "\u{001B}[" var printObserver: ((String) -> Void)? // Override global print for testability. - // See MasKitTests/OutputListener.swift. + // See masTests/OutputListener.swift. func print( _ items: Any..., separator: String = " ", diff --git a/Sources/MasKit/MasKit.swift b/Sources/mas/Mas.swift similarity index 93% rename from Sources/MasKit/MasKit.swift rename to Sources/mas/Mas.swift index 20708db..5000efe 100644 --- a/Sources/MasKit/MasKit.swift +++ b/Sources/mas/Mas.swift @@ -1,6 +1,6 @@ // -// MasKit.swift -// MasKit +// Mas.swift +// mas // // Created by Chris Araman on 4/22/21. // Copyright © 2021 mas-cli. All rights reserved. @@ -8,7 +8,7 @@ import PromiseKit -public enum MasKit { +public enum Mas { public static func initialize() { PromiseKit.conf.Q.map = .global() PromiseKit.conf.Q.return = .global() diff --git a/Sources/MasKit/Models/SearchResult.swift b/Sources/mas/Models/SearchResult.swift similarity index 99% rename from Sources/MasKit/Models/SearchResult.swift rename to Sources/mas/Models/SearchResult.swift index b2ccd6b..7ac757b 100644 --- a/Sources/MasKit/Models/SearchResult.swift +++ b/Sources/mas/Models/SearchResult.swift @@ -1,6 +1,6 @@ // // SearchResult.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/29/18. // Copyright © 2018 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Models/SearchResultList.swift b/Sources/mas/Models/SearchResultList.swift similarity index 95% rename from Sources/MasKit/Models/SearchResultList.swift rename to Sources/mas/Models/SearchResultList.swift index cd29756..68f40d1 100644 --- a/Sources/MasKit/Models/SearchResultList.swift +++ b/Sources/mas/Models/SearchResultList.swift @@ -1,6 +1,6 @@ // // SearchResultList.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/29/18. // Copyright © 2018 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Models/SoftwareProduct.swift b/Sources/mas/Models/SoftwareProduct.swift similarity index 98% rename from Sources/MasKit/Models/SoftwareProduct.swift rename to Sources/mas/Models/SoftwareProduct.swift index 6ce7180..aa49d81 100644 --- a/Sources/MasKit/Models/SoftwareProduct.swift +++ b/Sources/mas/Models/SoftwareProduct.swift @@ -1,6 +1,6 @@ // // SoftwareProduct.swift -// MasKit +// mas // // Created by Ben Chatelain on 12/27/18. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Foundation import Version -/// Protocol describing the members of CKSoftwareProduct used throughout MasKit. +/// Protocol describing the members of CKSoftwareProduct used throughout mas. protocol SoftwareProduct { var appName: String { get } var bundleIdentifier: String { get set } diff --git a/Sources/MasKit/Network/NetworkManager.swift b/Sources/mas/Network/NetworkManager.swift similarity index 98% rename from Sources/MasKit/Network/NetworkManager.swift rename to Sources/mas/Network/NetworkManager.swift index 7333612..45fa7b8 100644 --- a/Sources/MasKit/Network/NetworkManager.swift +++ b/Sources/mas/Network/NetworkManager.swift @@ -1,6 +1,6 @@ // // NetworkManager.swift -// MasKit +// mas // // Created by Ben Chatelain on 1/5/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Network/NetworkSession.swift b/Sources/mas/Network/NetworkSession.swift similarity index 95% rename from Sources/MasKit/Network/NetworkSession.swift rename to Sources/mas/Network/NetworkSession.swift index 28cd649..af590ce 100644 --- a/Sources/MasKit/Network/NetworkSession.swift +++ b/Sources/mas/Network/NetworkSession.swift @@ -1,6 +1,6 @@ // // NetworkSession.swift -// MasKit +// mas // // Created by Ben Chatelain on 1/5/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Sources/MasKit/Network/URLSession+NetworkSession.swift b/Sources/mas/Network/URLSession+NetworkSession.swift similarity index 98% rename from Sources/MasKit/Network/URLSession+NetworkSession.swift rename to Sources/mas/Network/URLSession+NetworkSession.swift index 7c15df0..04db152 100644 --- a/Sources/MasKit/Network/URLSession+NetworkSession.swift +++ b/Sources/mas/Network/URLSession+NetworkSession.swift @@ -1,6 +1,6 @@ // // URLSession+NetworkSession.swift -// MasKit +// mas // // Created by Ben Chatelain on 1/5/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Sources/mas/main.swift b/Sources/mas/main.swift index e872960..3c0776e 100644 --- a/Sources/mas/main.swift +++ b/Sources/mas/main.swift @@ -1,15 +1,14 @@ // // main.swift -// mas-cli +// mas // // Created by Andrew Naylor on 11/07/2015. // Copyright © 2015 Andrew Naylor. All rights reserved. // import Commandant -import MasKit -MasKit.initialize() +Mas.initialize() let registry = CommandRegistry() let helpCommand = HelpCommand(registry: registry) diff --git a/Tests/MasKitTests/.swiftlint.yml b/Tests/masTests/.swiftlint.yml similarity index 91% rename from Tests/MasKitTests/.swiftlint.yml rename to Tests/masTests/.swiftlint.yml index daa6dd0..d234b91 100644 --- a/Tests/MasKitTests/.swiftlint.yml +++ b/Tests/masTests/.swiftlint.yml @@ -1,6 +1,6 @@ # # .swiftlint.yml -# MasKitTests +# masTests # # https://github.com/realm/SwiftLint#configuration # diff --git a/Tests/MasKitTests/Commands/AccountCommandSpec.swift b/Tests/masTests/Commands/AccountCommandSpec.swift similarity index 90% rename from Tests/MasKitTests/Commands/AccountCommandSpec.swift rename to Tests/masTests/Commands/AccountCommandSpec.swift index b78f16e..73a187f 100644 --- a/Tests/MasKitTests/Commands/AccountCommandSpec.swift +++ b/Tests/masTests/Commands/AccountCommandSpec.swift @@ -1,6 +1,6 @@ // // AccountCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,13 +9,13 @@ import Nimble import Quick -@testable import MasKit +@testable import mas // Deprecated test public class AccountCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } // account command disabled since macOS 12 Monterey https://github.com/mas-cli/mas#%EF%B8%8F-known-issues xdescribe("Account command") { diff --git a/Tests/MasKitTests/Commands/HomeCommandSpec.swift b/Tests/masTests/Commands/HomeCommandSpec.swift similarity index 96% rename from Tests/MasKitTests/Commands/HomeCommandSpec.swift rename to Tests/masTests/Commands/HomeCommandSpec.swift index ece1252..bfbe5c4 100644 --- a/Tests/MasKitTests/Commands/HomeCommandSpec.swift +++ b/Tests/masTests/Commands/HomeCommandSpec.swift @@ -1,6 +1,6 @@ // // HomeCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-29. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class HomeCommandSpec: QuickSpec { override public func spec() { @@ -23,7 +23,7 @@ public class HomeCommandSpec: QuickSpec { let cmd = HomeCommand(storeSearch: storeSearch, openCommand: openCommand) beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("home command") { beforeEach { diff --git a/Tests/MasKitTests/Commands/InfoCommandSpec.swift b/Tests/masTests/Commands/InfoCommandSpec.swift similarity index 96% rename from Tests/MasKitTests/Commands/InfoCommandSpec.swift rename to Tests/masTests/Commands/InfoCommandSpec.swift index b2bdc9c..2cd8982 100644 --- a/Tests/MasKitTests/Commands/InfoCommandSpec.swift +++ b/Tests/masTests/Commands/InfoCommandSpec.swift @@ -1,6 +1,6 @@ // // InfoCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class InfoCommandSpec: QuickSpec { override public func spec() { @@ -37,7 +37,7 @@ public class InfoCommandSpec: QuickSpec { """ beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("Info command") { beforeEach { diff --git a/Tests/MasKitTests/Commands/InstallCommandSpec.swift b/Tests/masTests/Commands/InstallCommandSpec.swift similarity index 88% rename from Tests/MasKitTests/Commands/InstallCommandSpec.swift rename to Tests/masTests/Commands/InstallCommandSpec.swift index a870649..a3a009e 100644 --- a/Tests/MasKitTests/Commands/InstallCommandSpec.swift +++ b/Tests/masTests/Commands/InstallCommandSpec.swift @@ -1,6 +1,6 @@ // // InstallCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class InstallCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("install command") { it("installs apps") { diff --git a/Tests/MasKitTests/Commands/ListCommandSpec.swift b/Tests/masTests/Commands/ListCommandSpec.swift similarity index 87% rename from Tests/MasKitTests/Commands/ListCommandSpec.swift rename to Tests/masTests/Commands/ListCommandSpec.swift index 2901753..300322e 100644 --- a/Tests/MasKitTests/Commands/ListCommandSpec.swift +++ b/Tests/masTests/Commands/ListCommandSpec.swift @@ -1,6 +1,6 @@ // // ListCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-27. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class ListCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("list command") { it("lists apps") { diff --git a/Tests/MasKitTests/Commands/LuckyCommandSpec.swift b/Tests/masTests/Commands/LuckyCommandSpec.swift similarity index 91% rename from Tests/MasKitTests/Commands/LuckyCommandSpec.swift rename to Tests/masTests/Commands/LuckyCommandSpec.swift index 034d15c..8fbda3c 100644 --- a/Tests/MasKitTests/Commands/LuckyCommandSpec.swift +++ b/Tests/masTests/Commands/LuckyCommandSpec.swift @@ -1,6 +1,6 @@ // // LuckyCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class LuckyCommandSpec: QuickSpec { override public func spec() { @@ -17,7 +17,7 @@ public class LuckyCommandSpec: QuickSpec { let storeSearch = MasStoreSearch(networkManager: NetworkManager(session: networkSession)) beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("lucky command") { xit("installs the first app matching a search") { diff --git a/Tests/MasKitTests/Commands/OpenCommandSpec.swift b/Tests/masTests/Commands/OpenCommandSpec.swift similarity index 96% rename from Tests/MasKitTests/Commands/OpenCommandSpec.swift rename to Tests/masTests/Commands/OpenCommandSpec.swift index c01dcd4..7a8562e 100644 --- a/Tests/MasKitTests/Commands/OpenCommandSpec.swift +++ b/Tests/masTests/Commands/OpenCommandSpec.swift @@ -1,6 +1,6 @@ // // OpenCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2019-01-03. // Copyright © 2019 mas-cli. All rights reserved. @@ -10,7 +10,7 @@ import Foundation import Nimble import Quick -@testable import MasKit +@testable import mas public class OpenCommandSpec: QuickSpec { override public func spec() { @@ -24,7 +24,7 @@ public class OpenCommandSpec: QuickSpec { let cmd = OpenCommand(storeSearch: storeSearch, openCommand: openCommand) beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("open command") { beforeEach { diff --git a/Tests/MasKitTests/Commands/OutdatedCommandSpec.swift b/Tests/masTests/Commands/OutdatedCommandSpec.swift similarity index 89% rename from Tests/MasKitTests/Commands/OutdatedCommandSpec.swift rename to Tests/masTests/Commands/OutdatedCommandSpec.swift index 6b7c72d..22a6947 100644 --- a/Tests/MasKitTests/Commands/OutdatedCommandSpec.swift +++ b/Tests/masTests/Commands/OutdatedCommandSpec.swift @@ -1,6 +1,6 @@ // // OutdatedCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class OutdatedCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("outdated command") { it("displays apps with pending updates") { diff --git a/Tests/MasKitTests/Commands/PurchaseCommandSpec.swift b/Tests/masTests/Commands/PurchaseCommandSpec.swift similarity index 88% rename from Tests/MasKitTests/Commands/PurchaseCommandSpec.swift rename to Tests/masTests/Commands/PurchaseCommandSpec.swift index 8ceaa4a..4db873f 100644 --- a/Tests/MasKitTests/Commands/PurchaseCommandSpec.swift +++ b/Tests/masTests/Commands/PurchaseCommandSpec.swift @@ -1,6 +1,6 @@ // // PurchaseCommandSpec.swift -// MasKitTests +// masTests // // Created by Maximilian Blochberger on 2020-03-21. // Copyright © 2020 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class PurchaseCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("purchase command") { it("purchases apps") { diff --git a/Tests/MasKitTests/Commands/ResetCommandSpec.swift b/Tests/masTests/Commands/ResetCommandSpec.swift similarity index 88% rename from Tests/MasKitTests/Commands/ResetCommandSpec.swift rename to Tests/masTests/Commands/ResetCommandSpec.swift index 6150274..6405025 100644 --- a/Tests/MasKitTests/Commands/ResetCommandSpec.swift +++ b/Tests/masTests/Commands/ResetCommandSpec.swift @@ -1,6 +1,6 @@ // // ResetCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class ResetCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("reset command") { it("resets the App Store state") { diff --git a/Tests/MasKitTests/Commands/SearchCommandSpec.swift b/Tests/masTests/Commands/SearchCommandSpec.swift similarity index 95% rename from Tests/MasKitTests/Commands/SearchCommandSpec.swift rename to Tests/masTests/Commands/SearchCommandSpec.swift index 7e2e98d..f15f812 100644 --- a/Tests/MasKitTests/Commands/SearchCommandSpec.swift +++ b/Tests/masTests/Commands/SearchCommandSpec.swift @@ -1,6 +1,6 @@ // // SearchCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class SearchCommandSpec: QuickSpec { override public func spec() { @@ -22,7 +22,7 @@ public class SearchCommandSpec: QuickSpec { let storeSearch = StoreSearchMock() beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("search command") { beforeEach { diff --git a/Tests/MasKitTests/Commands/SignInCommandSpec.swift b/Tests/masTests/Commands/SignInCommandSpec.swift similarity index 90% rename from Tests/MasKitTests/Commands/SignInCommandSpec.swift rename to Tests/masTests/Commands/SignInCommandSpec.swift index 5f44888..183b2d5 100644 --- a/Tests/MasKitTests/Commands/SignInCommandSpec.swift +++ b/Tests/masTests/Commands/SignInCommandSpec.swift @@ -1,6 +1,6 @@ // // SignInCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,13 +9,13 @@ import Nimble import Quick -@testable import MasKit +@testable import mas // Deprecated test public class SignInCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } // account command disabled since macOS 10.13 High Sierra https://github.com/mas-cli/mas#%EF%B8%8F-known-issues xdescribe("signin command") { diff --git a/Tests/MasKitTests/Commands/SignOutCommandSpec.swift b/Tests/masTests/Commands/SignOutCommandSpec.swift similarity index 88% rename from Tests/MasKitTests/Commands/SignOutCommandSpec.swift rename to Tests/masTests/Commands/SignOutCommandSpec.swift index 6a6bd61..c746deb 100644 --- a/Tests/MasKitTests/Commands/SignOutCommandSpec.swift +++ b/Tests/masTests/Commands/SignOutCommandSpec.swift @@ -1,6 +1,6 @@ // // SignOutCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class SignOutCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("signout command") { it("signs out") { diff --git a/Tests/MasKitTests/Commands/UninstallCommandSpec.swift b/Tests/masTests/Commands/UninstallCommandSpec.swift similarity index 97% rename from Tests/MasKitTests/Commands/UninstallCommandSpec.swift rename to Tests/masTests/Commands/UninstallCommandSpec.swift index 5aafeac..53a7410 100644 --- a/Tests/MasKitTests/Commands/UninstallCommandSpec.swift +++ b/Tests/masTests/Commands/UninstallCommandSpec.swift @@ -1,6 +1,6 @@ // // UninstallCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-27. // Copyright © 2018 mas-cli. All rights reserved. @@ -10,12 +10,12 @@ import Foundation import Nimble import Quick -@testable import MasKit +@testable import mas public class UninstallCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("uninstall command") { let appId = 12345 diff --git a/Tests/MasKitTests/Commands/UpgradeCommandSpec.swift b/Tests/masTests/Commands/UpgradeCommandSpec.swift similarity index 88% rename from Tests/MasKitTests/Commands/UpgradeCommandSpec.swift rename to Tests/masTests/Commands/UpgradeCommandSpec.swift index 8a544d3..2b9b173 100644 --- a/Tests/MasKitTests/Commands/UpgradeCommandSpec.swift +++ b/Tests/masTests/Commands/UpgradeCommandSpec.swift @@ -1,6 +1,6 @@ // // UpgradeCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class UpgradeCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("upgrade command") { it("upgrades stuff") { diff --git a/Tests/MasKitTests/Commands/VendorCommandSpec.swift b/Tests/masTests/Commands/VendorCommandSpec.swift similarity index 96% rename from Tests/MasKitTests/Commands/VendorCommandSpec.swift rename to Tests/masTests/Commands/VendorCommandSpec.swift index 5e342cb..2c5fe94 100644 --- a/Tests/MasKitTests/Commands/VendorCommandSpec.swift +++ b/Tests/masTests/Commands/VendorCommandSpec.swift @@ -1,6 +1,6 @@ // // VendorCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2019-01-03. // Copyright © 2019 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class VendorCommandSpec: QuickSpec { override public func spec() { @@ -23,7 +23,7 @@ public class VendorCommandSpec: QuickSpec { let cmd = VendorCommand(storeSearch: storeSearch, openCommand: openCommand) beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("vendor command") { beforeEach { diff --git a/Tests/MasKitTests/Commands/VersionCommandSpec.swift b/Tests/masTests/Commands/VersionCommandSpec.swift similarity index 88% rename from Tests/MasKitTests/Commands/VersionCommandSpec.swift rename to Tests/masTests/Commands/VersionCommandSpec.swift index ba10acc..13ea5d4 100644 --- a/Tests/MasKitTests/Commands/VersionCommandSpec.swift +++ b/Tests/masTests/Commands/VersionCommandSpec.swift @@ -1,6 +1,6 @@ // // VersionCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2018-12-28. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class VersionCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("version command") { it("displays the current version") { diff --git a/Tests/MasKitTests/Controllers/AppLibraryMock.swift b/Tests/masTests/Controllers/AppLibraryMock.swift similarity index 95% rename from Tests/MasKitTests/Controllers/AppLibraryMock.swift rename to Tests/masTests/Controllers/AppLibraryMock.swift index 2a1f4b1..4a87784 100644 --- a/Tests/MasKitTests/Controllers/AppLibraryMock.swift +++ b/Tests/masTests/Controllers/AppLibraryMock.swift @@ -1,12 +1,12 @@ // // AppLibraryMock.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 12/27/18. // Copyright © 2018 mas-cli. All rights reserved. // -@testable import MasKit +@testable import mas class AppLibraryMock: AppLibrary { var installedApps = [SoftwareProduct]() diff --git a/Tests/MasKitTests/Controllers/MasAppLibrarySpec.swift b/Tests/masTests/Controllers/MasAppLibrarySpec.swift similarity index 95% rename from Tests/MasKitTests/Controllers/MasAppLibrarySpec.swift rename to Tests/masTests/Controllers/MasAppLibrarySpec.swift index 9409879..9d823a4 100644 --- a/Tests/MasKitTests/Controllers/MasAppLibrarySpec.swift +++ b/Tests/masTests/Controllers/MasAppLibrarySpec.swift @@ -1,6 +1,6 @@ // // MasAppLibrarySpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 3/1/20. // Copyright © 2020 mas-cli. All rights reserved. @@ -9,14 +9,14 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class MasAppLibrarySpec: QuickSpec { override public func spec() { let library = MasAppLibrary(softwareMap: SoftwareMapMock(products: apps)) beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("mas app library") { it("contains all installed apps") { diff --git a/Tests/MasKitTests/Controllers/MasStoreSearchSpec.swift b/Tests/masTests/Controllers/MasStoreSearchSpec.swift similarity index 97% rename from Tests/MasKitTests/Controllers/MasStoreSearchSpec.swift rename to Tests/masTests/Controllers/MasStoreSearchSpec.swift index 5fed9e5..99e1bdb 100644 --- a/Tests/MasKitTests/Controllers/MasStoreSearchSpec.swift +++ b/Tests/masTests/Controllers/MasStoreSearchSpec.swift @@ -1,6 +1,6 @@ // // MasStoreSearchSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/4/19. // Copyright © 2019 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class MasStoreSearchSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("url string") { it("contains the app name") { diff --git a/Tests/MasKitTests/Controllers/StoreSearchMock.swift b/Tests/masTests/Controllers/StoreSearchMock.swift similarity index 95% rename from Tests/MasKitTests/Controllers/StoreSearchMock.swift rename to Tests/masTests/Controllers/StoreSearchMock.swift index 69f518d..5037b92 100644 --- a/Tests/MasKitTests/Controllers/StoreSearchMock.swift +++ b/Tests/masTests/Controllers/StoreSearchMock.swift @@ -1,6 +1,6 @@ // // StoreSearchMock.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/4/19. // Copyright © 2019 mas-cli. All rights reserved. @@ -8,7 +8,7 @@ import PromiseKit -@testable import MasKit +@testable import mas class StoreSearchMock: StoreSearch { var apps: [Int: SearchResult] = [:] diff --git a/Tests/MasKitTests/Errors/MASErrorTestCase.swift b/Tests/masTests/Errors/MASErrorTestCase.swift similarity index 98% rename from Tests/MasKitTests/Errors/MASErrorTestCase.swift rename to Tests/masTests/Errors/MASErrorTestCase.swift index 503b1ce..fe0248b 100644 --- a/Tests/MasKitTests/Errors/MASErrorTestCase.swift +++ b/Tests/masTests/Errors/MASErrorTestCase.swift @@ -1,6 +1,6 @@ // // MASErrorTestCase.swift -// mas-tests +// masTests // // Created by Ben Chatelain on 2/11/18. // Copyright © 2018 Andrew Naylor. All rights reserved. @@ -9,7 +9,7 @@ import Foundation import XCTest -@testable import MasKit +@testable import mas class MASErrorTestCase: XCTestCase { private let errorDomain = "MAS" @@ -30,7 +30,7 @@ class MASErrorTestCase: XCTestCase { override func setUp() { super.setUp() - MasKit.initialize() + Mas.initialize() nserror = NSError(domain: errorDomain, code: 999) localizedDescription = "foo" } diff --git a/Tests/MasKitTests/Extensions/Bundle+JSON.swift b/Tests/masTests/Extensions/Bundle+JSON.swift similarity index 95% rename from Tests/MasKitTests/Extensions/Bundle+JSON.swift rename to Tests/masTests/Extensions/Bundle+JSON.swift index 1159243..34cd6ac 100644 --- a/Tests/MasKitTests/Extensions/Bundle+JSON.swift +++ b/Tests/masTests/Extensions/Bundle+JSON.swift @@ -1,6 +1,6 @@ // // Bundle+JSON.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/5/19. // Copyright © 2019 mas-cli. All rights reserved. @@ -28,7 +28,7 @@ extension Bundle { let bundleURL = Bundle(for: NetworkSessionMock.self) .bundleURL .deletingLastPathComponent() - .appendingPathComponent("mas_MasKitTests.bundle") + .appendingPathComponent("mas_masTests.bundle") guard let bundle = Bundle(url: bundleURL), let url = bundle.url(for: fileName) else { diff --git a/Tests/MasKitTests/Extensions/String+FileExtension.swift b/Tests/masTests/Extensions/String+FileExtension.swift similarity index 96% rename from Tests/MasKitTests/Extensions/String+FileExtension.swift rename to Tests/masTests/Extensions/String+FileExtension.swift index 1c08969..6f8649a 100644 --- a/Tests/MasKitTests/Extensions/String+FileExtension.swift +++ b/Tests/masTests/Extensions/String+FileExtension.swift @@ -1,6 +1,6 @@ // // String+FileExtension.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/5/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Tests/MasKitTests/ExternalCommands/OpenSystemCommandMock.swift b/Tests/masTests/ExternalCommands/OpenSystemCommandMock.swift similarity index 92% rename from Tests/MasKitTests/ExternalCommands/OpenSystemCommandMock.swift rename to Tests/masTests/ExternalCommands/OpenSystemCommandMock.swift index 96b56df..7d9aebc 100644 --- a/Tests/MasKitTests/ExternalCommands/OpenSystemCommandMock.swift +++ b/Tests/masTests/ExternalCommands/OpenSystemCommandMock.swift @@ -1,6 +1,6 @@ // // OpenSystemCommandMock.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/4/19. // Copyright © 2019 mas-cli. All rights reserved. @@ -8,7 +8,7 @@ import Foundation -@testable import MasKit +@testable import mas class OpenSystemCommandMock: ExternalCommand { // Stub out protocol logic diff --git a/Tests/MasKitTests/ExternalCommands/OpenSystemCommandSpec.swift b/Tests/masTests/ExternalCommands/OpenSystemCommandSpec.swift similarity index 91% rename from Tests/MasKitTests/ExternalCommands/OpenSystemCommandSpec.swift rename to Tests/masTests/ExternalCommands/OpenSystemCommandSpec.swift index 9e479fc..d2709ef 100644 --- a/Tests/MasKitTests/ExternalCommands/OpenSystemCommandSpec.swift +++ b/Tests/masTests/ExternalCommands/OpenSystemCommandSpec.swift @@ -1,6 +1,6 @@ // // OpenSystemCommandSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2/24/20. // Copyright © 2020 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class OpenSystemCommandSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("open system command") { context("binary path") { diff --git a/Tests/MasKitTests/Formatters/AppListFormatterSpec.swift b/Tests/masTests/Formatters/AppListFormatterSpec.swift similarity index 96% rename from Tests/MasKitTests/Formatters/AppListFormatterSpec.swift rename to Tests/masTests/Formatters/AppListFormatterSpec.swift index 91b6faf..c454691 100644 --- a/Tests/MasKitTests/Formatters/AppListFormatterSpec.swift +++ b/Tests/masTests/Formatters/AppListFormatterSpec.swift @@ -1,6 +1,6 @@ // // AppListFormatterSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 8/23/2020. // Copyright © 2020 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class AppListsFormatterSpec: QuickSpec { override public func spec() { @@ -18,7 +18,7 @@ public class AppListsFormatterSpec: QuickSpec { var products: [SoftwareProduct] = [] beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("app list formatter") { beforeEach { diff --git a/Tests/MasKitTests/Formatters/SearchResultFormatterSpec.swift b/Tests/masTests/Formatters/SearchResultFormatterSpec.swift similarity index 97% rename from Tests/MasKitTests/Formatters/SearchResultFormatterSpec.swift rename to Tests/masTests/Formatters/SearchResultFormatterSpec.swift index 1fe7fb7..211445b 100644 --- a/Tests/MasKitTests/Formatters/SearchResultFormatterSpec.swift +++ b/Tests/masTests/Formatters/SearchResultFormatterSpec.swift @@ -1,6 +1,6 @@ // // SearchResultFormatterSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/14/19. // Copyright © 2019 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class SearchResultsFormatterSpec: QuickSpec { override public func spec() { @@ -18,7 +18,7 @@ public class SearchResultsFormatterSpec: QuickSpec { var results: [SearchResult] = [] beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("search results formatter") { beforeEach { diff --git a/Tests/MasKitTests/JSON/lookup/fantastical.json b/Tests/masTests/JSON/lookup/fantastical.json similarity index 100% rename from Tests/MasKitTests/JSON/lookup/fantastical.json rename to Tests/masTests/JSON/lookup/fantastical.json diff --git a/Tests/MasKitTests/JSON/lookup/notability.json b/Tests/masTests/JSON/lookup/notability.json similarity index 100% rename from Tests/MasKitTests/JSON/lookup/notability.json rename to Tests/masTests/JSON/lookup/notability.json diff --git a/Tests/MasKitTests/JSON/lookup/slack.json b/Tests/masTests/JSON/lookup/slack.json similarity index 100% rename from Tests/MasKitTests/JSON/lookup/slack.json rename to Tests/masTests/JSON/lookup/slack.json diff --git a/Tests/MasKitTests/JSON/lookup/things.json b/Tests/masTests/JSON/lookup/things.json similarity index 100% rename from Tests/MasKitTests/JSON/lookup/things.json rename to Tests/masTests/JSON/lookup/things.json diff --git a/Tests/MasKitTests/JSON/search/bbedit.json b/Tests/masTests/JSON/search/bbedit.json similarity index 100% rename from Tests/MasKitTests/JSON/search/bbedit.json rename to Tests/masTests/JSON/search/bbedit.json diff --git a/Tests/MasKitTests/JSON/search/bear.json b/Tests/masTests/JSON/search/bear.json similarity index 100% rename from Tests/MasKitTests/JSON/search/bear.json rename to Tests/masTests/JSON/search/bear.json diff --git a/Tests/MasKitTests/JSON/search/deliveries.json b/Tests/masTests/JSON/search/deliveries.json similarity index 100% rename from Tests/MasKitTests/JSON/search/deliveries.json rename to Tests/masTests/JSON/search/deliveries.json diff --git a/Tests/MasKitTests/JSON/search/fantastical.json b/Tests/masTests/JSON/search/fantastical.json similarity index 100% rename from Tests/MasKitTests/JSON/search/fantastical.json rename to Tests/masTests/JSON/search/fantastical.json diff --git a/Tests/MasKitTests/JSON/search/mojave.json b/Tests/masTests/JSON/search/mojave.json similarity index 100% rename from Tests/MasKitTests/JSON/search/mojave.json rename to Tests/masTests/JSON/search/mojave.json diff --git a/Tests/MasKitTests/JSON/search/nonexistent.json b/Tests/masTests/JSON/search/nonexistent.json similarity index 100% rename from Tests/MasKitTests/JSON/search/nonexistent.json rename to Tests/masTests/JSON/search/nonexistent.json diff --git a/Tests/MasKitTests/JSON/search/notability.json b/Tests/masTests/JSON/search/notability.json similarity index 100% rename from Tests/MasKitTests/JSON/search/notability.json rename to Tests/masTests/JSON/search/notability.json diff --git a/Tests/MasKitTests/JSON/search/slack.json b/Tests/masTests/JSON/search/slack.json similarity index 100% rename from Tests/MasKitTests/JSON/search/slack.json rename to Tests/masTests/JSON/search/slack.json diff --git a/Tests/MasKitTests/JSON/search/things-3.json b/Tests/masTests/JSON/search/things-3.json similarity index 100% rename from Tests/MasKitTests/JSON/search/things-3.json rename to Tests/masTests/JSON/search/things-3.json diff --git a/Tests/MasKitTests/JSON/search/things-that-go-bump.json b/Tests/masTests/JSON/search/things-that-go-bump.json similarity index 100% rename from Tests/MasKitTests/JSON/search/things-that-go-bump.json rename to Tests/masTests/JSON/search/things-that-go-bump.json diff --git a/Tests/MasKitTests/JSON/search/things.json b/Tests/masTests/JSON/search/things.json similarity index 100% rename from Tests/MasKitTests/JSON/search/things.json rename to Tests/masTests/JSON/search/things.json diff --git a/Tests/MasKitTests/JSON/search/tweetbot.json b/Tests/masTests/JSON/search/tweetbot.json similarity index 100% rename from Tests/MasKitTests/JSON/search/tweetbot.json rename to Tests/masTests/JSON/search/tweetbot.json diff --git a/Tests/MasKitTests/Models/SearchResultListSpec.swift b/Tests/masTests/Models/SearchResultListSpec.swift similarity index 92% rename from Tests/MasKitTests/Models/SearchResultListSpec.swift rename to Tests/masTests/Models/SearchResultListSpec.swift index 137c907..a7fadf6 100644 --- a/Tests/MasKitTests/Models/SearchResultListSpec.swift +++ b/Tests/masTests/Models/SearchResultListSpec.swift @@ -1,6 +1,6 @@ // // SearchResultListSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 9/2/20. // Copyright © 2020 mas-cli. All rights reserved. @@ -10,12 +10,12 @@ import Foundation import Nimble import Quick -@testable import MasKit +@testable import mas public class SearchResultListSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("search result list") { it("can parse bbedit") { diff --git a/Tests/MasKitTests/Models/SearchResultSpec.swift b/Tests/masTests/Models/SearchResultSpec.swift similarity index 90% rename from Tests/MasKitTests/Models/SearchResultSpec.swift rename to Tests/masTests/Models/SearchResultSpec.swift index 563946b..4617edd 100644 --- a/Tests/MasKitTests/Models/SearchResultSpec.swift +++ b/Tests/masTests/Models/SearchResultSpec.swift @@ -1,6 +1,6 @@ // // SearchResultSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 9/2/20. // Copyright © 2020 mas-cli. All rights reserved. @@ -10,12 +10,12 @@ import Foundation import Nimble import Quick -@testable import MasKit +@testable import mas public class SearchResultSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("search result") { it("can parse things") { diff --git a/Tests/MasKitTests/Models/SoftwareProductMock.swift b/Tests/masTests/Models/SoftwareProductMock.swift similarity index 89% rename from Tests/MasKitTests/Models/SoftwareProductMock.swift rename to Tests/masTests/Models/SoftwareProductMock.swift index c12bfa6..91de06b 100644 --- a/Tests/MasKitTests/Models/SoftwareProductMock.swift +++ b/Tests/masTests/Models/SoftwareProductMock.swift @@ -1,6 +1,6 @@ // // SoftwareProductMock.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 12/27/18. // Copyright © 2018 mas-cli. All rights reserved. @@ -8,7 +8,7 @@ import Foundation -@testable import MasKit +@testable import mas struct SoftwareProductMock: SoftwareProduct { var appName: String diff --git a/Tests/MasKitTests/Models/SoftwareProductSpec.swift b/Tests/masTests/Models/SoftwareProductSpec.swift similarity index 95% rename from Tests/MasKitTests/Models/SoftwareProductSpec.swift rename to Tests/masTests/Models/SoftwareProductSpec.swift index 73806a4..80cbde3 100644 --- a/Tests/MasKitTests/Models/SoftwareProductSpec.swift +++ b/Tests/masTests/Models/SoftwareProductSpec.swift @@ -1,6 +1,6 @@ // // SoftwareProductSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 9/30/21. // Copyright © 2018 mas-cli. All rights reserved. @@ -10,12 +10,12 @@ import Foundation import Nimble import Quick -@testable import MasKit +@testable import mas public class SoftwareProductSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("software product") { let app = SoftwareProductMock( diff --git a/Tests/MasKitTests/Network/NetworkManagerTests.swift b/Tests/masTests/Network/NetworkManagerTests.swift similarity index 97% rename from Tests/MasKitTests/Network/NetworkManagerTests.swift rename to Tests/masTests/Network/NetworkManagerTests.swift index 1d73534..a92227c 100644 --- a/Tests/MasKitTests/Network/NetworkManagerTests.swift +++ b/Tests/masTests/Network/NetworkManagerTests.swift @@ -1,6 +1,6 @@ // // NetworkManagerTests.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/5/19. // Copyright © 2019 mas-cli. All rights reserved. @@ -8,12 +8,12 @@ import XCTest -@testable import MasKit +@testable import mas class NetworkManagerTests: XCTestCase { override public func setUp() { super.setUp() - MasKit.initialize() + Mas.initialize() } func testSuccessfulAsyncResponse() throws { diff --git a/Tests/MasKitTests/Network/NetworkSessionMock.swift b/Tests/masTests/Network/NetworkSessionMock.swift similarity index 95% rename from Tests/MasKitTests/Network/NetworkSessionMock.swift rename to Tests/masTests/Network/NetworkSessionMock.swift index 4be4b1b..a286bbb 100644 --- a/Tests/MasKitTests/Network/NetworkSessionMock.swift +++ b/Tests/masTests/Network/NetworkSessionMock.swift @@ -1,6 +1,6 @@ // // NetworkSessionMock -// MasKitTests +// masTests // // Created by Ben Chatelain on 11/13/18. // Copyright © 2018 mas-cli. All rights reserved. @@ -9,7 +9,7 @@ import Foundation import PromiseKit -@testable import MasKit +@testable import mas /// Mock NetworkSession for testing. class NetworkSessionMock: NetworkSession { diff --git a/Tests/MasKitTests/Network/NetworkSessionMockFromFile.swift b/Tests/masTests/Network/NetworkSessionMockFromFile.swift similarity index 98% rename from Tests/MasKitTests/Network/NetworkSessionMockFromFile.swift rename to Tests/masTests/Network/NetworkSessionMockFromFile.swift index 52c5d12..46d4ca2 100644 --- a/Tests/MasKitTests/Network/NetworkSessionMockFromFile.swift +++ b/Tests/masTests/Network/NetworkSessionMockFromFile.swift @@ -1,6 +1,6 @@ // // NetworkSessionMockFromFile.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 2019-01-05. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/Tests/MasKitTests/Nimble/ResultPredicates.swift b/Tests/masTests/Nimble/ResultPredicates.swift similarity index 96% rename from Tests/MasKitTests/Nimble/ResultPredicates.swift rename to Tests/masTests/Nimble/ResultPredicates.swift index 209a3f6..c4f6be8 100644 --- a/Tests/MasKitTests/Nimble/ResultPredicates.swift +++ b/Tests/masTests/Nimble/ResultPredicates.swift @@ -1,6 +1,6 @@ // // ResultPredicates.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 12/27/18. // Copyright © 2018 mas-cli. All rights reserved. @@ -8,7 +8,7 @@ import Nimble -@testable import MasKit +@testable import mas /// Nimble predicate for result enum success case, no associated value func beSuccess() -> Predicate> { diff --git a/Tests/MasKitTests/OutputListener.swift b/Tests/masTests/OutputListener.swift similarity index 93% rename from Tests/MasKitTests/OutputListener.swift rename to Tests/masTests/OutputListener.swift index 434655e..14298f6 100644 --- a/Tests/MasKitTests/OutputListener.swift +++ b/Tests/masTests/OutputListener.swift @@ -1,12 +1,12 @@ // // OutputListener.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/7/19. // Copyright © 2019 mas-cli. All rights reserved. // -@testable import MasKit +@testable import mas /// Test helper for monitoring strings written to stdout. Modified from: /// https://stackoverflow.com/a/53569018 diff --git a/Tests/MasKitTests/OutputListenerSpec.swift b/Tests/masTests/OutputListenerSpec.swift similarity index 92% rename from Tests/MasKitTests/OutputListenerSpec.swift rename to Tests/masTests/OutputListenerSpec.swift index f793f19..b95240f 100644 --- a/Tests/MasKitTests/OutputListenerSpec.swift +++ b/Tests/masTests/OutputListenerSpec.swift @@ -1,6 +1,6 @@ // // OutputListenerSpec.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/8/19. // Copyright © 2019 mas-cli. All rights reserved. @@ -9,12 +9,12 @@ import Nimble import Quick -@testable import MasKit +@testable import mas public class OutputListenerSpec: QuickSpec { override public func spec() { beforeSuite { - MasKit.initialize() + Mas.initialize() } describe("output listener") { it("can intercept a single line written stdout") { diff --git a/Tests/MasKitTests/Strongify.swift b/Tests/masTests/Strongify.swift similarity index 95% rename from Tests/MasKitTests/Strongify.swift rename to Tests/masTests/Strongify.swift index 6ab81fd..a87ce9a 100644 --- a/Tests/MasKitTests/Strongify.swift +++ b/Tests/masTests/Strongify.swift @@ -1,6 +1,6 @@ // // Strongify.swift -// MasKitTests +// masTests // // Created by Ben Chatelain on 1/8/19. // Copyright © 2019 mas-cli. All rights reserved. diff --git a/script/version b/script/version index bbc2219..2f977ff 100755 --- a/script/version +++ b/script/version @@ -19,7 +19,7 @@ fi VERSION=$(git describe --abbrev=0 --tags) VERSION=${VERSION#v} -cat <"Sources/MasKit/Package.swift" +cat <"Sources/mas/Package.swift" // Generated by: script/version enum Package { static let version = "${VERSION}"