Skip to content

Commit

Permalink
Merge pull request #56 from jpsim/jp-linux
Browse files Browse the repository at this point in the history
Fix compilation on Linux
  • Loading branch information
Liquidsoul authored Jul 30, 2017
2 parents dc04147 + fd0c3a0 commit d79ede7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Sources/Context.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Tests/StencilSwiftKitTests/TestsHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(""))
Expand Down

0 comments on commit d79ede7

Please sign in to comment.