diff --git a/Package.swift b/Package.swift index 82f0946..df82a12 100644 --- a/Package.swift +++ b/Package.swift @@ -1,10 +1,13 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.5.2 import PackageDescription let package = Package( name: "redis", platforms: [ - .macOS(.v10_15) + .macOS(.v10_15), + .iOS(.v13), + .tvOS(.v13), + .watchOS(.v6), ], products: [ .library(name: "Redis", targets: ["Redis"]) diff --git a/README.md b/README.md index b57c009..12b0993 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Redis

- + Documentation @@ -11,11 +11,11 @@ MIT License - - Continuous Integration + + CI - Swift 5.0 + Swift 5.5 This project is based off the Redis driver RediStack. For the majority of API documentation, refer to docs.redistack.info. diff --git a/Sources/Redis/Application+Redis.swift b/Sources/Redis/Application+Redis.swift index d32c93d..c81cfea 100644 --- a/Sources/Redis/Application+Redis.swift +++ b/Sources/Redis/Application+Redis.swift @@ -1,5 +1,7 @@ import Vapor import RediStack +import NIOCore +import Logging extension Application { public struct Redis { diff --git a/Sources/Redis/Redis+Cache.swift b/Sources/Redis/Redis+Cache.swift index 299caec..dee2d26 100644 --- a/Sources/Redis/Redis+Cache.swift +++ b/Sources/Redis/Redis+Cache.swift @@ -1,6 +1,7 @@ import Vapor import Foundation import RediStack +import NIOCore // MARK: RedisCacheCoder diff --git a/Sources/Redis/Redis+Concurrency.swift b/Sources/Redis/Redis+Concurrency.swift index 02c80af..56c597b 100644 --- a/Sources/Redis/Redis+Concurrency.swift +++ b/Sources/Redis/Redis+Concurrency.swift @@ -1,9 +1,8 @@ -#if compiler(>=5.5) && canImport(_Concurrency) import NIOCore import Vapor import RediStack +import Foundation -@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *) extension Application.Redis { public func send(command: String, with arguments: [RESPValue]) async throws -> RESPValue { try await self.application.redis(self.id) @@ -55,7 +54,6 @@ extension Application.Redis { } } -@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *) extension RedisClient { /// Gets the provided key as a decodable type. public func get(_ key: RedisKey, asJSON type: D.Type) async throws -> D? @@ -80,7 +78,6 @@ extension RedisClient { } } -@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *) extension Request.Redis { public func send(command: String, with arguments: [RESPValue]) async throws -> RESPValue { try await self.request.application.redis(self.id) @@ -132,6 +129,3 @@ extension Request.Redis { .get() } } - - -#endif diff --git a/Sources/Redis/Redis+Sessions.swift b/Sources/Redis/Redis+Sessions.swift index d84aee1..c8b9b78 100644 --- a/Sources/Redis/Redis+Sessions.swift +++ b/Sources/Redis/Redis+Sessions.swift @@ -1,6 +1,7 @@ import Foundation import Vapor import RediStack +import NIOCore /// A delegate object that controls key behavior of an `Application.Redis.Sessions` driver. public protocol RedisSessionsDelegate { diff --git a/Sources/Redis/RedisClient+Codable.swift b/Sources/Redis/RedisClient+Codable.swift index d89175a..ba72873 100644 --- a/Sources/Redis/RedisClient+Codable.swift +++ b/Sources/Redis/RedisClient+Codable.swift @@ -1,6 +1,7 @@ import AsyncKit import Foundation import RediStack +import NIOCore extension RedisClient { /// Gets the provided key as a decodable type. diff --git a/Sources/Redis/Request+Redis.swift b/Sources/Redis/Request+Redis.swift index 08693d7..f126ac9 100644 --- a/Sources/Redis/Request+Redis.swift +++ b/Sources/Redis/Request+Redis.swift @@ -1,5 +1,7 @@ import Vapor import RediStack +import Logging +import NIOCore extension Request { public struct Redis { diff --git a/Tests/RedisTests/MultipleRedisTests.swift b/Tests/RedisTests/MultipleRedisTests.swift index 3824ef5..edbb76b 100644 --- a/Tests/RedisTests/MultipleRedisTests.swift +++ b/Tests/RedisTests/MultipleRedisTests.swift @@ -3,6 +3,7 @@ import Redis import Vapor import Logging import XCTVapor +import XCTest private extension RedisID { static let one: RedisID = "one" diff --git a/Tests/RedisTests/RedisTests.swift b/Tests/RedisTests/RedisTests.swift index 3b8e209..a63b190 100644 --- a/Tests/RedisTests/RedisTests.swift +++ b/Tests/RedisTests/RedisTests.swift @@ -3,6 +3,7 @@ import Vapor import Logging import XCTVapor import RediStack +import XCTest extension String { var int: Int? { Int(self) } diff --git a/circle.yml b/circle.yml deleted file mode 100644 index d074e0e..0000000 --- a/circle.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: 2 - -jobs: - 11-bionic: - docker: - - image: vapor/swift:5.1-bionic - - image: redis:5 - name: redis - steps: - - checkout - - run: apt-get update; apt-get install -y libssl-dev zlib1g-dev - - run: swift build - - run: swift test - bionic-release: - docker: - - image: vapor/swift:5.1-bionic - steps: - - checkout - - run: apt-get update; apt-get install -y libssl-dev zlib1g-dev - - run: swift build -c release -workflows: - version: 2 - tests: - jobs: - - 11-bionic - - bionic-release - diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 3b189df..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: '2' - -services: - redis: - image: redis - ports: - - 6379:6379 - - redis2: - image: redis - ports: - - 6380:6379 -