Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/IBM-Swift/Swift-cfenv in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
BDHernand committed Sep 13, 2016
2 parents 2cb0eba + 1a6ed1b commit 70f0421
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 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: []
)
4 changes: 2 additions & 2 deletions 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 All @@ -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),

...

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 70f0421

Please sign in to comment.