Skip to content

Commit e681c93

Browse files
authored
Merge pull request #692 from vapor/4-release
4.0.0 Release
2 parents 55f47ca + 3101cf4 commit e681c93

File tree

8 files changed

+90
-38
lines changed

8 files changed

+90
-38
lines changed

.github/CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing to Fluent
2+
3+
👋 Welcome to the Vapor team!
4+
5+
## Packages
6+
7+
The `fluent` package integrates [`fluent-kit`](https://github.com/vapor/fluent-kit) with [`vapor`](https://github.com/vapor/vapor). Most of the ORM code lives in FluentKit.
8+
9+
Driver packages can be found by searching GitHub for [`#fluent-driver`](https://github.com/topics/fluent-driver). Each driver package will also usually contain relatively little code with most of the functionality coming from lower level packages.
10+
11+
## Xcode
12+
13+
To open Fluent in Xcode:
14+
15+
- Clone the repo to your computer
16+
- Drag and drop the folder onto Xcode
17+
18+
To test within Xcode, press `CMD+U`.
19+
20+
## SPM
21+
22+
To develop using SPM, open the code in your favorite code editor. Use the following commands from within the project's root folder to build and test.
23+
24+
```sh
25+
swift build
26+
swift test
27+
```
28+
29+
## SemVer
30+
31+
Vapor follows [SemVer](https://semver.org). This means that any changes to the source code that can cause
32+
existing code to stop compiling _must_ wait until the next major version to be included.
33+
34+
Code that is only additive and will not break any existing code can be included in the next minor release.
35+
36+
----------
37+
38+
Join us on Discord if you have any questions: [vapor.team](http://vapor.team).
39+
40+
— Thanks! 🙌

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github: [tanner0101] # loganwright, joscdk
1+
github: [tanner0101]
22
open_collective: vapor

.github/workflows/test.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,45 @@
11
name: test
22
on:
3-
- pull_request
3+
pull_request:
4+
push:
5+
branches:
6+
- master
47
jobs:
5-
fluent_xenial:
6-
container:
7-
image: vapor/swift:5.2-xenial
8+
linux:
89
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
image:
14+
- swift:5.2-xenial
15+
- swift:5.2-bionic
16+
- swiftlang/swift:nightly-5.2-xenial
17+
- swiftlang/swift:nightly-5.2-bionic
18+
- swiftlang/swift:nightly-5.3-xenial
19+
- swiftlang/swift:nightly-5.3-bionic
20+
- swiftlang/swift:nightly-master-xenial
21+
- swiftlang/swift:nightly-master-bionic
22+
- swiftlang/swift:nightly-master-focal
23+
- swiftlang/swift:nightly-master-centos8
24+
- swiftlang/swift:nightly-master-amazonlinux2
25+
container: ${{ matrix.image }}
26+
env:
27+
LOG_LEVEL: info
28+
steps:
29+
- name: Checkout Fluent
30+
uses: actions/checkout@v2
31+
- name: Run base tests with Thread Sanitizer
32+
run: swift test --enable-test-discovery --sanitize=thread
33+
macOS:
34+
env:
35+
LOG_LEVEL: info
36+
runs-on: macos-latest
937
steps:
10-
- uses: actions/checkout@v1
11-
- run: swift test --enable-test-discovery --sanitize=thread
12-
fluent_bionic:
13-
container:
14-
image: vapor/swift:5.2-bionic
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v1
18-
- run: swift test --enable-test-discovery --sanitize=thread
38+
- name: Select latest available Xcode
39+
uses: maxim-lobanov/[email protected]
40+
with:
41+
xcode-version: latest
42+
- name: Checkout Fluent
43+
uses: actions/checkout@v2
44+
- name: Run base Fluent tests with Thread Sanitizer
45+
run: swift test --enable-test-discovery --sanitize=thread

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let package = Package(
1010
.library(name: "Fluent", targets: ["Fluent"]),
1111
],
1212
dependencies: [
13-
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.0.0-rc.2.4"),
13+
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.0.0"),
1414
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0"),
1515
],
1616
targets: [

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
>
77
<br>
88
<br>
9-
<a href="https://api.vapor.codes/fluent/master/Fluent/index.html">
10-
<img src="http://img.shields.io/badge/api-docs-2196f3.svg" alt="Documentation">
9+
<a href="https://docs.vapor.codes/4.0/">
10+
<img src="http://img.shields.io/badge/read_the-docs-2196f3.svg" alt="Documentation">
1111
</a>
1212
<a href="https://discord.gg/vapor">
1313
<img src="https://img.shields.io/discord/431917998102675485.svg" alt="Team Chat">

Sources/Fluent/Deprecated.swift

Lines changed: 0 additions & 19 deletions
This file was deleted.

Sources/Fluent/Fluent+Sessions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private struct DatabaseSessionAuthenticator<User>: SessionAuthenticator
110110
public final class SessionRecord: Model {
111111
public static let schema = "_fluent_sessions"
112112

113-
private struct _Migration: Migration {
113+
struct Create: Migration {
114114
func prepare(on database: Database) -> EventLoopFuture<Void> {
115115
database.schema("_fluent_sessions")
116116
.id()
@@ -126,7 +126,7 @@ public final class SessionRecord: Model {
126126
}
127127

128128
public static var migration: Migration {
129-
_Migration()
129+
Create()
130130
}
131131

132132
@ID(key: .id)

Tests/FluentTests/SessionTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import Fluent
44
import Vapor
55

66
final class SessionTests: XCTestCase {
7+
func testSessionMigrationName() {
8+
XCTAssertEqual(SessionRecord.migration.name, "Fluent.SessionRecord.Create")
9+
}
10+
711
func testSessions() throws {
812
let app = Application(.testing)
913
defer { app.shutdown() }

0 commit comments

Comments
 (0)