Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation on Linux #56

Merged
merged 4 commits into from
Jul 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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