File tree Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ xcuserdata
2
2
* .xcscmblueprint
3
3
/Carthage
4
4
/.build
5
+ .DS_Store
Original file line number Diff line number Diff line change 1
- github "mxcl/PromiseKit" ~> 4 .0
1
+ github "mxcl/PromiseKit" ~> 5 .0
Original file line number Diff line number Diff line change 1
1
import MapKit
2
- #if !COCOAPODS
2
+ #if !PMKCocoaPods
3
3
import PromiseKit
4
4
#endif
5
5
@@ -16,11 +16,11 @@ import PromiseKit
16
16
extension MKDirections {
17
17
/// Begins calculating the requested route information asynchronously.
18
18
public func calculate( ) -> Promise < MKDirectionsResponse > {
19
- return PromiseKit . wrap ( calculate)
19
+ return Promise ( . pending ) { calculate ( completionHandler : $0 . resolve ) }
20
20
}
21
21
22
22
/// Begins calculating the requested travel-time information asynchronously.
23
23
public func calculateETA( ) -> Promise < MKETAResponse > {
24
- return PromiseKit . wrap ( calculateETA)
24
+ return Promise ( . pending ) { calculateETA ( completionHandler : $0 . resolve ) }
25
25
}
26
26
}
Original file line number Diff line number Diff line change 1
1
import MapKit
2
- #if !COCOAPODS
2
+ #if !PMKCocoaPods
3
3
import PromiseKit
4
4
#endif
5
5
@@ -16,6 +16,6 @@ import PromiseKit
16
16
extension MKMapSnapshotter {
17
17
/// Starts generating the snapshot using the options set in this object.
18
18
public func start( ) -> Promise < MKMapSnapshot > {
19
- return PromiseKit . wrap ( start)
19
+ return Promise ( . pending ) { start ( completionHandler : $0 . resolve ) }
20
20
}
21
21
}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class Test_MKDirections_Swift: XCTestCase {
16
16
let rq = MKDirectionsRequest ( )
17
17
let directions = MockDirections ( request: rq)
18
18
19
- directions. calculate ( ) . then { _ in
19
+ directions. calculate ( ) . done { _ in
20
20
ex. fulfill ( )
21
21
}
22
22
@@ -34,7 +34,7 @@ class Test_MKDirections_Swift: XCTestCase {
34
34
}
35
35
36
36
let rq = MKDirectionsRequest ( )
37
- MockDirections ( request: rq) . calculateETA ( ) . then { ( rsp: MKETAResponse ) in
37
+ MockDirections ( request: rq) . calculateETA ( ) . done { rsp in
38
38
ex. fulfill ( )
39
39
}
40
40
@@ -54,7 +54,7 @@ class Test_MKSnapshotter_Swift: XCTestCase {
54
54
}
55
55
56
56
let snapshotter = MockSnapshotter ( )
57
- snapshotter. start ( ) . then { _ in
57
+ snapshotter. start ( ) . done { _ in
58
58
ex. fulfill ( )
59
59
}
60
60
You can’t perform that action at this time.
0 commit comments