diff --git a/.travis.yml b/.travis.yml index 8036541..6fffa5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,59 +15,45 @@ matrix: dist: xenial sudo: required services: docker - env: DOCKER_IMAGE=swift:4.1.3 SWIFT_SNAPSHOT=4.1.3 + env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu16.04:5.1.5 - os: linux - dist: xenial + dist: bionic sudo: required services: docker - env: DOCKER_IMAGE=swift:4.2.4 SWIFT_SNAPSHOT=4.2.4 + env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:5.4 - os: linux dist: xenial sudo: required services: docker - env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci:5.0.3 SWIFT_SNAPSHOT=5.0.3 + env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:latest USE_SWIFT_DEVELOPMENT_SNAPSHOT=1 - os: linux dist: xenial sudo: required services: docker # Run Kitura tests in addition to Kitura-net tests - env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci:5.1 CUSTOM_TEST_SCRIPT=.kitura-test.sh DOCKER_ENVIRONMENT=CUSTOM_TEST_SCRIPT + env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:latest CUSTOM_TEST_SCRIPT=.kitura-test.sh DOCKER_ENVIRONMENT=CUSTOM_TEST_SCRIPT - os: linux dist: xenial sudo: required services: docker # Test GCD_ASYNCH codepath on Linux - env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci:5.1 CUSTOM_TEST_SCRIPT=testWithGCD.sh DOCKER_ENVIRONMENT=CUSTOM_TEST_SCRIPT - - os: linux - dist: xenial - sudo: required - services: docker - env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci:5.1 SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT + env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:latest CUSTOM_TEST_SCRIPT=testWithGCD.sh DOCKER_ENVIRONMENT=CUSTOM_TEST_SCRIPT - os: osx - osx_image: xcode9.4 + osx_image: xcode11 sudo: required - env: SWIFT_SNAPSHOT=4.1.2 + env: SWIFT_SNAPSHOT=5.1.5 JAZZY_ELIGIBLE=true - os: osx - osx_image: xcode10.1 + osx_image: xcode12.2 sudo: required - env: SWIFT_SNAPSHOT=4.2.1 - os: osx - osx_image: xcode10.2 + osx_image: xcode12.5 sudo: required - env: SWIFT_SNAPSHOT=5.0.1 JAZZY_ELIGIBLE=true + env: USE_SWIFT_DEVELOPMENT_SNAPSHOT=1 - os: osx - osx_image: xcode11 + osx_image: xcode12.5 sudo: required # Run Kitura tests in addition to Kitura-net tests - env: CUSTOM_TEST_SCRIPT=.kitura-test.sh - - os: osx - osx_image: xcode12.2 - sudo: required - env: SWIFT_SNAPSHOT=5.3.1 - - os: osx - osx_image: xcode11 - sudo: required - env: SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT + env: USE_SWIFT_DEVELOPMENT_SNAPSHOT=1 CUSTOM_TEST_SCRIPT=.kitura-test.sh before_install: - git clone https://github.com/Kitura/Package-Builder.git diff --git a/Package@swift-4.0.swift b/Package@swift-4.0.swift deleted file mode 100644 index a396192..0000000 --- a/Package@swift-4.0.swift +++ /dev/null @@ -1,74 +0,0 @@ -// swift-tools-version:4.0 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -/** - * Copyright IBM Corporation and the Kitura project authors 2016-2020 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -import PackageDescription - -var dependencies: [Package.Dependency] = [ - .package(url: "https://github.com/Kitura/LoggerAPI.git", from: "1.9.200"), - .package(url: "https://github.com/Kitura/BlueSocket.git", from: "1.0.200"), - .package(url: "https://github.com/Kitura/CCurl.git", from: "1.1.200"), - .package(url: "https://github.com/Kitura/BlueSSLService.git", from: "1.0.200") -] - -var kituraNetDependencies: [Target.Dependency] = [ - .byNameItem(name: "CHTTPParser"), - .byNameItem(name: "LoggerAPI"), - .byNameItem(name: "Socket"), - .byNameItem(name: "CCurl"), - .byNameItem(name: "SSLService") -] - -#if os(Linux) -dependencies.append(contentsOf: [ - .package(url: "https://github.com/Kitura/CEpoll.git", from: "1.0.200"), - .package(url: "https://github.com/Kitura/BlueSignals.git", from: "1.0.200") - ]) - -kituraNetDependencies.append(contentsOf: [ - .byNameItem(name: "CEpoll"), - .byNameItem(name: "Signals") - ]) -#endif - -let package = Package( - name: "Kitura-net", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "KituraNet", - targets: ["KituraNet"] - ) - ], - dependencies: dependencies, - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "CHTTPParser" - ), - .target( - name: "KituraNet", - dependencies: kituraNetDependencies - ), - .testTarget( - name: "KituraNetTests", - dependencies: ["KituraNet"] - ) - ] -) diff --git a/Package@swift-4.1.swift b/Package@swift-4.1.swift deleted file mode 100644 index a396192..0000000 --- a/Package@swift-4.1.swift +++ /dev/null @@ -1,74 +0,0 @@ -// swift-tools-version:4.0 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -/** - * Copyright IBM Corporation and the Kitura project authors 2016-2020 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -import PackageDescription - -var dependencies: [Package.Dependency] = [ - .package(url: "https://github.com/Kitura/LoggerAPI.git", from: "1.9.200"), - .package(url: "https://github.com/Kitura/BlueSocket.git", from: "1.0.200"), - .package(url: "https://github.com/Kitura/CCurl.git", from: "1.1.200"), - .package(url: "https://github.com/Kitura/BlueSSLService.git", from: "1.0.200") -] - -var kituraNetDependencies: [Target.Dependency] = [ - .byNameItem(name: "CHTTPParser"), - .byNameItem(name: "LoggerAPI"), - .byNameItem(name: "Socket"), - .byNameItem(name: "CCurl"), - .byNameItem(name: "SSLService") -] - -#if os(Linux) -dependencies.append(contentsOf: [ - .package(url: "https://github.com/Kitura/CEpoll.git", from: "1.0.200"), - .package(url: "https://github.com/Kitura/BlueSignals.git", from: "1.0.200") - ]) - -kituraNetDependencies.append(contentsOf: [ - .byNameItem(name: "CEpoll"), - .byNameItem(name: "Signals") - ]) -#endif - -let package = Package( - name: "Kitura-net", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "KituraNet", - targets: ["KituraNet"] - ) - ], - dependencies: dependencies, - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "CHTTPParser" - ), - .target( - name: "KituraNet", - dependencies: kituraNetDependencies - ), - .testTarget( - name: "KituraNetTests", - dependencies: ["KituraNet"] - ) - ] -) diff --git a/Package@swift-4.2.swift b/Package@swift-4.2.swift deleted file mode 100644 index 40a46f7..0000000 --- a/Package@swift-4.2.swift +++ /dev/null @@ -1,81 +0,0 @@ -// swift-tools-version:4.2 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -/** - * Copyright IBM Corporation and the Kitura project authors 2016-2020 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - **/ - -import PackageDescription - -var dependencies: [Package.Dependency] = [ - .package(url: "https://github.com/Kitura/LoggerAPI.git", from: "1.9.200"), - .package(url: "https://github.com/Kitura/BlueSocket.git", from: "1.0.200"), - .package(url: "https://github.com/Kitura/BlueSSLService.git", from: "1.0.200") -] - -var kituraNetDependencies: [Target.Dependency] = [ - .byName(name: "CHTTPParser"), - .byName(name: "LoggerAPI"), - .byName(name: "Socket"), - .target(name: "CCurl"), - .byName(name: "SSLService") -] - -#if os(Linux) -dependencies.append(contentsOf: [ - .package(url: "https://github.com/Kitura/BlueSignals.git", from: "1.0.200") - ]) - -kituraNetDependencies.append(contentsOf: [ - .target(name: "CEpoll"), - .byName(name: "Signals") - ]) -#endif - -var targets: [Target] = [ - .target( - name: "CHTTPParser" - ), - .systemLibrary( - name: "CCurl" - ), - .target( - name: "KituraNet", - dependencies: kituraNetDependencies - ), - .testTarget( - name: "KituraNetTests", - dependencies: ["KituraNet"] - ) -] - -#if os(Linux) -targets.append( - .systemLibrary(name: "CEpoll") -) -#endif - -let package = Package( - name: "Kitura-net", - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "KituraNet", - targets: ["KituraNet"] - ) - ], - dependencies: dependencies, - targets: targets -) diff --git a/README.md b/README.md index d3df4a7..6b4775b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
-
+
@@ -55,6 +55,11 @@ Add `KituraNet` to your target's dependencies:
import KituraNet
```
+## Prerequisites
+
+As of Kitura-net 3.0.0, Swift 5.1+ is required.
+
+
## Contributing to Kitura-net
All improvements to Kitura-net are very welcome! Here's how to get started with developing Kitura-net itself.
@@ -70,7 +75,7 @@ All improvements to Kitura-net are very welcome! Here's how to get started with
You can find more info on contributing to Kitura in our [contributing guidelines](https://github.com/Kitura/Kitura/blob/master/.github/CONTRIBUTING.md).
## API Documentation
-For more information visit our [API reference](https://ibm-swift.github.io/Kitura-net/index.html).
+For more information visit our [API reference](https://kitura.github.io/Kitura-net/index.html).
## Community
diff --git a/docs/Classes.html b/docs/Classes.html
index 2ef2e09..f09eadb 100644
--- a/docs/Classes.html
+++ b/docs/Classes.html
@@ -885,7 +885,7 @@ Declaration
Usage Example:
func upgrade(handler: IncomingSocketHandler, request: ServerRequest, response: ServerResponse) -> (IncomingSocketProcessor?, Data?, String?) {
- let (processor, responseText) = upgrade(handler: handler, request: request, response: response)
+ let (processor, responseText) = upgrade(handler: handler, request: request, response: response)
if let responseText = responseText {
return (processor, responseText.data(using: .utf8), "text/plain")
@@ -1042,7 +1042,7 @@
Declaration