Rename PathContaining -> PathContainer

This commit is contained in:
Ell Neal 2019-01-21 13:32:13 +00:00
parent 05a564c324
commit 151d78ef98
No known key found for this signature in database
GPG Key ID: 0AAD6C98BA484C61
9 changed files with 12 additions and 12 deletions

View File

@ -63,7 +63,7 @@ extension AggregateTarget: NamedJSONDictionaryConvertible {
} }
} }
extension AggregateTarget: PathContaining { extension AggregateTarget: PathContainer {
static func expandPaths(for source: [String: JSONDictionary], relativeTo path: Path) -> [String: JSONDictionary] { static func expandPaths(for source: [String: JSONDictionary], relativeTo path: Path) -> [String: JSONDictionary] {
var result = source var result = source

View File

@ -55,7 +55,7 @@ extension BuildScript: JSONObjectConvertible {
} }
} }
extension BuildScript: PathContaining { extension BuildScript: PathContainer {
static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary { static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary {
return expandStringPaths(from: source, forKey: "path", relativeTo: path) return expandStringPaths(from: source, forKey: "path", relativeTo: path)

View File

@ -74,7 +74,7 @@ extension Dependency: JSONObjectConvertible {
} }
} }
extension Dependency: PathContaining { extension Dependency: PathContainer {
static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary { static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary {
return expandStringPaths(from: source, forKey: "framework", relativeTo: path) return expandStringPaths(from: source, forKey: "framework", relativeTo: path)

View File

@ -26,7 +26,7 @@ extension Plist: JSONObjectConvertible {
} }
} }
extension Plist: PathContaining { extension Plist: PathContainer {
static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary { static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary {
return expandStringPaths(from: source, forKey: "path", relativeTo: path) return expandStringPaths(from: source, forKey: "path", relativeTo: path)
} }

View File

@ -175,7 +175,7 @@ extension Project {
} }
} }
extension Project: PathContaining { extension Project: PathContainer {
static func expandPaths(for spec: Spec, relativeTo basePath: Path = Path()) -> Spec { static func expandPaths(for spec: Spec, relativeTo basePath: Path = Path()) -> Spec {
let relativePath = (basePath + spec.relativePath).normalize() let relativePath = (basePath + spec.relativePath).normalize()

View File

@ -17,13 +17,13 @@ extension Project {
} }
} }
protocol PathContaining { protocol PathContainer {
associatedtype JSONSourceType associatedtype JSONSourceType
static func expandPaths(for source: JSONSourceType, relativeTo path: Path) -> JSONSourceType static func expandPaths(for source: JSONSourceType, relativeTo path: Path) -> JSONSourceType
} }
extension PathContaining { extension PathContainer {
static func expandStringPaths(from source: JSONDictionary, forKey key: String, relativeTo path: Path) -> JSONDictionary { static func expandStringPaths(from source: JSONDictionary, forKey key: String, relativeTo path: Path) -> JSONDictionary {
var result = source var result = source
@ -38,7 +38,7 @@ extension PathContaining {
return result return result
} }
static func expandChildPaths<T: PathContaining>(from source: JSONDictionary, forKey key: String, relativeTo path: Path, type: T.Type) -> JSONDictionary { static func expandChildPaths<T: PathContainer>(from source: JSONDictionary, forKey key: String, relativeTo path: Path, type: T.Type) -> JSONDictionary {
var result = source var result = source
if let source = result[key] as? T.JSONSourceType { if let source = result[key] as? T.JSONSourceType {
@ -51,7 +51,7 @@ extension PathContaining {
return result return result
} }
static func expandChildPaths<T: PathContaining>(from source: JSONDictionary, forPotentialKeys keys: [String], relativeTo path: Path, type: T.Type) -> JSONDictionary { static func expandChildPaths<T: PathContainer>(from source: JSONDictionary, forPotentialKeys keys: [String], relativeTo path: Path, type: T.Type) -> JSONDictionary {
var result = source var result = source
for key in keys { for key in keys {

View File

@ -122,7 +122,7 @@ extension SpecOptions: JSONObjectConvertible {
} }
} }
extension SpecOptions: PathContaining { extension SpecOptions: PathContainer {
static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary { static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary {
var result = source var result = source

View File

@ -111,7 +111,7 @@ extension Target: CustomStringConvertible {
} }
} }
extension Target: PathContaining { extension Target: PathContainer {
static func expandPaths(for source: [String: JSONDictionary], relativeTo path: Path) -> [String: JSONDictionary] { static func expandPaths(for source: [String: JSONDictionary], relativeTo path: Path) -> [String: JSONDictionary] {
var result = source var result = source

View File

@ -208,7 +208,7 @@ extension TargetSource.BuildPhase.CopyFilesSettings: JSONObjectConvertible {
} }
} }
extension TargetSource: PathContaining { extension TargetSource: PathContainer {
static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary { static func expandPaths(for source: JSONDictionary, relativeTo path: Path) -> JSONDictionary {
var result = source var result = source