Skip to content

fixing the dangling ponters. #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ fastlane/screenshots
Packages/
PostgreSQL.xcodeproj/
.DS_Store
.swiftpm
8 changes: 0 additions & 8 deletions .jazzy.yaml

This file was deleted.

34 changes: 34 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cyclomatic_complexity:
- 64 # warning
- 128 # error
file_length:
- 2048 # warning
- 4096 # error
function_body_length:
- 128 # warning
- 256 # error
line_length:
- 1024 # warning
- 2048 # error
type_body_length:
- 1024 # warning
- 2048 # error
disabled_rules:
- empty_enum_arguments
- force_cast
- function_parameter_count
- identifier_name
- inclusive_language
- large_tuple
- multiple_closures_with_trailing_closure
- nesting
- opening_brace
- redundant_optional_initialization
- syntactic_sugar
- unused_optional_binding
- vertical_parameter_alignment
- void_return
excluded:
- .build/
- Sources/PerfectHTTP/Mime*.swift
- Sources/PerfectHTTPServer/HTTP2/HPACK.swift
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARG arch
FROM rockywei/swift:5.6.$arch
RUN apt-get update -y
RUN apt-get install -y pkg-config libpq-dev
32 changes: 9 additions & 23 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// swift-tools-version:5.1
// swift-tools-version:5.4
// Package.swift
// Perfect-PostgreSQL
//
// Created by Kyle Jessup on 3/22/16.
// Copyright (C) 2016 PerfectlySoft, Inc.
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//
// This source file is part of the Perfect.org open source project
//
Expand All @@ -14,12 +14,11 @@
//
// See http://perfect.org/licensing.html for license information
//
//===----------------------------------------------------------------------===//
// ===----------------------------------------------------------------------===//
//

import PackageDescription

#if os(macOS)
let package = Package(
name: "PerfectPostgreSQL",
platforms: [
Expand All @@ -29,27 +28,14 @@ let package = Package(
.library(name: "PerfectPostgreSQL", targets: ["PerfectPostgreSQL"])
],
dependencies: [
.package(url: "https://github.com/PerfectlySoft/Perfect-CRUD.git", from: "2.0.0"),
.package(url: "https://github.com/PerfectlySoft/Perfect-libpq.git", from: "2.0.0"),
],
targets: [
.target(name: "PerfectPostgreSQL", dependencies: ["PerfectCRUD"]),
.testTarget(name: "PerfectPostgreSQLTests", dependencies: ["PerfectPostgreSQL"])
]
)
#else
let package = Package(
name: "PerfectPostgreSQL",
products: [
.library(name: "PerfectPostgreSQL", targets: ["PerfectPostgreSQL"])
.package(url: "https://github.com/RockfordWei/Perfect.git", from: "5.6.13")
],
dependencies: [
.package(url: "https://github.com/PerfectlySoft/Perfect-CRUD.git", from: "2.0.0"),
.package(url: "https://github.com/PerfectlySoft/Perfect-libpq-linux.git", from: "2.0.0"),
],
targets: [
.target(name: "PerfectPostgreSQL", dependencies: ["PerfectCRUD"]),
.systemLibrary(name: "libpq", pkgConfig: "libpq", providers: [
.apt(["libpq-dev"]),
.brew(["openssl", "postgres"])
]),
.target(name: "PerfectPostgreSQL", dependencies: ["libpq", .product(name: "PerfectCRUD", package: "Perfect")]),
.testTarget(name: "PerfectPostgreSQLTests", dependencies: ["PerfectPostgreSQL"])
]
)
#endif
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,29 @@ Add this project as a dependency in your Package.swift file.
## Documentation

For more information, please visit [perfect.org](http://www.perfect.org/docs/PostgreSQL.html).

## Update for Swift 5.4 + Perfect Classic

``` swift
// swift-tools-version: 5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "DemoApp",
dependencies: [
.package(url: "https://github.com/RockfordWei/Perfect.git", from: "5.6.13"),
.package(url: "https://github.com/RockfordWei/Perfect-PostgreSQL.git", from: "5.6.0"),
],
targets: [
.executableTarget(
name: "DemoApp",
dependencies: [
.product(name: "PerfectLib", package: "Perfect"),
.product(name: "PerfectPostgreSQL", package: "Perfect-PostgreSQL")
]),
]
)

```
Loading