Skip to content

Commit

Permalink
Merge pull request #17 from chiahuang/swift.8.30
Browse files Browse the repository at this point in the history
Migrated to 8/30
  • Loading branch information
rolivieri authored Sep 1, 2016
2 parents a6e8778 + 77ba44c commit 72fc45c
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DEVELOPMENT-SNAPSHOT-2016-07-25-a
DEVELOPMENT-SNAPSHOT-2016-08-30-a
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Sources/CloudFoundryEnv/AppEnv.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Sources/CloudFoundryEnv/DateUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import XCTest

@testable import CloudFoundryEnvTestSuite
@testable import CloudFoundryEnvTests

XCTMain([
testCase(MainTests.allTests),
Expand Down

0 comments on commit 72fc45c

Please sign in to comment.