Skip to content

Commit

Permalink
🧹 Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-araman committed Nov 3, 2021
1 parent 3dc5789 commit 9305160
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Sources/MasKit/Models/SoftwareProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions Tests/MasKitTests/Models/SoftwareProductSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9305160

Please sign in to comment.