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

Commit

Permalink
Merge pull request #20 from valen90/feature/vapor-two
Browse files Browse the repository at this point in the history
Updated to Vapor 2
  • Loading branch information
BrettRToomey authored Apr 26, 2017
2 parents d527d64 + 3b3d25e commit 3d544ed
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
os:
- linux
- osx
- linux
language: generic
sudo: required
dist: trusty
script:
- eval "$(curl -sL https://swift.vapor.sh/ci-3.1)"
- eval "$(curl -sL https://gist.githubusercontent.com/BrettRToomey/1256d98cce5546c696cc68d9f61ad46f/raw/d5fb266a17f26c41b59fd00867a3a2474c3efee3/TravisSwift31)"
- eval "$(curl -sL https://swift.vapor.sh/codecov)"
4 changes: 1 addition & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import PackageDescription

let alpha = Version(2,0,0, prereleaseIdentifiers: ["alpha"])

let package = Package(
name: "AWS",
targets: [
Expand All @@ -11,6 +9,6 @@ let package = Package(
Target(name: "VaporS3", dependencies: ["S3"]),
],
dependencies: [
.Package(url: "https://github.com/vapor/vapor.git", alpha),
.Package(url: "https://github.com/vapor/vapor.git", Version(2,0,0, prereleaseIdentifiers: ["beta"])),
]
)
2 changes: 1 addition & 1 deletion Sources/AWSSignatureV4/ErrorParser/ErrorParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension ErrorParser {
let errorBytes = consume(until: .lessThan)

guard let error = ErrorParser.awsGrammar.contains(errorBytes) else {
throw Error.unknownError(errorBytes.string)
throw Error.unknownError(errorBytes.makeString())
}

return error
Expand Down
4 changes: 2 additions & 2 deletions Sources/S3/S3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public struct S3 {
//TODO(Brett): headers & AccessControlList
)

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

let response = try EngineClient.get(url, headers)
let response = try EngineClient.factory.get(url, headers)
guard response.status == .ok else {
guard let bytes = response.body.bytes else {
throw Error.invalidResponse(response.status)
Expand Down
6 changes: 4 additions & 2 deletions Sources/VaporS3/Provider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ private let s3StorageKey = "s3-provider:s3"

public final class Provider: Vapor.Provider {
let s3: S3

public static var repositoryName: String = "VaporS3"
/// Initialize the provider with an s3 instance
public init(_ s3: S3) {
self.s3 = s3
Expand Down Expand Up @@ -45,7 +45,9 @@ public final class Provider: Vapor.Provider {
drop.storage[s3StorageKey] = s3
}

public func beforeRun(_ drop: Droplet) throws {}
public func boot(_ config: Config) throws {}

public func beforeRun(_ droplet: Droplet) throws {}
}

extension Droplet {
Expand Down

0 comments on commit 3d544ed

Please sign in to comment.