Implement PathContaining on relevant models

This commit is contained in:
Ell Neal
2019-01-13 18:22:34 +00:00
parent f9df768ec0
commit 98aeef46dc
8 changed files with 112 additions and 1 deletions
+8
View File
@@ -1,5 +1,6 @@
import Foundation
import JSONUtilities
import struct PathKit.Path
public struct BuildScript: Equatable {
@@ -53,3 +54,10 @@ extension BuildScript: JSONObjectConvertible {
showEnvVars = jsonDictionary.json(atKeyPath: "showEnvVars") ?? true
}
}
extension BuildScript: PathContaining {
static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary {
return expandStringPaths(from: source, forKey: "path", relativeTo: path)
}
}