Skip to content

Commit a42e9fe

Browse files
author
Rob Rix
committed
Merge pull request #9 from Carthage/upgrade-dependencies
Upgrade dependencies
2 parents 3c62094 + 39ac48d commit a42e9fe

File tree

12 files changed

+155
-145
lines changed

12 files changed

+155
-145
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "Carthage.checkout/LlamaKit"]
22
path = Carthage/Checkouts/LlamaKit
3-
url = https://github.com/Carthage/LlamaKit.git
3+
url = https://github.com/LlamaKit/LlamaKit.git
44
[submodule "Carthage.checkout/Nimble"]
55
path = Carthage/Checkouts/Nimble
66
url = https://github.com/Quick/Nimble.git

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "ReactiveCocoa/ReactiveCocoa" "swift-development"
2-
github "Carthage/LlamaKit" == 0.1.1
2+
github "LlamaKit/LlamaKit" == 0.5

Cartfile.private

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github "Quick/Quick" == 0.2.0
2-
github "Quick/Nimble"
1+
github "Quick/Quick" ~> 0.2
2+
github "Quick/Nimble" ~> 0.3
33
github "jspahrsummers/xcconfigs" >= 0.6

Cartfile.resolved

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github "Carthage/LlamaKit" "carthage-0.1.1"
2-
github "Quick/Nimble" "v0.2.0"
3-
github "Quick/Quick" "v0.2.0"
4-
github "jspahrsummers/xcconfigs" "0.7"
5-
github "ReactiveCocoa/ReactiveCocoa" "e94a432e6c47e03f47cb263225ceccffe9b7bea6"
1+
github "LlamaKit/LlamaKit" "v0.5.0"
2+
github "Quick/Nimble" "v0.3.0"
3+
github "Quick/Quick" "v0.2.2"
4+
github "jspahrsummers/xcconfigs" "0.7.2"
5+
github "ReactiveCocoa/ReactiveCocoa" "240140c14d023cdb49f4ddf9622c3131619b2197"

Carthage/Checkouts/LlamaKit

Carthage/Checkouts/ReactiveCocoa

Submodule ReactiveCocoa updated 73 files

Carthage/Checkouts/xcconfigs

ReactiveTask/Errors.swift

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,44 @@
77
//
88

99
import Foundation
10+
import ReactiveCocoa
1011

11-
/// Possible error codes within `ReactiveTaskErrorDomain`.
12-
public enum ReactiveTaskError: Int {
13-
/// The domain for all errors originating within ReactiveTask.
14-
public static let domain: NSString = "org.carthage.ReactiveTask"
12+
/// An error originating from ReactiveTask.
13+
public enum ReactiveTaskError {
14+
/// A shell task exited unsuccessfully.
15+
case ShellTaskFailed(exitCode: Int32, standardError: String?)
1516

16-
/// In a user info dictionary, associated with the exit code from a child
17-
/// process.
18-
public static let exitCodeKey: NSString = "ReactiveTaskErrorExitCode"
17+
/// An error was returned from a POSIX API.
18+
case POSIXError(Int32)
19+
}
1920

20-
/// In a user info dictionary, associated with any accumulated stderr
21-
/// string.
22-
public static let standardErrorKey: NSString = "ReactiveTaskErrorStandardError"
21+
extension ReactiveTaskError: ErrorType {
22+
public var nsError: NSError {
23+
switch self {
24+
case let .POSIXError(code):
25+
return NSError(domain: NSPOSIXErrorDomain, code: Int(code), userInfo: nil)
2326

24-
/// A shell task exited unsuccessfully.
25-
case ShellTaskFailed
27+
default:
28+
return NSError(domain: "org.carthage.ReactiveTask", code: 0, userInfo: [
29+
NSLocalizedDescriptionKey: self.description
30+
])
31+
}
32+
}
33+
}
34+
35+
extension ReactiveTaskError: Printable {
36+
public var description: String {
37+
switch self {
38+
case let .ShellTaskFailed(exitCode, standardError):
39+
var description = "A shell task failed with exit code \(exitCode)"
40+
if let standardError = standardError {
41+
description += ":\n\(standardError)"
42+
}
43+
44+
return description
45+
46+
case let .POSIXError:
47+
return nsError.description
48+
}
49+
}
2650
}

0 commit comments

Comments
 (0)