diff --git a/Sources/Context.swift b/Sources/Context.swift index 3e70c673..80e4cdd9 100644 --- a/Sources/Context.swift +++ b/Sources/Context.swift @@ -22,7 +22,8 @@ public enum StencilContext { /// - Throws: `Parameters.Error` public static func enrich(context: [String: Any], parameters: [String], - environment: [String: String] = ProcessInfo().environment) throws -> [String: Any] { + environment: [String: String] = + ProcessInfo.processInfo.environment) throws -> [String: Any] { var context = context context[environmentKey] = merge(context[environmentKey], with: environment) diff --git a/Sources/SwiftIdentifier.swift b/Sources/SwiftIdentifier.swift index 654b98fd..68d9e5e8 100644 --- a/Sources/SwiftIdentifier.swift +++ b/Sources/SwiftIdentifier.swift @@ -69,7 +69,7 @@ func swiftIdentifier(from string: String, let mappedParts = parts.map({ (string: String) -> String in // Can't use capitalizedString here because it will lowercase all letters after the first // e.g. "SomeNiceIdentifier".capitalizedString will because "Someniceidentifier" which is not what we want - let ns = string as NSString + let ns = NSString(string: string) if ns.length > 0 { let firstLetter = ns.substring(to: 1) let rest = ns.substring(from: 1) diff --git a/Tests/StencilSwiftKitTests/TestsHelper.swift b/Tests/StencilSwiftKitTests/TestsHelper.swift index 6128f041..6bb40fed 100644 --- a/Tests/StencilSwiftKitTests/TestsHelper.swift +++ b/Tests/StencilSwiftKitTests/TestsHelper.swift @@ -9,7 +9,7 @@ import XCTest import PathKit private let colorCode: (String) -> String = - ProcessInfo().environment["XcodeColors"] == "YES" ? { "\u{001b}[\($0);" } : { _ in "" } + ProcessInfo.processInfo.environment["XcodeColors"] == "YES" ? { "\u{001b}[\($0);" } : { _ in "" } private let (msgColor, reset) = (colorCode("fg250,0,0"), colorCode("")) private let okCode = (num: colorCode("fg127,127,127"), code: colorCode(""))