diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f0e141b..aa50929 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,10 +1,10 @@ # Code of Conduct -To be a truly great community, RedisNIO needs to welcome developers from all walks of life, +To be a truly great community, RediStack 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 RedisNIO community welcoming to everyone. +code. We will work diligently to make the RediStack community welcoming to everyone. -To give clarity of what is expected of our members, RedisNIO has adopted the code of conduct +To give clarity of what is expected of our members, RediStack 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/CONTRIBUTING.md b/CONTRIBUTING.md index d570397..de1dc8d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ that your contributions are licensed under the [Apache 2.0 license](https://www. Please ensure to specify the following: -* RedisNIO commit hash +* **RediStack** commit hash * Simplest possible steps to reproduce * A pull request with a failing test case is preferred, but it's just as fine to write it in the issue description * Environment Information diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 757fb6f..6972ad9 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 RedisNIO. +organizations who have contributed source code to RediStack. 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/NOTICE.txt b/NOTICE.txt index aac2eb3..ea02364 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,14 +1,14 @@ - The RedisNIO Project + The RediStack Project ==================== -Please visit the RedisNIO web site for more information: +Please visit the RediStack web site for more information: * https://github.com/mordil/nio-redis -Copyright 2019 The RedisNIO Project +Copyright 2019 The RediStack Project -The RedisNIO Project licenses this file to you under the Apache License, +The RediStack Project licenses this file to you 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: diff --git a/Package.swift b/Package.swift index 0164afe..76fdc31 100644 --- a/Package.swift +++ b/Package.swift @@ -1,13 +1,13 @@ // swift-tools-version:5.0 //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -16,9 +16,9 @@ import PackageDescription let package = Package( - name: "swift-redis-nio-client", + name: "redi-stack", products: [ - .library(name: "RedisNIO", targets: ["RedisNIO"]) + .library(name: "RediStack", targets: ["RediStack"]) ], dependencies: [ .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), @@ -26,8 +26,8 @@ let package = Package( .package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0") ], targets: [ - .target(name: "RedisNIO", dependencies: ["NIO", "Logging", "Metrics"]), - .target(name: "RedisNIOTestUtils", dependencies: ["NIO", "RedisNIO"]), - .testTarget(name: "RedisNIOTests", dependencies: ["RedisNIO", "NIO", "RedisNIOTestUtils"]) + .target(name: "RediStack", dependencies: ["NIO", "Logging", "Metrics"]), + .target(name: "RediStackTestUtils", dependencies: ["NIO", "RediStack"]), + .testTarget(name: "RediStackTests", dependencies: ["RediStack", "NIO", "RediStackTestUtils"]) ] ) diff --git a/README.md b/README.md index 925600a..fbddff8 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,21 @@ [![Swift](https://img.shields.io/badge/Swift-5.0-brightgreen.svg?colorA=orange&colorB=4E4E4E)](https://swift.org) [![Redis](https://img.shields.io/badge/Redis-5-brightgreen.svg?colorA=red&colorB=4E4E4E)](https://redis.io/download) -# Swift Redis NIO Client +# Swift RediStack A non-blocking Swift client for [Redis](https://redis.io/) built on top of [SwiftNIO](https://github.com/apple/swift-nio). This package defines everything you need to work with Redis through the [**Re**dis **S**eralization **P**rotocol (RESP)](https://redis.io/topics/protocol). -**RedisNIO** is part of the [Swift on Server Working Group](https://github.com/swift-server/sswg) ecosystem. +**RediStack** is part of the [Swift on Server Working Group](https://github.com/swift-server/sswg) ecosystem. | Proposal | Pitch | Discussion | Review | Vote | |----------|-------|------------|--------|------| -| [SSWG-0004](https://github.com/swift-server/sswg/blob/master/proposals/0004-nio-redis.md) | [2019-01-07](https://forums.swift.org/t/swiftnio-redis-client/19325) | [2019-04-01](https://forums.swift.org/t/discussion-nioredis-nio-based-redis-driver/22455) | **TBD** | **TBD** | +| [SSWG-0004](https://github.com/swift-server/sswg/blob/master/proposals/0004-nio-redis.md) | [2019-01-07](https://forums.swift.org/t/swiftnio-redis-client/19325) | [2019-04-01](https://forums.swift.org/t/discussion-nioredis-nio-based-redis-driver/22455) | [2019-06-09](https://forums.swift.org/t/feedback-redisnio-a-nio-based-redis-driver/25521) | [2019-06-27](https://forums.swift.org/t/june-27th-2019/26580) | ## :package: Installation -To install **RedisNIO**, just add the package as a dependency in your [**Package.swift**](https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md#dependencies) +To install **RediStack**, just add the package as a dependency in your [**Package.swift**](https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md#dependencies) ```swift dependencies: [ @@ -32,11 +32,11 @@ and run the following command: `swift package resolve` ## :zap: Getting Started -**RedisNIO** is quick to use - all you need is an [`EventLoop`](https://apple.github.io/swift-nio/docs/current/NIO/Protocols/EventLoop.html) from **SwiftNIO**. +**RediStack** is quick to use - all you need is an [`EventLoop`](https://apple.github.io/swift-nio/docs/current/NIO/Protocols/EventLoop.html) from **SwiftNIO**. ```swift import NIO -import RedisNIO +import RediStack let eventLoop: EventLoop = ... let connection = RedisConnection.connect( @@ -59,7 +59,7 @@ The latest version's docs are always available at https://mordil.gitlab.io/swift ## :construction: Contributing -Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with **RedisNIO**. +Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with **RediStack**. It is highly recommended to use [Docker](https://docker.com) to install Redis locally. diff --git a/Sources/RedisNIO/ChannelHandlers/RedisByteDecoder.swift b/Sources/RediStack/ChannelHandlers/RedisByteDecoder.swift similarity index 88% rename from Sources/RedisNIO/ChannelHandlers/RedisByteDecoder.swift rename to Sources/RediStack/ChannelHandlers/RedisByteDecoder.swift index 50a1644..1c9a297 100644 --- a/Sources/RedisNIO/ChannelHandlers/RedisByteDecoder.swift +++ b/Sources/RediStack/ChannelHandlers/RedisByteDecoder.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/ChannelHandlers/RedisCommandHandler.swift b/Sources/RediStack/ChannelHandlers/RedisCommandHandler.swift similarity index 96% rename from Sources/RedisNIO/ChannelHandlers/RedisCommandHandler.swift rename to Sources/RediStack/ChannelHandlers/RedisCommandHandler.swift index c102109..710c414 100644 --- a/Sources/RedisNIO/ChannelHandlers/RedisCommandHandler.swift +++ b/Sources/RediStack/ChannelHandlers/RedisCommandHandler.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -54,7 +54,7 @@ public final class RedisCommandHandler { /// and don't want the buffer to resize, you shouldn't need to set this parameter. /// - logger: The `Logging.Logger` instance to use. /// The logger will have a `Foundation.UUID` value attached as metadata to uniquely identify this instance. - public init(initialQueueCapacity: Int = 3, logger: Logger = Logger(label: "RedisNIO.CommandHandler")) { + public init(initialQueueCapacity: Int = 3, logger: Logger = Logger(label: "RediStack.CommandHandler")) { self.commandResponseQueue = CircularBuffer(initialCapacity: initialQueueCapacity) self.logger = logger self.logger[metadataKey: "CommandHandler"] = "\(UUID())" diff --git a/Sources/RedisNIO/ChannelHandlers/RedisMessageEncoder.swift b/Sources/RediStack/ChannelHandlers/RedisMessageEncoder.swift similarity index 85% rename from Sources/RedisNIO/ChannelHandlers/RedisMessageEncoder.swift rename to Sources/RediStack/ChannelHandlers/RedisMessageEncoder.swift index ac971b8..5431727 100644 --- a/Sources/RedisNIO/ChannelHandlers/RedisMessageEncoder.swift +++ b/Sources/RediStack/ChannelHandlers/RedisMessageEncoder.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -25,7 +25,7 @@ public final class RedisMessageEncoder: MessageToByteEncoder { private let logger: Logger - public init(logger: Logger = Logger(label: "RedisNIO.RedisMessageEncoder")) { + public init(logger: Logger = Logger(label: "RediStack.RedisMessageEncoder")) { self.logger = logger } diff --git a/Sources/RedisNIO/Commands/BasicCommands.swift b/Sources/RediStack/Commands/BasicCommands.swift similarity index 97% rename from Sources/RedisNIO/Commands/BasicCommands.swift rename to Sources/RediStack/Commands/BasicCommands.swift index c1a71ba..6496ad0 100644 --- a/Sources/RedisNIO/Commands/BasicCommands.swift +++ b/Sources/RediStack/Commands/BasicCommands.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/Commands/HashCommands.swift b/Sources/RediStack/Commands/HashCommands.swift similarity index 98% rename from Sources/RedisNIO/Commands/HashCommands.swift rename to Sources/RediStack/Commands/HashCommands.swift index e03ad4c..faad309 100644 --- a/Sources/RedisNIO/Commands/HashCommands.swift +++ b/Sources/RediStack/Commands/HashCommands.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/Commands/ListCommands.swift b/Sources/RediStack/Commands/ListCommands.swift similarity index 99% rename from Sources/RedisNIO/Commands/ListCommands.swift rename to Sources/RediStack/Commands/ListCommands.swift index 6ca0746..3f5a435 100644 --- a/Sources/RedisNIO/Commands/ListCommands.swift +++ b/Sources/RediStack/Commands/ListCommands.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/Commands/SetCommands.swift b/Sources/RediStack/Commands/SetCommands.swift similarity index 98% rename from Sources/RedisNIO/Commands/SetCommands.swift rename to Sources/RediStack/Commands/SetCommands.swift index 9d7716d..3284c19 100644 --- a/Sources/RedisNIO/Commands/SetCommands.swift +++ b/Sources/RediStack/Commands/SetCommands.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/Commands/SortedSetCommands.swift b/Sources/RediStack/Commands/SortedSetCommands.swift similarity index 99% rename from Sources/RedisNIO/Commands/SortedSetCommands.swift rename to Sources/RediStack/Commands/SortedSetCommands.swift index c202ebf..d646f1a 100644 --- a/Sources/RedisNIO/Commands/SortedSetCommands.swift +++ b/Sources/RediStack/Commands/SortedSetCommands.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/Commands/StringCommands.swift b/Sources/RediStack/Commands/StringCommands.swift similarity index 97% rename from Sources/RedisNIO/Commands/StringCommands.swift rename to Sources/RediStack/Commands/StringCommands.swift index cba4be0..18baf37 100644 --- a/Sources/RedisNIO/Commands/StringCommands.swift +++ b/Sources/RediStack/Commands/StringCommands.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/Extensions/StandardLibrary.swift b/Sources/RediStack/Extensions/StandardLibrary.swift similarity index 95% rename from Sources/RedisNIO/Extensions/StandardLibrary.swift rename to Sources/RediStack/Extensions/StandardLibrary.swift index 0d0cf19..5ec1142 100644 --- a/Sources/RedisNIO/Extensions/StandardLibrary.swift +++ b/Sources/RediStack/Extensions/StandardLibrary.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/Extensions/SwiftNIO.swift b/Sources/RediStack/Extensions/SwiftNIO.swift similarity index 86% rename from Sources/RedisNIO/Extensions/SwiftNIO.swift rename to Sources/RediStack/Extensions/SwiftNIO.swift index 057d8e0..1eae051 100644 --- a/Sources/RedisNIO/Extensions/SwiftNIO.swift +++ b/Sources/RediStack/Extensions/SwiftNIO.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -44,9 +44,9 @@ extension Channel { /// - Returns: An `EventLoopFuture` that resolves after all handlers have been added to the pipeline. public func addBaseRedisHandlers() -> EventLoopFuture { let handlers: [(ChannelHandler, name: String)] = [ - (MessageToByteHandler(RedisMessageEncoder()), "RedisNIO.OutgoingHandler"), - (ByteToMessageHandler(RedisByteDecoder()), "RedisNIO.IncomingHandler"), - (RedisCommandHandler(), "RedisNIO.CommandHandler") + (MessageToByteHandler(RedisMessageEncoder()), "RediStack.OutgoingHandler"), + (ByteToMessageHandler(RedisByteDecoder()), "RediStack.IncomingHandler"), + (RedisCommandHandler(), "RediStack.CommandHandler") ] return .andAllSucceed( handlers.map { self.pipeline.addHandler($0, name: $1) }, diff --git a/Sources/RedisNIO/RESP/RESPTranslator.swift b/Sources/RediStack/RESP/RESPTranslator.swift similarity index 98% rename from Sources/RedisNIO/RESP/RESPTranslator.swift rename to Sources/RediStack/RESP/RESPTranslator.swift index 19af8d4..45242d4 100644 --- a/Sources/RedisNIO/RESP/RESPTranslator.swift +++ b/Sources/RediStack/RESP/RESPTranslator.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/RESP/RESPValue.swift b/Sources/RediStack/RESP/RESPValue.swift similarity index 96% rename from Sources/RedisNIO/RESP/RESPValue.swift rename to Sources/RediStack/RESP/RESPValue.swift index cc9eb7e..dbfcbd8 100644 --- a/Sources/RedisNIO/RESP/RESPValue.swift +++ b/Sources/RediStack/RESP/RESPValue.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/RESP/RESPValueConvertible.swift b/Sources/RediStack/RESP/RESPValueConvertible.swift similarity index 98% rename from Sources/RedisNIO/RESP/RESPValueConvertible.swift rename to Sources/RediStack/RESP/RESPValueConvertible.swift index 6302298..9a843af 100644 --- a/Sources/RedisNIO/RESP/RESPValueConvertible.swift +++ b/Sources/RediStack/RESP/RESPValueConvertible.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/RedisClient.swift b/Sources/RediStack/RedisClient.swift similarity index 89% rename from Sources/RedisNIO/RedisClient.swift rename to Sources/RediStack/RedisClient.swift index d472d29..c6db697 100644 --- a/Sources/RedisNIO/RedisClient.swift +++ b/Sources/RediStack/RedisClient.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIO/RedisConnection.swift b/Sources/RediStack/RedisConnection.swift similarity index 98% rename from Sources/RedisNIO/RedisConnection.swift rename to Sources/RediStack/RedisConnection.swift index 374e1fd..bad509c 100644 --- a/Sources/RedisNIO/RedisConnection.swift +++ b/Sources/RediStack/RedisConnection.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -62,7 +62,7 @@ extension RedisConnection { to socket: SocketAddress, on eventLoop: EventLoop, password: String? = nil, - logger: Logger = Logger(label: "RedisNIO.RedisConnection"), + logger: Logger = Logger(label: "RediStack.RedisConnection"), tcpClient: ClientBootstrap? = nil ) -> EventLoopFuture { let client = tcpClient ?? ClientBootstrap.makeRedisTCPClient(group: eventLoop) diff --git a/Sources/RedisNIO/RedisErrors.swift b/Sources/RediStack/RedisErrors.swift similarity index 89% rename from Sources/RedisNIO/RedisErrors.swift rename to Sources/RediStack/RedisErrors.swift index bffbb90..401fd34 100644 --- a/Sources/RedisNIO/RedisErrors.swift +++ b/Sources/RediStack/RedisErrors.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -32,7 +32,7 @@ public enum RedisClientError: LocalizedError { case let .failedRESPConversion(type): message = "Failed to convert RESP to \(type)" case let .assertionFailure(text): message = text } - return "RedisNIO: \(message)" + return "RediStack: \(message)" } } diff --git a/Sources/RedisNIO/RedisMetrics.swift b/Sources/RediStack/RedisMetrics.swift similarity index 90% rename from Sources/RedisNIO/RedisMetrics.swift rename to Sources/RediStack/RedisMetrics.swift index 4e3c903..7934279 100644 --- a/Sources/RedisNIO/RedisMetrics.swift +++ b/Sources/RediStack/RedisMetrics.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -25,7 +25,7 @@ public struct RedisMetrics { /// An enumeration of all the labels used by the Redis library for various `Metrics` data points. /// /// Each is backed by a raw string, and this type is `CustomStringConvertible` to receive a - /// namespaced description in the form of `"RedisNIO."`. + /// namespaced description in the form of `"RediStack."`. public enum Label: String, CustomStringConvertible { case totalConnectionCount case activeConnectionCount @@ -34,7 +34,7 @@ public struct RedisMetrics { case commandRoundTripTime public var description: String { - return "RedisNIO.\(self.rawValue)" + return "RediStack.\(self.rawValue)" } } diff --git a/Sources/RedisNIOTestUtils/Extensions/General.swift b/Sources/RediStackTestUtils/Extensions/General.swift similarity index 80% rename from Sources/RedisNIOTestUtils/Extensions/General.swift rename to Sources/RediStackTestUtils/Extensions/General.swift index 8d738ea..97fe9a3 100644 --- a/Sources/RedisNIOTestUtils/Extensions/General.swift +++ b/Sources/RediStackTestUtils/Extensions/General.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/Sources/RedisNIOTestUtils/Extensions/RedisNIO.swift b/Sources/RediStackTestUtils/Extensions/RedisNIO.swift similarity index 88% rename from Sources/RedisNIOTestUtils/Extensions/RedisNIO.swift rename to Sources/RediStackTestUtils/Extensions/RedisNIO.swift index d96e062..5215d8b 100644 --- a/Sources/RedisNIOTestUtils/Extensions/RedisNIO.swift +++ b/Sources/RediStackTestUtils/Extensions/RedisNIO.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -14,7 +14,7 @@ import Foundation import NIO -import RedisNIO +import RediStack extension RedisConnection { /// Creates a connection intended for tests using `REDIS_URL` and `REDIS_PW` environment variables if available. diff --git a/Sources/RedisNIOTestUtils/RedisIntegrationTestCase.swift b/Sources/RediStackTestUtils/RedisIntegrationTestCase.swift similarity index 84% rename from Sources/RedisNIOTestUtils/RedisIntegrationTestCase.swift rename to Sources/RediStackTestUtils/RedisIntegrationTestCase.swift index 296aa74..f13e082 100644 --- a/Sources/RedisNIOTestUtils/RedisIntegrationTestCase.swift +++ b/Sources/RediStackTestUtils/RedisIntegrationTestCase.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import NIO -import RedisNIO +import RediStack import XCTest /// A helper `XCTestCase` subclass that does the standard work of creating a connection to use in test cases. @@ -32,7 +32,7 @@ open class RedisIntegrationTestCase: XCTestCase { } } - /// Creates a `RedisNIO.RedisConnection` for the next test case, calling `fatalError` if it was not successful. + /// Creates a `RediStack.RedisConnection` for the next test case, calling `fatalError` if it was not successful. /// /// See `XCTest.XCTestCase.setUp()` open override func setUp() { @@ -65,7 +65,7 @@ open class RedisIntegrationTestCase: XCTestCase { /// Creates a new connection for use in tests. /// /// See `RedisConnection.connect(to:port:)` - /// - Returns: The new `RedisNIO.RedisConnection`. + /// - Returns: The new `RediStack.RedisConnection`. public func makeNewConnection() throws -> RedisConnection { return try RedisConnection.connect(on: eventLoopGroup.next()).wait() } diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 687828c..a84d55a 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -14,8 +14,8 @@ import XCTest -import RedisNIOTests +import RediStackTests var tests = [XCTestCaseEntry]() -tests += RedisNIOTests.allTests() +tests += RediStackTests.allTests() XCTMain(tests) diff --git a/Tests/RedisNIOTests/ChannelHandlers/RedisByteDecoderTests.swift b/Tests/RediStackTests/ChannelHandlers/RedisByteDecoderTests.swift similarity index 98% rename from Tests/RedisNIOTests/ChannelHandlers/RedisByteDecoderTests.swift rename to Tests/RediStackTests/ChannelHandlers/RedisByteDecoderTests.swift index 0e6c8f0..0ed30e1 100644 --- a/Tests/RedisNIOTests/ChannelHandlers/RedisByteDecoderTests.swift +++ b/Tests/RediStackTests/ChannelHandlers/RedisByteDecoderTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import NIO -@testable import RedisNIO +@testable import RediStack import XCTest final class RedisByteDecoderTests: XCTestCase { diff --git a/Tests/RedisNIOTests/ChannelHandlers/RedisMessageEncoderTests.swift b/Tests/RediStackTests/ChannelHandlers/RedisMessageEncoderTests.swift similarity index 95% rename from Tests/RedisNIOTests/ChannelHandlers/RedisMessageEncoderTests.swift rename to Tests/RediStackTests/ChannelHandlers/RedisMessageEncoderTests.swift index 96d5ced..565e803 100644 --- a/Tests/RedisNIOTests/ChannelHandlers/RedisMessageEncoderTests.swift +++ b/Tests/RediStackTests/ChannelHandlers/RedisMessageEncoderTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import NIO -@testable import RedisNIO +@testable import RediStack import XCTest final class RedisMessageEncoderTests: XCTestCase { diff --git a/Tests/RedisNIOTests/Commands/BasicCommandsTests.swift b/Tests/RediStackTests/Commands/BasicCommandsTests.swift similarity index 94% rename from Tests/RedisNIOTests/Commands/BasicCommandsTests.swift rename to Tests/RediStackTests/Commands/BasicCommandsTests.swift index 892b9be..e339383 100644 --- a/Tests/RedisNIOTests/Commands/BasicCommandsTests.swift +++ b/Tests/RediStackTests/Commands/BasicCommandsTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -@testable import RedisNIO -import RedisNIOTestUtils +@testable import RediStack +import RediStackTestUtils import XCTest final class BasicCommandsTests: RedisIntegrationTestCase { diff --git a/Tests/RedisNIOTests/Commands/HashCommandsTests.swift b/Tests/RediStackTests/Commands/HashCommandsTests.swift similarity index 96% rename from Tests/RedisNIOTests/Commands/HashCommandsTests.swift rename to Tests/RediStackTests/Commands/HashCommandsTests.swift index 5e4dacd..e16e033 100644 --- a/Tests/RedisNIOTests/Commands/HashCommandsTests.swift +++ b/Tests/RediStackTests/Commands/HashCommandsTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -@testable import RedisNIO -import RedisNIOTestUtils +@testable import RediStack +import RediStackTestUtils import XCTest final class HashCommandsTests: RedisIntegrationTestCase { diff --git a/Tests/RedisNIOTests/Commands/ListCommandsTests.swift b/Tests/RediStackTests/Commands/ListCommandsTests.swift similarity index 97% rename from Tests/RedisNIOTests/Commands/ListCommandsTests.swift rename to Tests/RediStackTests/Commands/ListCommandsTests.swift index b4f8354..6359585 100644 --- a/Tests/RedisNIOTests/Commands/ListCommandsTests.swift +++ b/Tests/RediStackTests/Commands/ListCommandsTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -@testable import RedisNIO -import RedisNIOTestUtils +@testable import RediStack +import RediStackTestUtils import XCTest final class ListCommandsTests: RedisIntegrationTestCase { diff --git a/Tests/RedisNIOTests/Commands/SetCommandsTests.swift b/Tests/RediStackTests/Commands/SetCommandsTests.swift similarity index 97% rename from Tests/RedisNIOTests/Commands/SetCommandsTests.swift rename to Tests/RediStackTests/Commands/SetCommandsTests.swift index 1da1d8c..7abcbc1 100644 --- a/Tests/RedisNIOTests/Commands/SetCommandsTests.swift +++ b/Tests/RediStackTests/Commands/SetCommandsTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -@testable import RedisNIO -import RedisNIOTestUtils +@testable import RediStack +import RediStackTestUtils import XCTest final class SetCommandsTests: RedisIntegrationTestCase { diff --git a/Tests/RedisNIOTests/Commands/SortedSetCommandsTests.swift b/Tests/RediStackTests/Commands/SortedSetCommandsTests.swift similarity index 98% rename from Tests/RedisNIOTests/Commands/SortedSetCommandsTests.swift rename to Tests/RediStackTests/Commands/SortedSetCommandsTests.swift index e010ed7..928e3cd 100644 --- a/Tests/RedisNIOTests/Commands/SortedSetCommandsTests.swift +++ b/Tests/RediStackTests/Commands/SortedSetCommandsTests.swift @@ -1,20 +1,20 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// import NIO -@testable import RedisNIO -import RedisNIOTestUtils +@testable import RediStack +import RediStackTestUtils import XCTest final class SortedSetCommandsTests: RedisIntegrationTestCase { diff --git a/Tests/RedisNIOTests/Commands/StringCommandsTests.swift b/Tests/RediStackTests/Commands/StringCommandsTests.swift similarity index 95% rename from Tests/RedisNIOTests/Commands/StringCommandsTests.swift rename to Tests/RediStackTests/Commands/StringCommandsTests.swift index 717d13b..c52bf68 100644 --- a/Tests/RedisNIOTests/Commands/StringCommandsTests.swift +++ b/Tests/RediStackTests/Commands/StringCommandsTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -@testable import RedisNIO -import RedisNIOTestUtils +@testable import RediStack +import RediStackTestUtils import XCTest final class StringCommandsTests: RedisIntegrationTestCase { diff --git a/Tests/RedisNIOTests/RESPTranslatorTests.swift b/Tests/RediStackTests/RESPTranslatorTests.swift similarity index 98% rename from Tests/RedisNIOTests/RESPTranslatorTests.swift rename to Tests/RediStackTests/RESPTranslatorTests.swift index 35199ff..05d1579 100644 --- a/Tests/RedisNIOTests/RESPTranslatorTests.swift +++ b/Tests/RediStackTests/RESPTranslatorTests.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // @@ -14,7 +14,7 @@ import struct Foundation.Data import NIO -@testable import RedisNIO +@testable import RediStack import XCTest final class RESPTranslatorTests: XCTestCase { diff --git a/Tests/RedisNIOTests/RedisConnectionTests.swift b/Tests/RediStackTests/RedisConnectionTests.swift similarity index 87% rename from Tests/RedisNIOTests/RedisConnectionTests.swift rename to Tests/RediStackTests/RedisConnectionTests.swift index 6dd2268..283d4b1 100644 --- a/Tests/RedisNIOTests/RedisConnectionTests.swift +++ b/Tests/RediStackTests/RedisConnectionTests.swift @@ -1,19 +1,19 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -@testable import RedisNIO -import RedisNIOTestUtils +@testable import RediStack +import RediStackTestUtils import XCTest final class RedisConnectionTests: RedisIntegrationTestCase { diff --git a/Tests/RedisNIOTests/XCTestManifests.swift b/Tests/RediStackTests/XCTestManifests.swift similarity index 83% rename from Tests/RedisNIOTests/XCTestManifests.swift rename to Tests/RediStackTests/XCTestManifests.swift index f81239e..8ac43a4 100644 --- a/Tests/RedisNIOTests/XCTestManifests.swift +++ b/Tests/RediStackTests/XCTestManifests.swift @@ -1,12 +1,12 @@ //===----------------------------------------------------------------------===// // -// This source file is part of the RedisNIO open source project +// This source file is part of the RediStack open source project // -// Copyright (c) 2019 RedisNIO project authors +// Copyright (c) 2019 RediStack project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information -// See CONTRIBUTORS.txt for the list of RedisNIO project authors +// See CONTRIBUTORS.txt for the list of RediStack project authors // // SPDX-License-Identifier: Apache-2.0 // diff --git a/scripts/generate_contributors_list.sh b/scripts/generate_contributors_list.sh index 2d4382e..e3e60f3 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 RedisNIO open source project +## This source file is part of the RediStack open source project ## -## Copyright (c) 2019 RedisNIO project authors +## Copyright (c) 2019 RediStack project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information -## See CONTRIBUTORS.txt for the list of RedisNIO project authors +## See CONTRIBUTORS.txt for the list of RediStack project authors ## ## SPDX-License-Identifier: Apache-2.0 ## @@ -32,7 +32,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 RedisNIO. + organizations who have contributed source code to RediStack. 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