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 #53 from nodes-vapor/vapor-4
Browse files Browse the repository at this point in the history
Clean up and prepare for Vapor 4
  • Loading branch information
emarashliev committed Jun 2, 2020
2 parents 9d7a925 + e27da1d commit e7d478c
Show file tree
Hide file tree
Showing 47 changed files with 135 additions and 1,625 deletions.
67 changes: 0 additions & 67 deletions .circleci/config.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/documentation.yml
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 }}
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
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
18 changes: 11 additions & 7 deletions Package.swift
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 removed Public/.gitkeep
Empty file.
19 changes: 0 additions & 19 deletions Resources/Views/Submissions/Fields/checkbox-input.leaf

This file was deleted.

3 changes: 0 additions & 3 deletions Resources/Views/Submissions/Fields/email-input.leaf

This file was deleted.

19 changes: 0 additions & 19 deletions Resources/Views/Submissions/Fields/file-input.leaf

This file was deleted.

3 changes: 0 additions & 3 deletions Resources/Views/Submissions/Fields/hidden-input.leaf

This file was deleted.

19 changes: 0 additions & 19 deletions Resources/Views/Submissions/Fields/input-field.leaf

This file was deleted.

3 changes: 0 additions & 3 deletions Resources/Views/Submissions/Fields/password-input.leaf

This file was deleted.

24 changes: 0 additions & 24 deletions Resources/Views/Submissions/Fields/select-input.leaf

This file was deleted.

3 changes: 0 additions & 3 deletions Resources/Views/Submissions/Fields/text-input.leaf

This file was deleted.

19 changes: 0 additions & 19 deletions Resources/Views/Submissions/Fields/textarea-input.leaf

This file was deleted.

13 changes: 13 additions & 0 deletions Sources/Submissions/CreateRequest.swift
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) }
}
}
23 changes: 0 additions & 23 deletions Sources/Submissions/Errors/SubmissionError.swift

This file was deleted.

49 changes: 0 additions & 49 deletions Sources/Submissions/Errors/SubmissionValidationError.swift

This file was deleted.

28 changes: 0 additions & 28 deletions Sources/Submissions/FieldsRepresentable.swift

This file was deleted.

Loading

0 comments on commit e7d478c

Please sign in to comment.