Skip to content

Commit

Permalink
Migrate to Swift 4.0.2 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddunn2 authored and Aaron Liberatore committed Dec 15, 2017
1 parent dcdc610 commit 4a4ee30
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,5 +1,5 @@
.build/
build
Packages/
Package.resolved
Kitura-CouchDB.xcodeproj
*.DS_Store
2 changes: 1 addition & 1 deletion .swift-version
@@ -1 +1 @@
3.1.1
4.0.2
10 changes: 1 addition & 9 deletions .travis.yml
Expand Up @@ -14,17 +14,9 @@ matrix:
- os: linux
dist: trusty
sudo: required
- os: linux
dist: trusty
sudo: required
env: SWIFT_SNAPSHOT=$SWIFT_4_DEV_SNAPSHOT
- os: osx
osx_image: xcode8.3
sudo: required
- os: osx
osx_image: xcode9
osx_image: xcode9.1
sudo: required
env: SWIFT_SNAPSHOT=$SWIFT_4_DEV_SNAPSHOT

before_install:
- git clone https://github.com/IBM-Swift/Package-Builder.git
Expand Down
5 changes: 0 additions & 5 deletions Package.pins

This file was deleted.

38 changes: 26 additions & 12 deletions Package.swift
@@ -1,3 +1,6 @@
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

/**
* Copyright IBM Corporation 2016, 2017
*
Expand All @@ -18,19 +21,30 @@ import PackageDescription

let package = Package(
name: "Kitura-CouchDB",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "CouchDB",
targets: ["CouchDB"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/IBM-Swift/HeliumLogger.git", .upToNextMinor(from: "1.7.0")),
.package(url: "https://github.com/IBM-Swift/Kitura-net.git", .upToNextMinor(from: "2.0.0")),
.package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", .upToNextMinor(from: "17.0.0")),
],
targets: [
Target(
// Targets are the basic building blocks of a package. A target defines a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "CouchDB",
dependencies: []
),
Target(
dependencies: ["HeliumLogger", "KituraNet", "SwiftyJSON"]),
.target(
name: "CouchDBSample",
dependencies: [.Target(name: "CouchDB")]
),
],
dependencies: [
.Package(url: "https://github.com/IBM-Swift/HeliumLogger.git", majorVersion: 1, minor: 7),
.Package(url: "https://github.com/IBM-Swift/Kitura-net.git", majorVersion: 1, minor: 7),
.Package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", majorVersion: 17)
]
dependencies: ["CouchDB"]),
.testTarget(
name: "CouchDBTests",
dependencies: ["CouchDB"]),
]
)
50 changes: 0 additions & 50 deletions Package@swift-4.swift

This file was deleted.

4 changes: 2 additions & 2 deletions Sources/CouchDB/Database.swift
Expand Up @@ -433,8 +433,8 @@ public class Database {
}
}

if paramString.characters.count > 0 {
paramString = "?" + String(paramString.characters.dropLast())
if paramString.count > 0 {
paramString = "?" + String(paramString.dropLast())
}

var method = "GET"
Expand Down

0 comments on commit 4a4ee30

Please sign in to comment.