Comparing version 0.0.2 to 0.0.3
@@ -33,2 +33,5 @@ (function() { | ||
configs = extend(true, extend(true, {}, defaults), env); | ||
if (_.isEmpty(configs)) { | ||
configs = data; | ||
} | ||
return this.configs = this.parse(configs); | ||
@@ -51,2 +54,5 @@ }; | ||
if (_.isString(obj) && /decrypt\(.+\)/.exec(obj)) { | ||
if (this.key_file == null) { | ||
throw new Error('Private key for decryption is missing...'); | ||
} | ||
matches = /decrypt\((.+)\)/.exec(obj); | ||
@@ -53,0 +59,0 @@ return this.key_file.decrypt(matches[1], 'base64', 'utf8'); |
{ | ||
"name": "yml", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Read Yaml files based on NODE_ENV or passed env + support for encryption", | ||
@@ -5,0 +5,0 @@ "main": "build/main", |
@@ -38,3 +38,3 @@ # yml | ||
```coffee | ||
# if RAILS_ENV = 'production' is set in server, these lines have same result | ||
# if NODE_ENV = 'production' is set in server, these lines have same result | ||
configs = Yml.load 'config.yml', { key: 'security.key.pem' } | ||
@@ -41,0 +41,0 @@ configs = Yml.load 'config.yml', 'production', { key: 'security.key.pem' } |
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
10112
13
83