From 4c29ce1d1dbb65f89abe33b5325201dd2b8eb7c5 Mon Sep 17 00:00:00 2001 From: Patrick Mueller Date: Fri, 13 Jan 2017 09:10:17 -0500 Subject: [PATCH] updates for version 1.0.4 --- README.md | 13 +++++++++++++ lib-src/cfenv.coffee | 2 +- package.json | 2 +- tests/test-core.coffee | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d8a0ec2..1bfb770 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,13 @@ first with `url.parse()`, there will be a `host` property in the result, so you won't be able to use the `hostname` and `port` values directly. You can **ONLY** set the resultant hostname and port with the `host` property. +Note that `url.parse()` and the later `url.format()` calls to construct the +result, will not produce pleasing results for "unusual" URLs, especially +those which do not use `http:` or `https:` protocols. The `url` `parse()` +and `format()` methods will not be used though, if you have no replacement +values, or the only replacement property is `url`, and so are safe to +use in that case. + Since the `appEnv.getServiceURL()` method operates against the `appEnv.services` property, you can fudge this object if that makes your life easier. @@ -304,6 +311,12 @@ When you visit the site, you'll see the output of various cfenv calls. changes ================================================================================ +**1.0.4** - 2017/01/13 + +- fix to getServiceURL() with non-http URLs - [issue #21][] + +[issue #21]: https://github.com/cloudfoundry-community/node-cfenv/issues/21 + **1.0.3** - 2014/10/02 - fixes for compatibility with Diego - [issue #11][] diff --git a/lib-src/cfenv.coffee b/lib-src/cfenv.coffee index c2f7d09..cd9e67a 100644 --- a/lib-src/cfenv.coffee +++ b/lib-src/cfenv.coffee @@ -218,7 +218,7 @@ throwError = (message) -> #------------------------------------------------------------------------------- # Copyright IBM Corp. 2014 -# Copyright Patrick Mueller 2015 +# Copyright Patrick Mueller 2015, 2017 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/package.json b/package.json index b9b8411..a6a86a6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cfenv", "main": "./lib/cfenv", "description": "easy access to your Cloud Foundry application environment", - "version": "1.0.3", + "version": "1.0.4", "author": "pmuellr", "license": "Apache-2.0", "homepage": "https://github.com/cloudfoundry-community/node-cfenv", diff --git a/tests/test-core.coffee b/tests/test-core.coffee index 6c69b53..e113279 100644 --- a/tests/test-core.coffee +++ b/tests/test-core.coffee @@ -524,7 +524,7 @@ JL = (object) -> JSON.stringify object, null, 4 #------------------------------------------------------------------------------- # Copyright IBM Corp. 2014 -# Copyright Patrick Mueller 2015 +# Copyright Patrick Mueller 2015, 2017 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.