Skip to content
Open
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
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ osx_image: xcode7.2

env:
matrix:
- OPTIONS="-sdk iphonesimulator -scheme iOS-Tests test -parallelize"
- OPTIONS="-scheme OSX-Tests test -parallelize"
- OPTIONS="-scheme tvOS-Tests build-tests CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO"
- OPTIONS="-sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' -scheme iOS-Tests test"
- OPTIONS="-scheme OSX-Tests test"
- OPTIONS="-scheme tvOS-Tests test CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO"

before_script:
- cd Project/ && pod install

script:
- xctool -workspace OMPromises.xcworkspace $OPTIONS
- xcodebuild -workspace OMPromises.xcworkspace $OPTIONS

notifications:
email: false
9 changes: 3 additions & 6 deletions Project/Podfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
target :ios do
target 'iOS-Tests' do
platform :ios, '5.0'
link_with 'iOS-Tests'
pod 'OMPromises/HTTP', :path => '../'
end

target :osx do
target 'OSX-Tests' do
platform :osx, '10.7'
link_with 'OSX-Tests'
pod 'OMPromises/HTTP', :path => '../'
end

target :tvos do
target 'tvOS-Tests' do
platform :tvos, '9.0'
link_with 'tvOS-Tests'
pod 'OMPromises/HTTP', :path => '../'
end
4 changes: 2 additions & 2 deletions Sources/Core/OMLazyPromise.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN
@return A new _lazy_ promise.
@see lazyPromiseWithTask:on:
*/
+ (OMLazyPromise<ResultType> *)promiseWithTask:(id (^)())task;
+ (OMLazyPromise<ResultType> *)promiseWithTask:(id (^)(void))task;

/** Similar to promiseWithTask:, but executes the block on the specified queue.

Expand All @@ -53,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
@return A new _lazy_ promise.
@see lazyPromiseWithTask:
*/
+ (OMLazyPromise<ResultType> *)promiseWithTask:(id (^)())task on:(dispatch_queue_t)queue;
+ (OMLazyPromise<ResultType> *)promiseWithTask:(id (^)(void))task on:(dispatch_queue_t)queue;

+ (OMLazyPromise<ResultType> *)promiseWithDetailedTask:(void (^)(OMDeferred *deferred))task;

Expand Down
4 changes: 2 additions & 2 deletions Sources/Core/OMLazyPromise.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ - (instancetype)initWithTask:(void (^)(OMDeferred *))task on:(dispatch_queue_t)q
return self;
}

+ (OMLazyPromise *)promiseWithTask:(id (^)())task {
+ (OMLazyPromise *)promiseWithTask:(id (^)(void))task {
return [OMLazyPromise promiseWithTask:task on:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)];
}

+ (OMLazyPromise *)promiseWithTask:(id (^)())task on:(dispatch_queue_t)queue {
+ (OMLazyPromise *)promiseWithTask:(id (^)(void))task on:(dispatch_queue_t)queue {
return [[OMLazyPromise alloc] initWithTask:^(OMDeferred *deferred) {
id result = task();

Expand Down
4 changes: 2 additions & 2 deletions Sources/Core/OMPromise.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ extern NSString *const OMPromisesErrorDomain;
@see promiseWithTask:on:
@see promiseWithLazyTask:
*/
+ (OMPromise<ResultType> *)promiseWithTask:(id (^)())task;
+ (OMPromise<ResultType> *)promiseWithTask:(id (^)(void))task;

/** Similar to promiseWithTask:, but executes the block on a specific queue.

Expand All @@ -192,7 +192,7 @@ extern NSString *const OMPromisesErrorDomain;
@return A new promise.
@see promiseWithTask:
*/
+ (OMPromise<ResultType> *)promiseWithTask:(id (^)())task on:(dispatch_queue_t)queue;
+ (OMPromise<ResultType> *)promiseWithTask:(id (^)(void))task on:(dispatch_queue_t)queue;

/** Create a fulfilled promise.

Expand Down
4 changes: 2 additions & 2 deletions Sources/Core/OMPromise.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ - (OMPromise *)on:(dispatch_queue_t)queue {

#pragma mark - Return

+ (OMPromise *)promiseWithTask:(id (^)())task {
+ (OMPromise *)promiseWithTask:(id (^)(void))task {
return [OMPromise promiseWithTask:task on:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)];
}

+ (OMPromise *)promiseWithTask:(id (^)())task on:(dispatch_queue_t)queue {
+ (OMPromise *)promiseWithTask:(id (^)(void))task on:(dispatch_queue_t)queue {
return [[OMPromise promiseWithResult:nil]
then:^(id _) {
return task();
Expand Down