From 10f6dbe6c5fbf69716b73c2904d93ae3f904714a Mon Sep 17 00:00:00 2001 From: Artem Redkin Date: Sun, 30 Jun 2019 11:36:25 +0100 Subject: [PATCH] rename to async-http-client --- CODE_OF_CONDUCT.md | 6 ++-- CONTRIBUTORS.txt | 2 +- Package.swift | 16 +++++----- README.md | 14 ++++----- .../HTTPClient+HTTPCookie.swift | 6 ++-- .../HTTPClient.swift} | 6 ++-- .../HTTPClientProxyHandler.swift | 6 ++-- .../HTTPHandler.swift | 6 ++-- .../RequestValidation.swift | 6 ++-- .../Utils.swift | 6 ++-- .../HTTPClientCookieTests+XCTest.swift | 6 ++-- .../HTTPClientCookieTests.swift | 8 ++--- .../HTTPClientInternalTests+XCTest.swift | 6 ++-- .../HTTPClientInternalTests.swift | 8 ++--- .../HTTPClientTestUtils.swift | 8 ++--- .../HTTPClientTests+XCTest.swift | 6 ++-- .../HTTPClientTests.swift | 8 ++--- Tests/LinuxMain.swift | 8 ++--- docker/docker-compose.1804.50.yaml | 4 +-- docker/docker-compose.yaml | 4 +-- scripts/generate_contributors_list.sh | 8 ++--- scripts/generate_docs.sh | 30 +++++++++---------- scripts/generate_linux_tests.rb | 6 ++-- scripts/sanity.sh | 26 ++++++++-------- 24 files changed, 105 insertions(+), 105 deletions(-) rename Sources/{NIOHTTPClient => AsyncHTTPClient}/HTTPClient+HTTPCookie.swift (94%) rename Sources/{NIOHTTPClient/SwiftNIOHTTP.swift => AsyncHTTPClient/HTTPClient.swift} (97%) rename Sources/{NIOHTTPClient => AsyncHTTPClient}/HTTPClientProxyHandler.swift (95%) rename Sources/{NIOHTTPClient => AsyncHTTPClient}/HTTPHandler.swift (98%) rename Sources/{NIOHTTPClient => AsyncHTTPClient}/RequestValidation.swift (88%) rename Sources/{NIOHTTPClient => AsyncHTTPClient}/Utils.swift (89%) rename Tests/{NIOHTTPClientTests => AsyncHTTPClientTests}/HTTPClientCookieTests+XCTest.swift (75%) rename Tests/{NIOHTTPClientTests => AsyncHTTPClientTests}/HTTPClientCookieTests.swift (83%) rename Tests/{NIOHTTPClientTests => AsyncHTTPClientTests}/HTTPClientInternalTests+XCTest.swift (80%) rename Tests/{NIOHTTPClientTests => AsyncHTTPClientTests}/HTTPClientInternalTests.swift (96%) rename Tests/{NIOHTTPClientTests => AsyncHTTPClientTests}/HTTPClientTestUtils.swift (98%) rename Tests/{NIOHTTPClientTests => AsyncHTTPClientTests}/HTTPClientTests+XCTest.swift (85%) rename Tests/{NIOHTTPClientTests => AsyncHTTPClientTests}/HTTPClientTests.swift (97%) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 879bcb026..c7a248828 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,10 +1,10 @@ # Code of Conduct -To be a truly great community, SwiftNIOHTTPClient needs to welcome developers from all walks of life, +To be a truly great community, AsyncHTTPClient needs to welcome developers from all walks of life, with different backgrounds, and with a wide range of experience. A diverse and friendly community will have more great ideas, more unique perspectives, and produce more great -code. We will work diligently to make the SwiftNIOHTTPClient community welcoming to everyone. +code. We will work diligently to make the AsyncHTTPClient community welcoming to everyone. -To give clarity of what is expected of our members, SwiftNIOHTTPClient has adopted the code of conduct +To give clarity of what is expected of our members, AsyncHTTPClient has adopted the code of conduct defined by [contributor-covenant.org](https://www.contributor-covenant.org). This document is used across many open source communities, and we think it articulates our values well. The full text is copied below: diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 213814911..c85b1d584 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -1,5 +1,5 @@ For the purpose of tracking copyright, this is the list of individuals and -organizations who have contributed source code to the SwiftNIOHTTPClient. +organizations who have contributed source code to the AsyncHTTPClient. For employees of an organization/company where the copyright of work done by employees of that company is held by the company itself, only the company diff --git a/Package.swift b/Package.swift index 457adc281..3f14dedbd 100644 --- a/Package.swift +++ b/Package.swift @@ -1,13 +1,13 @@ // swift-tools-version:5.0 //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -16,9 +16,9 @@ import PackageDescription let package = Package( - name: "swift-nio-http-client", + name: "async-http-client", products: [ - .library(name: "NIOHTTPClient", targets: ["NIOHTTPClient"]), + .library(name: "AsyncHTTPClient", targets: ["AsyncHTTPClient"]), ], dependencies: [ .package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"), @@ -26,12 +26,12 @@ let package = Package( ], targets: [ .target( - name: "NIOHTTPClient", + name: "AsyncHTTPClient", dependencies: ["NIO", "NIOHTTP1", "NIOSSL", "NIOConcurrencyHelpers"] ), .testTarget( - name: "NIOHTTPClientTests", - dependencies: ["NIOHTTPClient", "NIOFoundationCompat"] + name: "AsyncHTTPClientTests", + dependencies: ["AsyncHTTPClient", "NIOFoundationCompat"] ), ] ) diff --git a/README.md b/README.md index ea5db8691..b61bc08b2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SwiftNIOHTTPClient +# AsyncHTTPClient This package provides simple HTTP Client library built on top of SwiftNIO. This library provides the following: @@ -10,7 +10,7 @@ This library provides the following: --- -**NOTE**: You will need [Xcode 10.2](https://itunes.apple.com/us/app/xcode/id497799835) or [Swift 5.0](https://swift.org/download/#swift-50) to try out `SwiftNIOHTTPClient`. +**NOTE**: You will need [Xcode 10.2](https://itunes.apple.com/us/app/xcode/id497799835) or [Swift 5.0](https://swift.org/download/#swift-50) to try out `AsyncHTTPClient`. --- @@ -21,18 +21,18 @@ Add the following entry in your Package.swift to start using ```swift // it's early days here so we haven't tagged a version yet, but will soon -.package(url: "https://github.com/swift-server/swift-nio-http-client.git", .branch("master")) +.package(url: "https://github.com/swift-server/async-http-client.git", .branch("master")) ``` -and `NIOHTTPClient` dependency to your target: +and `AsyncHTTPClient` dependency to your target: ```swift -.target(name: "MyApp", dependencies: ["NIOHTTPClient"]), +.target(name: "MyApp", dependencies: ["AsyncHTTPClient"]), ``` #### Request-Response API The code snippet below illustrates how to make a simple GET request to a remote server: ```swift -import NIOHTTPClient +import AsyncHTTPClient let httpClient = HTTPClient(eventLoopGroupProvider: .createNew) httpClient.get(url: "https://swift.org").whenComplete { result in @@ -63,7 +63,7 @@ In this case shutdown of the client is not neccecary. Most common HTTP methods are supported out of the box. In case you need to have more control over the method, or you want to add headers or body, use the `HTTPRequest` struct: ```swift -import NIOHTTPClient +import AsyncHTTPClient let httpClient = HTTPClient(eventLoopGroupProvider: .createNew) defer { diff --git a/Sources/NIOHTTPClient/HTTPClient+HTTPCookie.swift b/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift similarity index 94% rename from Sources/NIOHTTPClient/HTTPClient+HTTPCookie.swift rename to Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift index a196b2c53..9a1d786f4 100644 --- a/Sources/NIOHTTPClient/HTTPClient+HTTPCookie.swift +++ b/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/NIOHTTPClient/SwiftNIOHTTP.swift b/Sources/AsyncHTTPClient/HTTPClient.swift similarity index 97% rename from Sources/NIOHTTPClient/SwiftNIOHTTP.swift rename to Sources/AsyncHTTPClient/HTTPClient.swift index 17f589bed..4b3bab7ca 100644 --- a/Sources/NIOHTTPClient/SwiftNIOHTTP.swift +++ b/Sources/AsyncHTTPClient/HTTPClient.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/NIOHTTPClient/HTTPClientProxyHandler.swift b/Sources/AsyncHTTPClient/HTTPClientProxyHandler.swift similarity index 95% rename from Sources/NIOHTTPClient/HTTPClientProxyHandler.swift rename to Sources/AsyncHTTPClient/HTTPClientProxyHandler.swift index ed6df671f..69a62716a 100644 --- a/Sources/NIOHTTPClient/HTTPClientProxyHandler.swift +++ b/Sources/AsyncHTTPClient/HTTPClientProxyHandler.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/NIOHTTPClient/HTTPHandler.swift b/Sources/AsyncHTTPClient/HTTPHandler.swift similarity index 98% rename from Sources/NIOHTTPClient/HTTPHandler.swift rename to Sources/AsyncHTTPClient/HTTPHandler.swift index 9482fd8de..ec35e1051 100644 --- a/Sources/NIOHTTPClient/HTTPHandler.swift +++ b/Sources/AsyncHTTPClient/HTTPHandler.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/NIOHTTPClient/RequestValidation.swift b/Sources/AsyncHTTPClient/RequestValidation.swift similarity index 88% rename from Sources/NIOHTTPClient/RequestValidation.swift rename to Sources/AsyncHTTPClient/RequestValidation.swift index 8f88e84d5..9c2532c4b 100644 --- a/Sources/NIOHTTPClient/RequestValidation.swift +++ b/Sources/AsyncHTTPClient/RequestValidation.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/NIOHTTPClient/Utils.swift b/Sources/AsyncHTTPClient/Utils.swift similarity index 89% rename from Sources/NIOHTTPClient/Utils.swift rename to Sources/AsyncHTTPClient/Utils.swift index deb77bebf..b572f1b35 100644 --- a/Sources/NIOHTTPClient/Utils.swift +++ b/Sources/AsyncHTTPClient/Utils.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Tests/NIOHTTPClientTests/HTTPClientCookieTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift similarity index 75% rename from Tests/NIOHTTPClientTests/HTTPClientCookieTests+XCTest.swift rename to Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift index a5316113e..00570dab7 100644 --- a/Tests/NIOHTTPClientTests/HTTPClientCookieTests+XCTest.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests+XCTest.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Tests/NIOHTTPClientTests/HTTPClientCookieTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests.swift similarity index 83% rename from Tests/NIOHTTPClientTests/HTTPClientCookieTests.swift rename to Tests/AsyncHTTPClientTests/HTTPClientCookieTests.swift index bb4c25023..fda30d8d7 100644 --- a/Tests/NIOHTTPClientTests/HTTPClientCookieTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientCookieTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// +import AsyncHTTPClient import Foundation -import NIOHTTPClient import XCTest class HTTPClientCookieTests: XCTestCase { diff --git a/Tests/NIOHTTPClientTests/HTTPClientInternalTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift similarity index 80% rename from Tests/NIOHTTPClientTests/HTTPClientInternalTests+XCTest.swift rename to Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift index a77186178..6ad239e02 100644 --- a/Tests/NIOHTTPClientTests/HTTPClientInternalTests+XCTest.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests+XCTest.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Tests/NIOHTTPClientTests/HTTPClientInternalTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift similarity index 96% rename from Tests/NIOHTTPClientTests/HTTPClientInternalTests.swift rename to Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift index 4179cdec7..ec7c5105b 100644 --- a/Tests/NIOHTTPClientTests/HTTPClientInternalTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift @@ -1,21 +1,21 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// +@testable import AsyncHTTPClient import NIO import NIOConcurrencyHelpers import NIOHTTP1 -@testable import NIOHTTPClient import XCTest class HTTPClientInternalTests: XCTestCase { diff --git a/Tests/NIOHTTPClientTests/HTTPClientTestUtils.swift b/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift similarity index 98% rename from Tests/NIOHTTPClientTests/HTTPClientTestUtils.swift rename to Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift index 99f4aedea..74002fe9f 100644 --- a/Tests/NIOHTTPClientTests/HTTPClientTestUtils.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift @@ -1,21 +1,21 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// +import AsyncHTTPClient import Foundation import NIO import NIOHTTP1 -import NIOHTTPClient import NIOSSL class TestHTTPDelegate: HTTPClientResponseDelegate { diff --git a/Tests/NIOHTTPClientTests/HTTPClientTests+XCTest.swift b/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift similarity index 85% rename from Tests/NIOHTTPClientTests/HTTPClientTests+XCTest.swift rename to Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift index e7af2c153..0fe3d1807 100644 --- a/Tests/NIOHTTPClientTests/HTTPClientTests+XCTest.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTests+XCTest.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Tests/NIOHTTPClientTests/HTTPClientTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientTests.swift similarity index 97% rename from Tests/NIOHTTPClientTests/HTTPClientTests.swift rename to Tests/AsyncHTTPClientTests/HTTPClientTests.swift index bf04070ba..1cd165af6 100644 --- a/Tests/NIOHTTPClientTests/HTTPClientTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTests.swift @@ -1,21 +1,21 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// +import AsyncHTTPClient import NIO import NIOFoundationCompat import NIOHTTP1 -import NIOHTTPClient import XCTest class HTTPClientTests: XCTestCase { diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index b8b8f7bd1..1564a0688 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -23,7 +23,7 @@ import XCTest /// #if os(Linux) || os(FreeBSD) - @testable import NIOHTTPClientTests + @testable import AsyncHTTPClientTests XCTMain([ testCase(HTTPClientCookieTests.allTests), diff --git a/docker/docker-compose.1804.50.yaml b/docker/docker-compose.1804.50.yaml index 6ce1c3f1c..a0961a013 100644 --- a/docker/docker-compose.1804.50.yaml +++ b/docker/docker-compose.1804.50.yaml @@ -3,11 +3,11 @@ version: "3" services: runtime-setup: - image: swift-nio-http-client:18.04-5.0 + image: async-http-client:18.04-5.0 build: args: ubuntu_version: "18.04" swift_version: "5.0" test: - image: swift-nio-http-client:18.04-5.0 + image: async-http-client:18.04-5.0 diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 2db471a2a..45a66764f 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -6,13 +6,13 @@ version: "3" services: runtime-setup: - image: swift-nio-http-client:default + image: async-http-client:default build: context: . dockerfile: Dockerfile common: &common - image: swift-nio-http-client:default + image: async-http-client:default depends_on: [runtime-setup] volumes: - ~/.ssh:/root/.ssh diff --git a/scripts/generate_contributors_list.sh b/scripts/generate_contributors_list.sh index a77b1a912..7f0fa7849 100755 --- a/scripts/generate_contributors_list.sh +++ b/scripts/generate_contributors_list.sh @@ -1,13 +1,13 @@ #!/bin/bash ##===----------------------------------------------------------------------===## ## -## This source file is part of the SwiftNIOHTTPClient open source project +## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information -## See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +## See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors ## ## SPDX-License-Identifier: Apache-2.0 ## @@ -19,7 +19,7 @@ contributors=$( cd "$here"/.. && git shortlog -es | cut -f2 | sed 's/^/- /' ) cat > "$here/../CONTRIBUTORS.txt" <<- EOF For the purpose of tracking copyright, this is the list of individuals and - organizations who have contributed source code to the SwiftNIOHTTPClient. + organizations who have contributed source code to the AsyncHTTPClient. For employees of an organization/company where the copyright of work done by employees of that company is held by the company itself, only the company diff --git a/scripts/generate_docs.sh b/scripts/generate_docs.sh index 99ff4f1ef..06327b29e 100755 --- a/scripts/generate_docs.sh +++ b/scripts/generate_docs.sh @@ -1,13 +1,13 @@ #!/bin/bash ##===----------------------------------------------------------------------===## ## -## This source file is part of the SwiftNIOHTTPClient open source project +## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information -## See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +## See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors ## ## SPDX-License-Identifier: Apache-2.0 ## @@ -18,7 +18,7 @@ set -e my_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" root_path="$my_path/.." version=$(git describe --abbrev=0 --tags || echo "master") -modules=(NIOHTTPClient) +modules=(AsyncHTTPClient) if [[ "$(uname -s)" == "Linux" ]]; then # build code if required @@ -45,7 +45,7 @@ if [[ "$(uname -s)" == "Linux" ]]; then fi [[ -d docs/$version ]] || mkdir -p docs/$version -[[ -d swift-nio-http-client.xcodeproj ]] || swift package generate-xcodeproj +[[ -d async-http-client.xcodeproj ]] || swift package generate-xcodeproj # run jazzy if ! command -v jazzy > /dev/null; then @@ -54,20 +54,20 @@ fi module_switcher="docs/$version/README.md" jazzy_args=(--clean - --author 'SwiftNIOHTTPClient team' + --author 'AsyncHTTPClient team' --readme "$module_switcher" - --author_url https://github.com/swift-server/swift-nio-http-client - --github_url https://github.com/swift-server/swift-nio-http-client - --github-file-prefix "https://github.com/swift-server/swift-nio-http-client/tree/$version" + --author_url https://github.com/swift-server/async-http-client + --github_url https://github.com/swift-server/async-http-client + --github-file-prefix "https://github.com/swift-server/async-http-client/tree/$version" --theme fullwidth - --xcodebuild-arguments -scheme,swift-nio-http-client-Package) + --xcodebuild-arguments -scheme,async-http-client-Package) cat > "$module_switcher" <<"EOF" -# SwiftNIOHTTPClient Docs +# AsyncHTTPClient Docs -SwiftNIOHTTPClient is a Swift HTTTP Client package. +AsyncHTTPClient is a Swift HTTP Client package. -To get started with SwiftNIOHTTPClient, [`import NIOHTTPClient`](../NIOHTTPClient/index.html). The -most important type is [`HTTPClient`](https://swift-server.github.io/swift-nio-http-client/docs/current/NIOHTTPClient/Classes/HTTPClient.html) +To get started with AsyncHTTPClient, [`import AsyncHTTPClient`](../AsyncHTTPClient/index.html). The +most important type is [`HTTPClient`](https://swift-server.github.io/async-http-client/docs/current/AsyncHTTPClient/Classes/HTTPClient.html) which you can use to emit log messages. EOF @@ -91,7 +91,7 @@ if [[ $CI == true ]]; then cp -r "$tmp/docs" . cp -r "docs/$version" docs/current git add --all docs - echo '' > index.html + echo '' > index.html git add index.html touch .nojekyll git add .nojekyll diff --git a/scripts/generate_linux_tests.rb b/scripts/generate_linux_tests.rb index 000dcb958..efb8e1692 100755 --- a/scripts/generate_linux_tests.rb +++ b/scripts/generate_linux_tests.rb @@ -34,13 +34,13 @@ def header(fileName) string = <<-eos //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/scripts/sanity.sh b/scripts/sanity.sh index d942007c6..999cb0d4d 100755 --- a/scripts/sanity.sh +++ b/scripts/sanity.sh @@ -1,13 +1,13 @@ #!/bin/bash ##===----------------------------------------------------------------------===## ## -## This source file is part of the SwiftNIOHTTPClient open source project +## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information -## See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +## See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors ## ## SPDX-License-Identifier: Apache-2.0 ## @@ -29,7 +29,7 @@ else fi printf "=> Checking license headers... " -tmp=$(mktemp /tmp/.swift-nio-http-client-sanity_XXXXXX) +tmp=$(mktemp /tmp/.async-http-client-sanity_XXXXXX) for language in swift-or-c bash dtrace; do declare -a matching_files @@ -43,13 +43,13 @@ for language in swift-or-c bash dtrace; do cat > "$tmp" <<"EOF" //===----------------------------------------------------------------------===// // -// This source file is part of the SwiftNIOHTTPClient open source project +// This source file is part of the AsyncHTTPClient open source project // -// Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +// Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +// See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -62,13 +62,13 @@ EOF #!/bin/bash ##===----------------------------------------------------------------------===## ## -## This source file is part of the SwiftNIOHTTPClient open source project +## This source file is part of the AsyncHTTPClient open source project ## -## Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors +## Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information -## See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors +## See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors ## ## SPDX-License-Identifier: Apache-2.0 ## @@ -81,13 +81,13 @@ EOF #!/usr/sbin/dtrace -q -s /*===----------------------------------------------------------------------===* * - * This source file is part of the SwiftNIOHTTPClient open source project + * This source file is part of the AsyncHTTPClient open source project * - * Copyright (c) 2018-2019 Swift Server Working Group and the SwiftNIOHTTPClient project authors + * Copyright (c) 2018-2019 Swift Server Working Group and the AsyncHTTPClient project authors * Licensed under Apache License v2.0 * * See LICENSE.txt for license information - * See CONTRIBUTORS.txt for the list of SwiftNIOHTTPClient project authors + * See CONTRIBUTORS.txt for the list of AsyncHTTPClient project authors * * SPDX-License-Identifier: Apache-2.0 *