Skip to content

Commit 4a4ee30

Browse files
ddunn2Aaron Liberatore
authored andcommitted
Migrate to Swift 4.0.2 (#70)
1 parent dcdc610 commit 4a4ee30

File tree

7 files changed

+31
-80
lines changed

7 files changed

+31
-80
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.build/
22
build
3-
Packages/
3+
Package.resolved
44
Kitura-CouchDB.xcodeproj
55
*.DS_Store

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.1
1+
4.0.2

.travis.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,9 @@ matrix:
1414
- os: linux
1515
dist: trusty
1616
sudo: required
17-
- os: linux
18-
dist: trusty
19-
sudo: required
20-
env: SWIFT_SNAPSHOT=$SWIFT_4_DEV_SNAPSHOT
21-
- os: osx
22-
osx_image: xcode8.3
23-
sudo: required
2417
- os: osx
25-
osx_image: xcode9
18+
osx_image: xcode9.1
2619
sudo: required
27-
env: SWIFT_SNAPSHOT=$SWIFT_4_DEV_SNAPSHOT
2820

2921
before_install:
3022
- git clone https://github.com/IBM-Swift/Package-Builder.git

Package.pins

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

Package.swift

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// swift-tools-version:4.0
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
14
/**
25
* Copyright IBM Corporation 2016, 2017
36
*
@@ -18,19 +21,30 @@ import PackageDescription
1821

1922
let package = Package(
2023
name: "Kitura-CouchDB",
24+
products: [
25+
// Products define the executables and libraries produced by a package, and make them visible to other packages.
26+
.library(
27+
name: "CouchDB",
28+
targets: ["CouchDB"]),
29+
],
30+
dependencies: [
31+
// Dependencies declare other packages that this package depends on.
32+
// .package(url: /* package url */, from: "1.0.0"),
33+
.package(url: "https://github.com/IBM-Swift/HeliumLogger.git", .upToNextMinor(from: "1.7.0")),
34+
.package(url: "https://github.com/IBM-Swift/Kitura-net.git", .upToNextMinor(from: "2.0.0")),
35+
.package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", .upToNextMinor(from: "17.0.0")),
36+
],
2137
targets: [
22-
Target(
38+
// Targets are the basic building blocks of a package. A target defines a module or a test suite.
39+
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
40+
.target(
2341
name: "CouchDB",
24-
dependencies: []
25-
),
26-
Target(
42+
dependencies: ["HeliumLogger", "KituraNet", "SwiftyJSON"]),
43+
.target(
2744
name: "CouchDBSample",
28-
dependencies: [.Target(name: "CouchDB")]
29-
),
30-
],
31-
dependencies: [
32-
.Package(url: "https://github.com/IBM-Swift/HeliumLogger.git", majorVersion: 1, minor: 7),
33-
.Package(url: "https://github.com/IBM-Swift/Kitura-net.git", majorVersion: 1, minor: 7),
34-
.Package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", majorVersion: 17)
35-
]
45+
dependencies: ["CouchDB"]),
46+
.testTarget(
47+
name: "CouchDBTests",
48+
dependencies: ["CouchDB"]),
49+
]
3650
)

Package@swift-4.swift

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

Sources/CouchDB/Database.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ public class Database {
433433
}
434434
}
435435

436-
if paramString.characters.count > 0 {
437-
paramString = "?" + String(paramString.characters.dropLast())
436+
if paramString.count > 0 {
437+
paramString = "?" + String(paramString.dropLast())
438438
}
439439

440440
var method = "GET"

0 commit comments

Comments
 (0)