Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickl committed Mar 3, 2018
1 parent 7a806ad commit 961ea74
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 48 deletions.
2 changes: 1 addition & 1 deletion AwaitKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AwaitKit'
s.version = '4.0.0'
s.version = '5.0.0'
s.license = 'MIT'
s.summary = 'The ES8 Async/Await control flow for Swift '
s.homepage = 'https://github.com/yannickl/AwaitKit.git'
Expand Down
58 changes: 38 additions & 20 deletions AwaitKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
CE21EFF2204B556300BDDA39 /* AwaitKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE41FCD21F46D9A700CD2271 /* AwaitKit.swift */; };
FE41FCDD1F46D9AC00CD2271 /* AwaitKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE41FCD21F46D9A700CD2271 /* AwaitKit.swift */; };
FE41FCDE1F46D9AC00CD2271 /* AwaitKitExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE41FCD31F46D9A700CD2271 /* AwaitKitExtension.swift */; };
FE41FCDF1F46D9AC00CD2271 /* DispatchQueue+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE41FCD41F46D9A700CD2271 /* DispatchQueue+Async.swift */; };
Expand All @@ -19,6 +20,13 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
CE21EFF4204B556300BDDA39 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FE41FCFD1F46DA7800CD2271 /* PromiseKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 633027EA203CC0060037E136;
remoteInfo = PMKDeprecatedTests;
};
FE41FD051F46DA7800CD2271 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FE41FCFD1F46DA7800CD2271 /* PromiseKit.xcodeproj */;
Expand Down Expand Up @@ -47,13 +55,6 @@
remoteGlobalIDString = 630019221D596292003B4E30;
remoteInfo = PMKCoreTests;
};
FE41FD0D1F46DA7800CD2271 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FE41FCFD1F46DA7800CD2271 /* PromiseKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 6314112F1D5978D700E24B9E;
remoteInfo = PMKDispatchTests;
};
FE41FD0F1F46DA8E00CD2271 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FE41FCFD1F46DA7800CD2271 /* PromiseKit.xcodeproj */;
Expand Down Expand Up @@ -137,7 +138,7 @@
FE41FD081F46DA7800CD2271 /* PMKA+Tests.xctest */,
FE41FD0A1F46DA7800CD2271 /* PMKBridgeTests.xctest */,
FE41FD0C1F46DA7800CD2271 /* PMKCoreTests.xctest */,
FE41FD0E1F46DA7800CD2271 /* PMKDispatchTests.xctest */,
CE21EFF5204B556300BDDA39 /* PMKDeprecatedTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -217,15 +218,17 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = "Yannick Loriot";
TargetAttributes = {
FE41FD5C1F46F19F00CD2271 = {
CreatedOnToolsVersion = 8.3.3;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
};
FEF0141D1E39E12200C4A60B = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -256,6 +259,13 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
CE21EFF5204B556300BDDA39 /* PMKDeprecatedTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = PMKDeprecatedTests.xctest;
remoteRef = CE21EFF4204B556300BDDA39 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
FE41FD061F46DA7800CD2271 /* PromiseKit.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down Expand Up @@ -284,13 +294,6 @@
remoteRef = FE41FD0B1F46DA7800CD2271 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
FE41FD0E1F46DA7800CD2271 /* PMKDispatchTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = PMKDispatchTests.xctest;
remoteRef = FE41FD0D1F46DA7800CD2271 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
Expand All @@ -311,6 +314,7 @@
FE41FD661F46F1C300CD2271 /* AwaitKitAwaitTests.swift in Sources */,
FE41FD671F46F1C300CD2271 /* AwaitKitTests.swift in Sources */,
FE41FD651F46F1C300CD2271 /* AwaitKitAsyncTests.swift in Sources */,
CE21EFF2204B556300BDDA39 /* AwaitKit.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -348,7 +352,7 @@
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
INFOPLIST_FILE = "$(SRCROOT)/Tests/AwaitKitTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -359,7 +363,7 @@
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
INFOPLIST_FILE = "$(SRCROOT)/Tests/AwaitKitTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks @executable_path/../Frameworks @loader_path/../Frameworks";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -370,15 +374,21 @@
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -412,6 +422,7 @@
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos watchsimulator iphonesimulator watchos iphoneos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
Expand All @@ -425,15 +436,21 @@
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand All @@ -459,6 +476,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos watchsimulator iphonesimulator watchos iphoneos";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -477,7 +495,7 @@
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -492,7 +510,7 @@
LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
4 changes: 3 additions & 1 deletion AwaitKit.xcodeproj/xcshareddata/xcschemes/AwaitKit.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "mxcl/PromiseKit" ~> 4.5
github "mxcl/PromiseKit" ~> 6.2
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "mxcl/PromiseKit" "4.3.2"
github "mxcl/PromiseKit" "6.2.0"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/PromiseKit
Submodule PromiseKit updated 127 files
2 changes: 1 addition & 1 deletion Example/Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>5.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let package = Package(
targets: ["AwaitKit"]),
],
dependencies: [
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "4.5.1")
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.2.0")
],
targets: [
.target(
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Have you ever dream to write asynchronous code like its synchronous counterpart?

_AwaitKit_ is a powerful Swift library inspired by the [Async/Await specification in ES8 (ECMAScript 2017)](https://github.com/tc39/ecmascript-asyncawait) which provides a powerful way to write asynchronous code in a sequential manner.

Internally it uses [PromiseKit](https://github.com/mxcl/PromiseKit) to create and manage promises.
Internally it uses [PromiseKit](https://github.com/mxcl/PromiseKit) v6.2 to create and manage promises.

<p align="center">
<a href="#requirements">Requirements</a> • <a href="#getting-started">Getting Started</a> • <a href="#usage">Usage</a> • <a href="#installation">Installation</a> • <a href="#contribution">Contribution</a> • <a href="#contact">Contact</a> • <a href="#license-mit">License</a>
Expand Down Expand Up @@ -162,7 +162,7 @@ $ touch Podfile
$ edit Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod 'AwaitKit', '~> 4.0.0'
pod 'AwaitKit', '~> 5.0.0'
```

Install into your project:
Expand All @@ -171,7 +171,7 @@ Install into your project:
$ pod install
```

If CocoaPods did not find the `PromiseKit 4.5.1` dependency execute this command:
If CocoaPods did not find the `PromiseKit 6.0` dependency execute this command:

```bash
$ pod repo update
Expand Down Expand Up @@ -214,14 +214,14 @@ $ brew install carthage
To integrate AwaitKit into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "yannickl/AwaitKit" ~> 4.0
github "yannickl/AwaitKit" ~> 5.0
```

Run `carthage update` to build the framework and drag the built `AwaitKit.framework` into your Xcode project.

### Manually

[Download](https://github.com/YannickL/AwaitKit/archive/master.zip) the project and copy the `AwaitKit` folder into your project to use it in. Note that you also need to download the [PromiseKit](https://github.com/mxcl/PromiseKit) library and import it to your project.
[Download](https://github.com/YannickL/AwaitKit/archive/master.zip) the project and copy the `AwaitKit` folder into your project to use it in. Note that you also need to download the [PromiseKit](https://github.com/mxcl/PromiseKit) v6.2 library and import it to your project.

## Contribution

Expand Down
2 changes: 1 addition & 1 deletion Sources/AwaitKit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.0.0</string>
<string>5.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 3 additions & 1 deletion Tests/AwaitKitTests/AwaitKitAsyncTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ class AwaitKitAsyncTests: XCTestCase {
return "AwaitedPromiseKit"
}

_ = promise.then { value in
_ = promise.then { value -> Promise<Void> in
expect.fulfill()

return Promise()
}

waitForExpectations(timeout: 0.5) { error in
Expand Down
12 changes: 6 additions & 6 deletions Tests/AwaitKitTests/AwaitKitAwaitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class AwaitKitAwaitTests: XCTestCase {
let commonError = NSError(domain: "com.yannickloriot.error", code: 320, userInfo: nil)

func testSimpleAwaitPromise() {
let promise: Promise<String> = Promise { resolve, reject in
let promise: Promise<String> = Promise { seal in
let deadlineTime = DispatchTime.now() + .seconds(1)

backgroundQueue.asyncAfter(deadline: deadlineTime, execute: {
resolve("AwaitedPromiseKit")
seal.fulfill("AwaitedPromiseKit")
})
}

Expand All @@ -47,20 +47,20 @@ class AwaitKitAwaitTests: XCTestCase {
}

func testSimpleFailedAwaitPromise() {
let promise: Promise<String> = Promise { resolve, reject in
let promise: Promise<String> = Promise { seal in
let deadlineTime = DispatchTime.now() + .seconds(1)

backgroundQueue.asyncAfter(deadline: deadlineTime, execute: {
reject(self.commonError)
seal.reject(self.commonError)
})
}

XCTAssertThrowsError(try await(promise))
}

func testNoValueAwaitPromise() {
let promise: Promise<Void> = Promise { resolve, reject in
resolve(())
let promise: Promise<Void> = Promise { seal in
seal.fulfill(())
}

XCTAssertNotNil(promise.value)
Expand Down
Loading

0 comments on commit 961ea74

Please sign in to comment.