This repository has been archived by the owner on Apr 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from nodes-vapor/vapor-4
Clean up and prepare for Vapor 4
- Loading branch information
Showing
47 changed files
with
135 additions
and
1,625 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# .github/workflows/documentation.yml | ||
name: Documentation | ||
|
||
on: [release] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Generate Documentation | ||
uses: SwiftDocOrg/swift-doc@master | ||
with: | ||
inputs: "Sources/Submissions" | ||
module-name: Submissions | ||
output: "Documentation" | ||
- name: Upload Documentation to Wiki | ||
uses: SwiftDocOrg/github-wiki-publish-action@v1 | ||
with: | ||
path: "Documentation" | ||
env: | ||
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.WIKI_ACCESS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: test | ||
on: | ||
- pull_request | ||
jobs: | ||
vapor_macos: | ||
runs-on: macos-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_11.4.1.app/Contents/Developer | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: xcrun swift test --enable-test-discovery --sanitize=thread | ||
vapor_bionic: | ||
container: | ||
image: vapor/swift:5.2-bionic | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: swift test --enable-test-discovery --sanitize=thread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
// swift-tools-version:4.1 | ||
// swift-tools-version:5.2 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Submissions", | ||
name: "submissions", | ||
platforms: [ | ||
.macOS(.v10_15) | ||
], | ||
products: [ | ||
.library(name: "Submissions", targets: ["Submissions"]), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/nodes-vapor/sugar.git", from: "4.0.0"), | ||
.package(url: "https://github.com/vapor/leaf.git", from: "3.0.0"), | ||
.package(url: "https://github.com/vapor/vapor.git", from: "3.1.0") | ||
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0") | ||
], | ||
targets: [ | ||
.target(name: "Submissions", dependencies: ["Leaf", "Sugar", "Vapor"]), | ||
.testTarget(name: "SubmissionsTests", dependencies: ["Submissions"]) | ||
.target(name: "Submissions", dependencies: [.product(name: "Vapor", package: "vapor")]), | ||
.testTarget(name: "SubmissionsTests", dependencies: [ | ||
.target(name:"Submissions"), | ||
.product(name: "XCTVapor", package: "vapor") | ||
]) | ||
] | ||
) |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Vapor | ||
|
||
public protocol CreateRequest: ValidatableRequest { | ||
associatedtype Model | ||
|
||
func create(on request: Request) -> EventLoopFuture<Model> | ||
} | ||
|
||
public extension CreateRequest { | ||
static func create(on request: Request) -> EventLoopFuture<Model> { | ||
validated(on: request).flatMap { $0.create(on: request) } | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
Sources/Submissions/Errors/SubmissionValidationError.swift
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.