Skip to content

Commit b61441b

Browse files
committed
PMK 5.0.0
1 parent f7b1152 commit b61441b

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ xcuserdata
22
*.xcscmblueprint
33
/Carthage
44
/.build
5+
.DS_Store

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "mxcl/PromiseKit" ~> 4.0
1+
github "mxcl/PromiseKit" ~> 5.0

Sources/MKDirections+Promise.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import MapKit
2-
#if !COCOAPODS
2+
#if !PMKCocoaPods
33
import PromiseKit
44
#endif
55

@@ -16,11 +16,11 @@ import PromiseKit
1616
extension MKDirections {
1717
/// Begins calculating the requested route information asynchronously.
1818
public func calculate() -> Promise<MKDirectionsResponse> {
19-
return PromiseKit.wrap(calculate)
19+
return Promise(.pending) { calculate(completionHandler: $0.resolve) }
2020
}
2121

2222
/// Begins calculating the requested travel-time information asynchronously.
2323
public func calculateETA() -> Promise<MKETAResponse> {
24-
return PromiseKit.wrap(calculateETA)
24+
return Promise(.pending) { calculateETA(completionHandler: $0.resolve) }
2525
}
2626
}

Sources/MKMapSnapshotter+Promise.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import MapKit
2-
#if !COCOAPODS
2+
#if !PMKCocoaPods
33
import PromiseKit
44
#endif
55

@@ -16,6 +16,6 @@ import PromiseKit
1616
extension MKMapSnapshotter {
1717
/// Starts generating the snapshot using the options set in this object.
1818
public func start() -> Promise<MKMapSnapshot> {
19-
return PromiseKit.wrap(start)
19+
return Promise(.pending) { start(completionHandler: $0.resolve) }
2020
}
2121
}

Tests/TestMapKit.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Test_MKDirections_Swift: XCTestCase {
1616
let rq = MKDirectionsRequest()
1717
let directions = MockDirections(request: rq)
1818

19-
directions.calculate().then { _ in
19+
directions.calculate().done { _ in
2020
ex.fulfill()
2121
}
2222

@@ -34,7 +34,7 @@ class Test_MKDirections_Swift: XCTestCase {
3434
}
3535

3636
let rq = MKDirectionsRequest()
37-
MockDirections(request: rq).calculateETA().then { (rsp: MKETAResponse) in
37+
MockDirections(request: rq).calculateETA().done { rsp in
3838
ex.fulfill()
3939
}
4040

@@ -54,7 +54,7 @@ class Test_MKSnapshotter_Swift: XCTestCase {
5454
}
5555

5656
let snapshotter = MockSnapshotter()
57-
snapshotter.start().then { _ in
57+
snapshotter.start().done { _ in
5858
ex.fulfill()
5959
}
6060

0 commit comments

Comments
 (0)