From aff21c803cf0df2d5100f0a34014f289f47c49f1 Mon Sep 17 00:00:00 2001 From: Chia Huang Date: Wed, 31 Aug 2016 15:06:53 -0500 Subject: [PATCH 1/7] Update to 8.30 --- .swift-version | 2 +- Package.swift | 6 +++--- .../MainTests.swift | 0 .../UtilsTests.swift | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename Tests/{CloudFoundryEnv => CloudFoundryEnvTests}/MainTests.swift (100%) rename Tests/{CloudFoundryEnv => CloudFoundryEnvTests}/UtilsTests.swift (100%) diff --git a/.swift-version b/.swift-version index fbe576f..22ea19a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -DEVELOPMENT-SNAPSHOT-2016-07-25-a +DEVELOPMENT-SNAPSHOT-2016-08-23-a diff --git a/Package.swift b/Package.swift index 0cd8b8b..11a4fc8 100644 --- a/Package.swift +++ b/Package.swift @@ -26,7 +26,7 @@ let package = Package( ], dependencies: [ //.Package(url: "https://github.com/behrang/YamlSwift.git", majorVersion: 1), - .Package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", majorVersion: 11) - ], - testDependencies: [] + .Package(url: "https://github.com/IBM-Swift/SwiftyJSON.git", majorVersion: 14) + ] + //testDependencies: [] ) diff --git a/Tests/CloudFoundryEnv/MainTests.swift b/Tests/CloudFoundryEnvTests/MainTests.swift similarity index 100% rename from Tests/CloudFoundryEnv/MainTests.swift rename to Tests/CloudFoundryEnvTests/MainTests.swift diff --git a/Tests/CloudFoundryEnv/UtilsTests.swift b/Tests/CloudFoundryEnvTests/UtilsTests.swift similarity index 100% rename from Tests/CloudFoundryEnv/UtilsTests.swift rename to Tests/CloudFoundryEnvTests/UtilsTests.swift From 0fa7ba0853518ee24aae6d730885537a1ab005ec Mon Sep 17 00:00:00 2001 From: Chia Huang Date: Wed, 31 Aug 2016 15:09:02 -0500 Subject: [PATCH 2/7] Update swift version --- .swift-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.swift-version b/.swift-version index 22ea19a..9503d9a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -DEVELOPMENT-SNAPSHOT-2016-08-23-a +DEVELOPMENT-SNAPSHOT-2016-08-30-a From 1aa3077da4458c17773a81fc9467f1777e2f4bc4 Mon Sep 17 00:00:00 2001 From: Chia Huang Date: Wed, 31 Aug 2016 15:53:30 -0500 Subject: [PATCH 3/7] Fixed travis errors --- Sources/CloudFoundryEnv/AppEnv.swift | 2 +- Sources/CloudFoundryEnv/DateUtils.swift | 2 +- Tests/CloudFoundryEnvTests/UtilsTests.swift | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/CloudFoundryEnv/AppEnv.swift b/Sources/CloudFoundryEnv/AppEnv.swift index 7787ef4..7ee3e50 100644 --- a/Sources/CloudFoundryEnv/AppEnv.swift +++ b/Sources/CloudFoundryEnv/AppEnv.swift @@ -34,7 +34,7 @@ public struct AppEnv { public init(options: JSON) throws { // NSProcessInfo.processInfo().environment returns [String : String] #if os(Linux) - let environmentVars = ProcessInfo.processInfo().environment + let environmentVars = ProcessInfo.processInfo.environment #else let environmentVars = ProcessInfo.processInfo.environment #endif diff --git a/Sources/CloudFoundryEnv/DateUtils.swift b/Sources/CloudFoundryEnv/DateUtils.swift index 67759d9..5538d66 100644 --- a/Sources/CloudFoundryEnv/DateUtils.swift +++ b/Sources/CloudFoundryEnv/DateUtils.swift @@ -25,7 +25,7 @@ public struct DateUtils { // Example: 2016-03-04 02:43:07 +0000 dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss ZZZ" #if os(Linux) - let timeZone = TimeZone(name: "UTC") + let timeZone = TimeZone(abbreviation: "UTC") #else let timeZone = TimeZone(identifier: "UTC") #endif diff --git a/Tests/CloudFoundryEnvTests/UtilsTests.swift b/Tests/CloudFoundryEnvTests/UtilsTests.swift index ad5457e..4ac0a29 100644 --- a/Tests/CloudFoundryEnvTests/UtilsTests.swift +++ b/Tests/CloudFoundryEnvTests/UtilsTests.swift @@ -45,7 +45,8 @@ class UtilsTests : XCTestCase { if let json = JSONUtils.convertStringToJSON(text: VCAP_APPLICATION) { //print("JSON object is: \(json)") //print("Type is \(json["users"].dynamicType)") - XCTAssertNil(json["users"] as? AnyObject) + //XCTAssertNil(json["users"] as? AnyObject) + XCTAssertEqual(json["users"], nil) XCTAssertEqual(json["instance_id"], "7d4f24cfba06462ba23d68aaf1d7354a", "instance_id should match.") XCTAssertEqual(json["instance_index"], 0, "instance_index should match.") XCTAssertEqual(json["host"], "0.0.0.0", "host should match.") From fe8d0dfe546019cb5b0f01b9eca21c056084ec03 Mon Sep 17 00:00:00 2001 From: Chia Huang Date: Wed, 31 Aug 2016 16:24:22 -0500 Subject: [PATCH 4/7] Update LinuxMain --- Tests/LinuxMain.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 059baf9..6f38106 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -16,7 +16,7 @@ import XCTest -@testable import CloudFoundryEnvTestSuite +@testable import CloudFoundryEnvTestSuites XCTMain([ testCase(MainTests.allTests), From be8f3f4a0863049ca21dad41b212c2d6e697de61 Mon Sep 17 00:00:00 2001 From: Chia Huang Date: Wed, 31 Aug 2016 16:30:21 -0500 Subject: [PATCH 5/7] Update the import due to wrong name --- Tests/LinuxMain.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 6f38106..a185f17 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -16,7 +16,7 @@ import XCTest -@testable import CloudFoundryEnvTestSuites +@testable import CloudFoundryEnvTests XCTMain([ testCase(MainTests.allTests), From 77ba44cea648d494287b3ea69feaff22a00d9b59 Mon Sep 17 00:00:00 2001 From: chiahuang Date: Thu, 1 Sep 2016 09:20:41 -0500 Subject: [PATCH 6/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54c9582..4d8c848 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This library determines if you are running your application "locally" or on the For the implementation of this Swift package, we used as inspiration a similar module that had been developed for Node.js applications, [node-cfenv](https://github.com/cloudfoundry-community/node-cfenv). ## Swift version -The latest version of Swift-cfenv works with the `DEVELOPMENT-SNAPSHOT-2016-06-20-a` version of the Swift binaries. You can download this version of the Swift binaries by following this [link](https://swift.org/download/). +The latest version of Swift-cfenv works with the `DEVELOPMENT-SNAPSHOT-2016-08-30-a` version of the Swift binaries. You can download this version of the Swift binaries by following this [link](https://swift.org/download/#snapshots). ## Usage To leverage the Swift-cfenv package in your Swift application, you should specify a dependency for it in your `Package.swift` file: From 1a6ed1b0272fc01d98aa26364ff3ef4b806cbe3a Mon Sep 17 00:00:00 2001 From: rolivieri Date: Thu, 1 Sep 2016 09:44:36 -0500 Subject: [PATCH 7/7] Updates to README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d8c848..b9a365b 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ To leverage the Swift-cfenv package in your Swift application, you should specif ... dependencies: [ - .Package(url: "https://github.com/IBM-Swift/Swift-cfenv.git", majorVersion: 1, minor: 5), + .Package(url: "https://github.com/IBM-Swift/Swift-cfenv.git", majorVersion: 1, minor: 6), ...