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>
This commit is contained in:
Ross Goldberg 2024-10-01 14:05:41 -04:00
parent 611d4a7fb7
commit d413d8cfa1
No known key found for this signature in database
106 changed files with 236 additions and 252 deletions

1
.gitignore vendored
View file

@ -37,4 +37,5 @@ build/
default.profraw default.profraw
releases/ releases/
xcuserdata xcuserdata
Sources/mas/Package.swift
Sources/MasKit/Package.swift Sources/MasKit/Package.swift

View file

@ -1,79 +1,77 @@
{ {
"object": { "pins" : [
"pins": [ {
{ "identity" : "commandant",
"package": "Commandant", "kind" : "remoteSourceControl",
"repositoryURL": "https://github.com/Carthage/Commandant.git", "location" : "https://github.com/Carthage/Commandant.git",
"state": { "state" : {
"branch": null, "revision" : "a1671cf728db837cf5ec1980a80d276bbba748f6",
"revision": "a1671cf728db837cf5ec1980a80d276bbba748f6", "version" : "0.18.0"
"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"
}
} }
] },
}, {
"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
} }

View file

@ -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. // The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription import PackageDescription
@ -13,11 +13,7 @@ let package = Package(
.executable( .executable(
name: "mas", name: "mas",
targets: ["mas"] targets: ["mas"]
), )
.library(
name: "MasKit",
targets: ["MasKit"]
),
], ],
dependencies: [ dependencies: [
// Dependencies declare other packages that this package depends on. // Dependencies declare other packages that this package depends on.
@ -31,18 +27,8 @@ let package = Package(
targets: [ targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite. // 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. // Targets can depend on other targets in this package, and on products in packages this package depends on.
.target( .executableTarget(
name: "mas", name: "mas",
dependencies: ["MasKit"],
swiftSettings: [
.unsafeFlags([
"-I", "Sources/PrivateFrameworks/CommerceKit",
"-I", "Sources/PrivateFrameworks/StoreFoundation",
])
]
),
.target(
name: "MasKit",
dependencies: [ dependencies: [
"Commandant", "Commandant",
"PromiseKit", "PromiseKit",
@ -62,8 +48,8 @@ let package = Package(
] ]
), ),
.testTarget( .testTarget(
name: "MasKitTests", name: "masTests",
dependencies: ["MasKit", "Nimble", "Quick"], dependencies: ["mas", "Nimble", "Quick"],
resources: [.copy("JSON")], resources: [.copy("JSON")],
swiftSettings: [ swiftSettings: [
.unsafeFlags([ .unsafeFlags([

View file

@ -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. The tests in this project are a recent work-in-progress.
Since Xcode does not officially support tests for command-line tool targets, 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]. Tests are written using [Quick].
```bash ```bash

View file

@ -1,6 +1,6 @@
// //
// CKSoftwareMap+SoftwareMap.swift // CKSoftwareMap+SoftwareMap.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/27/18. // Created by Ben Chatelain on 12/27/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// CKSoftwareProduct+SoftwareProduct.swift // CKSoftwareProduct+SoftwareProduct.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/27/18. // Created by Ben Chatelain on 12/27/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Downloader.swift // Downloader.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 21/08/2015. // Created by Andrew Naylor on 21/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// ISStoreAccount.swift // ISStoreAccount.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 22/08/2015. // Created by Andrew Naylor on 22/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// PurchaseDownloadObserver.swift // PurchaseDownloadObserver.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 21/08/2015. // Created by Andrew Naylor on 21/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// SSPurchase.swift // SSPurchase.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 25/08/2015. // Created by Andrew Naylor on 25/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// StoreAccount.swift // StoreAccount.swift
// mas-cli // mas
// //
// Created by Ben Chatelain on 4/3/18. // Created by Ben Chatelain on 4/3/18.
// Copyright © 2018 Andrew Naylor. All rights reserved. // Copyright © 2018 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Account.swift // Account.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 21/08/2015. // Created by Andrew Naylor on 21/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Home.swift // Home.swift
// mas-cli // mas
// //
// Created by Ben Chatelain on 2018-12-29. // Created by Ben Chatelain on 2018-12-29.
// Copyright © 2016 mas-cli. All rights reserved. // Copyright © 2016 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Info.swift // Info.swift
// mas-cli // mas
// //
// Created by Denis Lebedev on 21/10/2016. // Created by Denis Lebedev on 21/10/2016.
// Copyright © 2016 Andrew Naylor. All rights reserved. // Copyright © 2016 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Install.swift // Install.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 21/08/2015. // Created by Andrew Naylor on 21/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// List.swift // List.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 21/08/2015. // Created by Andrew Naylor on 21/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Lucky.swift // Lucky.swift
// mas-cli // mas
// //
// Created by Pablo Varela on 05/11/17. // Created by Pablo Varela on 05/11/17.
// Copyright © 2016 Andrew Naylor. All rights reserved. // Copyright © 2016 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Open.swift // Open.swift
// mas-cli // mas
// //
// Created by Ben Chatelain on 2018-12-29. // Created by Ben Chatelain on 2018-12-29.
// Copyright © 2016 mas-cli. All rights reserved. // Copyright © 2016 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Outdated.swift // Outdated.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 21/08/2015. // Created by Andrew Naylor on 21/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Purchase.swift // Purchase.swift
// mas-cli // mas
// //
// Created by Jakob Rieck on 24/10/2017. // Created by Jakob Rieck on 24/10/2017.
// Copyright (c) 2017 Jakob Rieck. All rights reserved. // Copyright (c) 2017 Jakob Rieck. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Reset.swift // Reset.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 14/09/2016. // Created by Andrew Naylor on 14/09/2016.
// Copyright © 2016 Andrew Naylor. All rights reserved. // Copyright © 2016 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Search.swift // Search.swift
// mas-cli // mas
// //
// Created by Michael Schneider on 4/14/16. // Created by Michael Schneider on 4/14/16.
// Copyright © 2016 Andrew Naylor. All rights reserved. // Copyright © 2016 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// SignIn.swift // SignIn.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 14/02/2016. // Created by Andrew Naylor on 14/02/2016.
// Copyright © 2016 Andrew Naylor. All rights reserved. // Copyright © 2016 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// SignOut.swift // SignOut.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 14/02/2016. // Created by Andrew Naylor on 14/02/2016.
// Copyright © 2016 Andrew Naylor. All rights reserved. // Copyright © 2016 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Uninstall.swift // Uninstall.swift
// mas-cli // mas
// //
// Created by Ben Chatelain on 2018-12-27. // Created by Ben Chatelain on 2018-12-27.
// Copyright © 2015 Andrew Naylor. All rights reserved. // Copyright © 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Upgrade.swift // Upgrade.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 30/12/2015. // Created by Andrew Naylor on 30/12/2015.
// Copyright © 2015 Andrew Naylor. All rights reserved. // Copyright © 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Vendor.swift // Vendor.swift
// mas-cli // mas
// //
// Created by Ben Chatelain on 2018-12-29. // Created by Ben Chatelain on 2018-12-29.
// Copyright © 2016 mas-cli. All rights reserved. // Copyright © 2016 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Version.swift // Version.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 20/09/2015. // Created by Andrew Naylor on 20/09/2015.
// Copyright © 2015 Andrew Naylor. All rights reserved. // Copyright © 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// AppLibrary.swift // AppLibrary.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/27/18. // Created by Ben Chatelain on 12/27/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// MasAppLibrary.swift // MasAppLibrary.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/27/18. // Created by Ben Chatelain on 12/27/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// MasStoreSearch.swift // MasStoreSearch.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/29/18. // Created by Ben Chatelain on 12/29/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// SoftwareMap.swift // SoftwareMap.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 3/1/20. // Created by Ben Chatelain on 3/1/20.
// Copyright © 2020 mas-cli. All rights reserved. // Copyright © 2020 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// StoreSearch.swift // StoreSearch.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/29/18. // Created by Ben Chatelain on 12/29/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// MASError.swift // MASError.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 21/08/2015. // Created by Andrew Naylor on 21/08/2015.
// Copyright (c) 2015 Andrew Naylor. All rights reserved. // Copyright (c) 2015 Andrew Naylor. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// ExternalCommand.swift // ExternalCommand.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 1/1/19. // Created by Ben Chatelain on 1/1/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// OpenSystemCommand.swift // OpenSystemCommand.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 1/2/19. // Created by Ben Chatelain on 1/2/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// SysCtlSystemCommand.swift // SysCtlSystemCommand.swift
// MasKit // mas
// //
// Created by Chris Araman on 6/3/21. // Created by Chris Araman on 6/3/21.
// Copyright © 2021 mas-cli. All rights reserved. // Copyright © 2021 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// AppInfoFormatter.swift // AppInfoFormatter.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 1/7/19. // Created by Ben Chatelain on 1/7/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// AppListFormatter.swift // AppListFormatter.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 6/7/20. // Created by Ben Chatelain on 6/7/20.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// SearchResultFormatter.swift // SearchResultFormatter.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 1/11/19. // Created by Ben Chatelain on 1/11/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// Utilities.swift // Utilities.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 14/09/2016. // Created by Andrew Naylor on 14/09/2016.
// Copyright © 2016 Andrew Naylor. All rights reserved. // Copyright © 2016 Andrew Naylor. All rights reserved.
@ -18,7 +18,7 @@ let csi = "\u{001B}["
var printObserver: ((String) -> Void)? var printObserver: ((String) -> Void)?
// Override global print for testability. // Override global print for testability.
// See MasKitTests/OutputListener.swift. // See masTests/OutputListener.swift.
func print( func print(
_ items: Any..., _ items: Any...,
separator: String = " ", separator: String = " ",

View file

@ -1,6 +1,6 @@
// //
// MasKit.swift // Mas.swift
// MasKit // mas
// //
// Created by Chris Araman on 4/22/21. // Created by Chris Araman on 4/22/21.
// Copyright © 2021 mas-cli. All rights reserved. // Copyright © 2021 mas-cli. All rights reserved.
@ -8,7 +8,7 @@
import PromiseKit import PromiseKit
public enum MasKit { public enum Mas {
public static func initialize() { public static func initialize() {
PromiseKit.conf.Q.map = .global() PromiseKit.conf.Q.map = .global()
PromiseKit.conf.Q.return = .global() PromiseKit.conf.Q.return = .global()

View file

@ -1,6 +1,6 @@
// //
// SearchResult.swift // SearchResult.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/29/18. // Created by Ben Chatelain on 12/29/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// SearchResultList.swift // SearchResultList.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/29/18. // Created by Ben Chatelain on 12/29/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// SoftwareProduct.swift // SoftwareProduct.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 12/27/18. // Created by Ben Chatelain on 12/27/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Foundation import Foundation
import Version import Version
/// Protocol describing the members of CKSoftwareProduct used throughout MasKit. /// Protocol describing the members of CKSoftwareProduct used throughout mas.
protocol SoftwareProduct { protocol SoftwareProduct {
var appName: String { get } var appName: String { get }
var bundleIdentifier: String { get set } var bundleIdentifier: String { get set }

View file

@ -1,6 +1,6 @@
// //
// NetworkManager.swift // NetworkManager.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 1/5/19. // Created by Ben Chatelain on 1/5/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// NetworkSession.swift // NetworkSession.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 1/5/19. // Created by Ben Chatelain on 1/5/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// URLSession+NetworkSession.swift // URLSession+NetworkSession.swift
// MasKit // mas
// //
// Created by Ben Chatelain on 1/5/19. // Created by Ben Chatelain on 1/5/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,15 +1,14 @@
// //
// main.swift // main.swift
// mas-cli // mas
// //
// Created by Andrew Naylor on 11/07/2015. // Created by Andrew Naylor on 11/07/2015.
// Copyright © 2015 Andrew Naylor. All rights reserved. // Copyright © 2015 Andrew Naylor. All rights reserved.
// //
import Commandant import Commandant
import MasKit
MasKit.initialize() Mas.initialize()
let registry = CommandRegistry<MASError>() let registry = CommandRegistry<MASError>()
let helpCommand = HelpCommand(registry: registry) let helpCommand = HelpCommand(registry: registry)

View file

@ -1,6 +1,6 @@
# #
# .swiftlint.yml # .swiftlint.yml
# MasKitTests # masTests
# #
# https://github.com/realm/SwiftLint#configuration # https://github.com/realm/SwiftLint#configuration
# #

View file

@ -1,6 +1,6 @@
// //
// AccountCommandSpec.swift // AccountCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,13 +9,13 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
// Deprecated test // Deprecated test
public class AccountCommandSpec: QuickSpec { public class AccountCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
// account command disabled since macOS 12 Monterey https://github.com/mas-cli/mas#%EF%B8%8F-known-issues // account command disabled since macOS 12 Monterey https://github.com/mas-cli/mas#%EF%B8%8F-known-issues
xdescribe("Account command") { xdescribe("Account command") {

View file

@ -1,6 +1,6 @@
// //
// HomeCommandSpec.swift // HomeCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-29. // Created by Ben Chatelain on 2018-12-29.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class HomeCommandSpec: QuickSpec { public class HomeCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
@ -23,7 +23,7 @@ public class HomeCommandSpec: QuickSpec {
let cmd = HomeCommand(storeSearch: storeSearch, openCommand: openCommand) let cmd = HomeCommand(storeSearch: storeSearch, openCommand: openCommand)
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("home command") { describe("home command") {
beforeEach { beforeEach {

View file

@ -1,6 +1,6 @@
// //
// InfoCommandSpec.swift // InfoCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class InfoCommandSpec: QuickSpec { public class InfoCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
@ -37,7 +37,7 @@ public class InfoCommandSpec: QuickSpec {
""" """
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("Info command") { describe("Info command") {
beforeEach { beforeEach {

View file

@ -1,6 +1,6 @@
// //
// InstallCommandSpec.swift // InstallCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class InstallCommandSpec: QuickSpec { public class InstallCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("install command") { describe("install command") {
it("installs apps") { it("installs apps") {

View file

@ -1,6 +1,6 @@
// //
// ListCommandSpec.swift // ListCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-27. // Created by Ben Chatelain on 2018-12-27.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class ListCommandSpec: QuickSpec { public class ListCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("list command") { describe("list command") {
it("lists apps") { it("lists apps") {

View file

@ -1,6 +1,6 @@
// //
// LuckyCommandSpec.swift // LuckyCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class LuckyCommandSpec: QuickSpec { public class LuckyCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
@ -17,7 +17,7 @@ public class LuckyCommandSpec: QuickSpec {
let storeSearch = MasStoreSearch(networkManager: NetworkManager(session: networkSession)) let storeSearch = MasStoreSearch(networkManager: NetworkManager(session: networkSession))
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("lucky command") { describe("lucky command") {
xit("installs the first app matching a search") { xit("installs the first app matching a search") {

View file

@ -1,6 +1,6 @@
// //
// OpenCommandSpec.swift // OpenCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2019-01-03. // Created by Ben Chatelain on 2019-01-03.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.
@ -10,7 +10,7 @@ import Foundation
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class OpenCommandSpec: QuickSpec { public class OpenCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
@ -24,7 +24,7 @@ public class OpenCommandSpec: QuickSpec {
let cmd = OpenCommand(storeSearch: storeSearch, openCommand: openCommand) let cmd = OpenCommand(storeSearch: storeSearch, openCommand: openCommand)
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("open command") { describe("open command") {
beforeEach { beforeEach {

View file

@ -1,6 +1,6 @@
// //
// OutdatedCommandSpec.swift // OutdatedCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class OutdatedCommandSpec: QuickSpec { public class OutdatedCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("outdated command") { describe("outdated command") {
it("displays apps with pending updates") { it("displays apps with pending updates") {

View file

@ -1,6 +1,6 @@
// //
// PurchaseCommandSpec.swift // PurchaseCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Maximilian Blochberger on 2020-03-21. // Created by Maximilian Blochberger on 2020-03-21.
// Copyright © 2020 mas-cli. All rights reserved. // Copyright © 2020 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class PurchaseCommandSpec: QuickSpec { public class PurchaseCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("purchase command") { describe("purchase command") {
it("purchases apps") { it("purchases apps") {

View file

@ -1,6 +1,6 @@
// //
// ResetCommandSpec.swift // ResetCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class ResetCommandSpec: QuickSpec { public class ResetCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("reset command") { describe("reset command") {
it("resets the App Store state") { it("resets the App Store state") {

View file

@ -1,6 +1,6 @@
// //
// SearchCommandSpec.swift // SearchCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class SearchCommandSpec: QuickSpec { public class SearchCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
@ -22,7 +22,7 @@ public class SearchCommandSpec: QuickSpec {
let storeSearch = StoreSearchMock() let storeSearch = StoreSearchMock()
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("search command") { describe("search command") {
beforeEach { beforeEach {

View file

@ -1,6 +1,6 @@
// //
// SignInCommandSpec.swift // SignInCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,13 +9,13 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
// Deprecated test // Deprecated test
public class SignInCommandSpec: QuickSpec { public class SignInCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { 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 // account command disabled since macOS 10.13 High Sierra https://github.com/mas-cli/mas#%EF%B8%8F-known-issues
xdescribe("signin command") { xdescribe("signin command") {

View file

@ -1,6 +1,6 @@
// //
// SignOutCommandSpec.swift // SignOutCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class SignOutCommandSpec: QuickSpec { public class SignOutCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("signout command") { describe("signout command") {
it("signs out") { it("signs out") {

View file

@ -1,6 +1,6 @@
// //
// UninstallCommandSpec.swift // UninstallCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-27. // Created by Ben Chatelain on 2018-12-27.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -10,12 +10,12 @@ import Foundation
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class UninstallCommandSpec: QuickSpec { public class UninstallCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("uninstall command") { describe("uninstall command") {
let appId = 12345 let appId = 12345

View file

@ -1,6 +1,6 @@
// //
// UpgradeCommandSpec.swift // UpgradeCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class UpgradeCommandSpec: QuickSpec { public class UpgradeCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("upgrade command") { describe("upgrade command") {
it("upgrades stuff") { it("upgrades stuff") {

View file

@ -1,6 +1,6 @@
// //
// VendorCommandSpec.swift // VendorCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2019-01-03. // Created by Ben Chatelain on 2019-01-03.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class VendorCommandSpec: QuickSpec { public class VendorCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
@ -23,7 +23,7 @@ public class VendorCommandSpec: QuickSpec {
let cmd = VendorCommand(storeSearch: storeSearch, openCommand: openCommand) let cmd = VendorCommand(storeSearch: storeSearch, openCommand: openCommand)
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("vendor command") { describe("vendor command") {
beforeEach { beforeEach {

View file

@ -1,6 +1,6 @@
// //
// VersionCommandSpec.swift // VersionCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2018-12-28. // Created by Ben Chatelain on 2018-12-28.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class VersionCommandSpec: QuickSpec { public class VersionCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("version command") { describe("version command") {
it("displays the current version") { it("displays the current version") {

View file

@ -1,12 +1,12 @@
// //
// AppLibraryMock.swift // AppLibraryMock.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 12/27/18. // Created by Ben Chatelain on 12/27/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
// //
@testable import MasKit @testable import mas
class AppLibraryMock: AppLibrary { class AppLibraryMock: AppLibrary {
var installedApps = [SoftwareProduct]() var installedApps = [SoftwareProduct]()

View file

@ -1,6 +1,6 @@
// //
// MasAppLibrarySpec.swift // MasAppLibrarySpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 3/1/20. // Created by Ben Chatelain on 3/1/20.
// Copyright © 2020 mas-cli. All rights reserved. // Copyright © 2020 mas-cli. All rights reserved.
@ -9,14 +9,14 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class MasAppLibrarySpec: QuickSpec { public class MasAppLibrarySpec: QuickSpec {
override public func spec() { override public func spec() {
let library = MasAppLibrary(softwareMap: SoftwareMapMock(products: apps)) let library = MasAppLibrary(softwareMap: SoftwareMapMock(products: apps))
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("mas app library") { describe("mas app library") {
it("contains all installed apps") { it("contains all installed apps") {

View file

@ -1,6 +1,6 @@
// //
// MasStoreSearchSpec.swift // MasStoreSearchSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 1/4/19. // Created by Ben Chatelain on 1/4/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class MasStoreSearchSpec: QuickSpec { public class MasStoreSearchSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("url string") { describe("url string") {
it("contains the app name") { it("contains the app name") {

View file

@ -1,6 +1,6 @@
// //
// StoreSearchMock.swift // StoreSearchMock.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 1/4/19. // Created by Ben Chatelain on 1/4/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.
@ -8,7 +8,7 @@
import PromiseKit import PromiseKit
@testable import MasKit @testable import mas
class StoreSearchMock: StoreSearch { class StoreSearchMock: StoreSearch {
var apps: [Int: SearchResult] = [:] var apps: [Int: SearchResult] = [:]

View file

@ -1,6 +1,6 @@
// //
// MASErrorTestCase.swift // MASErrorTestCase.swift
// mas-tests // masTests
// //
// Created by Ben Chatelain on 2/11/18. // Created by Ben Chatelain on 2/11/18.
// Copyright © 2018 Andrew Naylor. All rights reserved. // Copyright © 2018 Andrew Naylor. All rights reserved.
@ -9,7 +9,7 @@
import Foundation import Foundation
import XCTest import XCTest
@testable import MasKit @testable import mas
class MASErrorTestCase: XCTestCase { class MASErrorTestCase: XCTestCase {
private let errorDomain = "MAS" private let errorDomain = "MAS"
@ -30,7 +30,7 @@ class MASErrorTestCase: XCTestCase {
override func setUp() { override func setUp() {
super.setUp() super.setUp()
MasKit.initialize() Mas.initialize()
nserror = NSError(domain: errorDomain, code: 999) nserror = NSError(domain: errorDomain, code: 999)
localizedDescription = "foo" localizedDescription = "foo"
} }

View file

@ -1,6 +1,6 @@
// //
// Bundle+JSON.swift // Bundle+JSON.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 1/5/19. // Created by Ben Chatelain on 1/5/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.
@ -28,7 +28,7 @@ extension Bundle {
let bundleURL = Bundle(for: NetworkSessionMock.self) let bundleURL = Bundle(for: NetworkSessionMock.self)
.bundleURL .bundleURL
.deletingLastPathComponent() .deletingLastPathComponent()
.appendingPathComponent("mas_MasKitTests.bundle") .appendingPathComponent("mas_masTests.bundle")
guard let bundle = Bundle(url: bundleURL), guard let bundle = Bundle(url: bundleURL),
let url = bundle.url(for: fileName) let url = bundle.url(for: fileName)
else { else {

View file

@ -1,6 +1,6 @@
// //
// String+FileExtension.swift // String+FileExtension.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 1/5/19. // Created by Ben Chatelain on 1/5/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.

View file

@ -1,6 +1,6 @@
// //
// OpenSystemCommandMock.swift // OpenSystemCommandMock.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 1/4/19. // Created by Ben Chatelain on 1/4/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.
@ -8,7 +8,7 @@
import Foundation import Foundation
@testable import MasKit @testable import mas
class OpenSystemCommandMock: ExternalCommand { class OpenSystemCommandMock: ExternalCommand {
// Stub out protocol logic // Stub out protocol logic

View file

@ -1,6 +1,6 @@
// //
// OpenSystemCommandSpec.swift // OpenSystemCommandSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 2/24/20. // Created by Ben Chatelain on 2/24/20.
// Copyright © 2020 mas-cli. All rights reserved. // Copyright © 2020 mas-cli. All rights reserved.
@ -9,12 +9,12 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class OpenSystemCommandSpec: QuickSpec { public class OpenSystemCommandSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("open system command") { describe("open system command") {
context("binary path") { context("binary path") {

View file

@ -1,6 +1,6 @@
// //
// AppListFormatterSpec.swift // AppListFormatterSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 8/23/2020. // Created by Ben Chatelain on 8/23/2020.
// Copyright © 2020 mas-cli. All rights reserved. // Copyright © 2020 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class AppListsFormatterSpec: QuickSpec { public class AppListsFormatterSpec: QuickSpec {
override public func spec() { override public func spec() {
@ -18,7 +18,7 @@ public class AppListsFormatterSpec: QuickSpec {
var products: [SoftwareProduct] = [] var products: [SoftwareProduct] = []
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("app list formatter") { describe("app list formatter") {
beforeEach { beforeEach {

View file

@ -1,6 +1,6 @@
// //
// SearchResultFormatterSpec.swift // SearchResultFormatterSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 1/14/19. // Created by Ben Chatelain on 1/14/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class SearchResultsFormatterSpec: QuickSpec { public class SearchResultsFormatterSpec: QuickSpec {
override public func spec() { override public func spec() {
@ -18,7 +18,7 @@ public class SearchResultsFormatterSpec: QuickSpec {
var results: [SearchResult] = [] var results: [SearchResult] = []
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("search results formatter") { describe("search results formatter") {
beforeEach { beforeEach {

View file

@ -1,6 +1,6 @@
// //
// SearchResultListSpec.swift // SearchResultListSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 9/2/20. // Created by Ben Chatelain on 9/2/20.
// Copyright © 2020 mas-cli. All rights reserved. // Copyright © 2020 mas-cli. All rights reserved.
@ -10,12 +10,12 @@ import Foundation
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class SearchResultListSpec: QuickSpec { public class SearchResultListSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("search result list") { describe("search result list") {
it("can parse bbedit") { it("can parse bbedit") {

View file

@ -1,6 +1,6 @@
// //
// SearchResultSpec.swift // SearchResultSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 9/2/20. // Created by Ben Chatelain on 9/2/20.
// Copyright © 2020 mas-cli. All rights reserved. // Copyright © 2020 mas-cli. All rights reserved.
@ -10,12 +10,12 @@ import Foundation
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class SearchResultSpec: QuickSpec { public class SearchResultSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("search result") { describe("search result") {
it("can parse things") { it("can parse things") {

View file

@ -1,6 +1,6 @@
// //
// SoftwareProductMock.swift // SoftwareProductMock.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 12/27/18. // Created by Ben Chatelain on 12/27/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -8,7 +8,7 @@
import Foundation import Foundation
@testable import MasKit @testable import mas
struct SoftwareProductMock: SoftwareProduct { struct SoftwareProductMock: SoftwareProduct {
var appName: String var appName: String

View file

@ -1,6 +1,6 @@
// //
// SoftwareProductSpec.swift // SoftwareProductSpec.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 9/30/21. // Created by Ben Chatelain on 9/30/21.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -10,12 +10,12 @@ import Foundation
import Nimble import Nimble
import Quick import Quick
@testable import MasKit @testable import mas
public class SoftwareProductSpec: QuickSpec { public class SoftwareProductSpec: QuickSpec {
override public func spec() { override public func spec() {
beforeSuite { beforeSuite {
MasKit.initialize() Mas.initialize()
} }
describe("software product") { describe("software product") {
let app = SoftwareProductMock( let app = SoftwareProductMock(

View file

@ -1,6 +1,6 @@
// //
// NetworkManagerTests.swift // NetworkManagerTests.swift
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 1/5/19. // Created by Ben Chatelain on 1/5/19.
// Copyright © 2019 mas-cli. All rights reserved. // Copyright © 2019 mas-cli. All rights reserved.
@ -8,12 +8,12 @@
import XCTest import XCTest
@testable import MasKit @testable import mas
class NetworkManagerTests: XCTestCase { class NetworkManagerTests: XCTestCase {
override public func setUp() { override public func setUp() {
super.setUp() super.setUp()
MasKit.initialize() Mas.initialize()
} }
func testSuccessfulAsyncResponse() throws { func testSuccessfulAsyncResponse() throws {

View file

@ -1,6 +1,6 @@
// //
// NetworkSessionMock // NetworkSessionMock
// MasKitTests // masTests
// //
// Created by Ben Chatelain on 11/13/18. // Created by Ben Chatelain on 11/13/18.
// Copyright © 2018 mas-cli. All rights reserved. // Copyright © 2018 mas-cli. All rights reserved.
@ -9,7 +9,7 @@
import Foundation import Foundation
import PromiseKit import PromiseKit
@testable import MasKit @testable import mas
/// Mock NetworkSession for testing. /// Mock NetworkSession for testing.
class NetworkSessionMock: NetworkSession { class NetworkSessionMock: NetworkSession {

Some files were not shown because too many files have changed in this diff Show more