0001    //
0002    //  RunResult.swift
0003    //  RunResults
0004    //
0005    //  Created by Omar Abdelhafith on 05/11/2015.
0006    //  Copyright © 2015 Omar Abdelhafith. All rights reserved.
0007    //
0008    
0009    import Foundation
0010    
0011    
0012    /**
0013     *  Structure to hold results from run
0014     */
0015    public struct RunResults
Runner.swift:20
    class func run(command: String, args: String...) -> RunResults {
Runner.swift:24
    class func run(command: String, args: [String]) -> RunResults {
Runner.swift:29
    class func run(command: String, settings: (RunSettings -> Void)) -> RunResults {
Runner.swift:36
    class func run(command: String, args: [String], settings: (RunSettings -> Void)) -> RunResults {
Runner.swift:43
    class func run(command: String, echo: EchoSettings) -> RunResults {
Runner.swift:49
    class func run(command: String, args: [String], settings: RunSettings) -> RunResults {
Runner.swift:53
        let result: RunResults
Runner.swift:70
    private class func executeDryCommand(commandParts: [String]) -> RunResults {
Runner.swift:74
    private class func executeIneractiveCommand(commandParts: [String]) -> RunResults {
Runner.swift:78
    private class func executeActualCommand(commandParts: [String]) -> RunResults {
Runner.swift:82
    private class func execute(commandParts: [String], withExecutor executor: TaskExecutor) -> RunResults {
Runner.swift:87
        return RunResults(exitStatus: status, stdout: stdout, stderr: stderr)
Runner.swift:100
    private class func echoResult(result: RunResults, settings: RunSettings) {
ShortHandRunner.swift:19
public func run(command: String, args: String...) -> RunResults {
ShortHandRunner.swift:32
public func run(command: String, args: [String]) -> RunResults {
ShortHandRunner.swift:45
public func run(command: String, settingsBlock: (RunSettings -> Void)) -> RunResults {
ShortHandRunner.swift:59
public func run(command: String, args: [String], settings: (RunSettings -> Void)) -> RunResults {
ShortHandRunner.swift:72
func run(command: String, echo: EchoSettings) -> RunResults {
{ 0016 0017 /// Command exit status 0018 public let exitStatus
Runner.swift:17
        return run(command, args: [], settings: initalSettings).exitStatus
: Int 0019 0020 /// Command output stdout 0021 public let stdout
Env.swift:16
    let keyValues = run("env").stdout.componentsSeparatedByString("\n")
Runner.swift:102
            echoStringIfNotEmpty("Stdout", string: result.stdout)
: String 0022 0023 /// Command output stderr 0024 public let stderr
Runner.swift:106
            echoStringIfNotEmpty("Stderr", string: result.stderr)
: String 0025 } 0026 0027 // MARK:- Internal 0028 0029 func splitCommandToArgs
Runner.swift:91
        return splitCommandToArgs(command) + args
(command: String) -> [String] { 0030 if command.containsString(" ") { 0031 return command.componentsSeparatedByString(" ") 0032 } 0033 0034 return [command] 0035 } 0036 0037 func readPipe
Runner.swift:85
        let stdout = readPipe(stdoutPipe).stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())
Runner.swift:86
        let stderr = readPipe(stderrPipe).stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())
(pipe: TaskPipe) -> String { 0038 let data = pipe.read() 0039 return NSString(data: data, encoding: NSUTF8StringEncoding) as? String ?? "" 0040 }