Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit 3d544ed

Browse files
authored
Merge pull request #20 from valen90/feature/vapor-two
Updated to Vapor 2
2 parents d527d64 + 3b3d25e commit 3d544ed

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
os:
2-
- linux
3-
- osx
2+
- linux
43
language: generic
54
sudo: required
65
dist: trusty
76
script:
8-
- eval "$(curl -sL https://swift.vapor.sh/ci-3.1)"
7+
- eval "$(curl -sL https://gist.githubusercontent.com/BrettRToomey/1256d98cce5546c696cc68d9f61ad46f/raw/d5fb266a17f26c41b59fd00867a3a2474c3efee3/TravisSwift31)"
8+
- eval "$(curl -sL https://swift.vapor.sh/codecov)"

Package.swift

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import PackageDescription
22

3-
let alpha = Version(2,0,0, prereleaseIdentifiers: ["alpha"])
4-
53
let package = Package(
64
name: "AWS",
75
targets: [
@@ -11,6 +9,6 @@ let package = Package(
119
Target(name: "VaporS3", dependencies: ["S3"]),
1210
],
1311
dependencies: [
14-
.Package(url: "https://github.com/vapor/vapor.git", alpha),
12+
.Package(url: "https://github.com/vapor/vapor.git", Version(2,0,0, prereleaseIdentifiers: ["beta"])),
1513
]
1614
)

Sources/AWSSignatureV4/ErrorParser/ErrorParser.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension ErrorParser {
3838
let errorBytes = consume(until: .lessThan)
3939

4040
guard let error = ErrorParser.awsGrammar.contains(errorBytes) else {
41-
throw Error.unknownError(errorBytes.string)
41+
throw Error.unknownError(errorBytes.makeString())
4242
}
4343

4444
return error

Sources/S3/S3.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public struct S3 {
4141
//TODO(Brett): headers & AccessControlList
4242
)
4343

44-
let response = try EngineClient.put(url, headers, Body.data(bytes))
44+
let response = try EngineClient.factory.put(url, headers, Body.data(bytes))
4545
guard response.status == .ok else {
4646
guard let bytes = response.body.bytes else {
4747
throw Error.invalidResponse(response.status)
@@ -55,7 +55,7 @@ public struct S3 {
5555
let url = generateURL(for: path)
5656
let headers = try signer.sign(path: path)
5757

58-
let response = try EngineClient.get(url, headers)
58+
let response = try EngineClient.factory.get(url, headers)
5959
guard response.status == .ok else {
6060
guard let bytes = response.body.bytes else {
6161
throw Error.invalidResponse(response.status)

Sources/VaporS3/Provider.swift

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ private let s3StorageKey = "s3-provider:s3"
66

77
public final class Provider: Vapor.Provider {
88
let s3: S3
9-
9+
public static var repositoryName: String = "VaporS3"
1010
/// Initialize the provider with an s3 instance
1111
public init(_ s3: S3) {
1212
self.s3 = s3
@@ -45,7 +45,9 @@ public final class Provider: Vapor.Provider {
4545
drop.storage[s3StorageKey] = s3
4646
}
4747

48-
public func beforeRun(_ drop: Droplet) throws {}
48+
public func boot(_ config: Config) throws {}
49+
50+
public func beforeRun(_ droplet: Droplet) throws {}
4951
}
5052

5153
extension Droplet {

0 commit comments

Comments
 (0)