From 9305160b2ef249cd5e0c947beab71b8a8c405255 Mon Sep 17 00:00:00 2001 From: Chris Araman Date: Mon, 1 Nov 2021 21:11:16 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/MasKit/Models/SoftwareProduct.swift | 7 +++++-- Tests/MasKitTests/Models/SoftwareProductSpec.swift | 9 +++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Sources/MasKit/Models/SoftwareProduct.swift b/Sources/MasKit/Models/SoftwareProduct.swift index b9cb43e..280266a 100644 --- a/Sources/MasKit/Models/SoftwareProduct.swift +++ b/Sources/MasKit/Models/SoftwareProduct.swift @@ -31,8 +31,11 @@ extension SoftwareProduct { // Only look at min OS version if we have one, also only consider macOS apps // Replace string literal with MasStoreSearch.Entity once `search` branch is merged. if let osVersion = Version(tolerant: storeApp.minimumOsVersion), storeApp.kind == "mac-software" { - let requiredVersion = OperatingSystemVersion(majorVersion: osVersion.major, minorVersion: osVersion.minor, - patchVersion: osVersion.patch) + let requiredVersion = OperatingSystemVersion( + majorVersion: osVersion.major, + minorVersion: osVersion.minor, + patchVersion: osVersion.patch + ) // Don't consider an app outdated if the version in the app store requires a higher OS version. guard ProcessInfo.processInfo.isOperatingSystemAtLeast(requiredVersion) else { return false diff --git a/Tests/MasKitTests/Models/SoftwareProductSpec.swift b/Tests/MasKitTests/Models/SoftwareProductSpec.swift index 2f192a7..ba1262f 100644 --- a/Tests/MasKitTests/Models/SoftwareProductSpec.swift +++ b/Tests/MasKitTests/Models/SoftwareProductSpec.swift @@ -18,8 +18,13 @@ public class SoftwareProductSpec: QuickSpec { MasKit.initialize() } describe("software product") { - let app = SoftwareProductMock(appName: "App", bundleIdentifier: "", bundlePath: "", bundleVersion: "1.0.0", - itemIdentifier: 111) + let app = SoftwareProductMock( + appName: "App", + bundleIdentifier: "", + bundlePath: "", + bundleVersion: "1.0.0", + itemIdentifier: 111 + ) let currentApp = SearchResult(kind: "mac-software", version: "1.0.0") let appUpdate = SearchResult(kind: "mac-software", version: "2.0.0")