Comparing version 0.2.0 to 1.0.0
@@ -130,2 +130,11 @@ // Generated by CoffeeScript 1.7.1 | ||
AppEnv.prototype.getServiceCreds = function(spec) { | ||
var service; | ||
service = this.getService(spec); | ||
if (service == null) { | ||
return null; | ||
} | ||
return service.credentials || {}; | ||
}; | ||
return AppEnv; | ||
@@ -132,0 +141,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "easy access to your Cloud Foundry application environment", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"author": "pmuellr", | ||
@@ -15,11 +15,11 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"js-yaml": "3.0.x", | ||
"js-yaml": "3.2.x", | ||
"ports": "1.1.x", | ||
"underscore": "1.6.x" | ||
"underscore": "1.7.x" | ||
}, | ||
"devDependencies": { | ||
"coffee-script": "1.7.x", | ||
"mocha": "1.19.x", | ||
"coffee-script": "1.8.x", | ||
"mocha": "1.21.x", | ||
"expect.js": "0.3.x" | ||
} | ||
} |
@@ -112,2 +112,3 @@ cfenv - easy access to your Cloud Foundry application environment | ||
* `appEnv.getServiceURL(spec, replacements)` | ||
* `appEnv.getServiceCreds(spec)` | ||
@@ -198,3 +199,3 @@ If no value can be determined for `port`, and the `name` property on the | ||
`appEnv.getServiceURL(spec, replacements)` | ||
**`appEnv.getServiceURL(spec, replacements)`** | ||
-------------------------------------------------------------------------------- | ||
@@ -270,3 +271,18 @@ | ||
**`appEnv.getServiceCreds(spec)`** | ||
-------------------------------------------------------------------------------- | ||
Returns the `credentials` object of a service by name. | ||
The `spec` parameter is the same as that used by the `appEnv.getServiceURL()` | ||
method. If there is no service that matches the `spec` parameter, this method | ||
will return `null`. | ||
If there is a service that matches the `spec` parameter, the value of it's | ||
`credentials` property will be returned. If for some reason, there is no | ||
`credentials` property on the service, an empty object - `{}` - will be | ||
returned. | ||
testing with Cloud Foundry | ||
@@ -273,0 +289,0 @@ ================================================================================ |
@@ -45,3 +45,3 @@ # sample environmental data | ||
## `cf-env.getCore()` | ||
## `cfenv.getAppEnv()` | ||
@@ -107,6 +107,7 @@ { | ||
], | ||
"url": "https://<cf-host>.<cf-domain>" | ||
"url": "https://<cf-host>.<cf-domain>", | ||
"isLocal": false | ||
} | ||
## `cf-env.getServices` | ||
## `appEnv.getServices()` | ||
@@ -113,0 +114,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
69374
315
0
344
+ Addedargparse@1.0.10(transitive)
+ Addedesprima@2.0.0(transitive)
+ Addedjs-yaml@3.2.7(transitive)
+ Addedsprintf-js@1.0.3(transitive)
- Removedargparse@0.1.16(transitive)
- Removedesprima@1.0.4(transitive)
- Removedjs-yaml@3.0.2(transitive)
- Removedunderscore@1.6.0(transitive)
- Removedunderscore.string@2.4.0(transitive)
Updatedjs-yaml@3.2.x
Updatedunderscore@1.7.x