config_okay
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -16,2 +16,5 @@ /*global require module */ | ||
} | ||
if(! /\.js(on)?$/.test(f)){ | ||
return cb('config_okay requires file to end in .json or .js') | ||
} | ||
fs.stat(f,function(err,stats){ | ||
@@ -18,0 +21,0 @@ if(err) return cb(err) |
{ | ||
"name": "config_okay", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Make sure config files are mode 0600 before you use it", | ||
@@ -5,0 +5,0 @@ "main": "config_okay.js", |
@@ -65,2 +65,11 @@ /* global require console process it describe after before __dirname */ | ||
}) | ||
it('should error out on a file ending in .txt' | ||
,function(done){ | ||
config_okay('file.txt',function(e,c){ | ||
should.exist(e) | ||
should.not.exist(c) | ||
e.should.match(/^config_okay requires file to end in/) | ||
return done() | ||
}) | ||
}) | ||
it('should parse okay a file in with mode 0600' | ||
@@ -67,0 +76,0 @@ ,function(done){ |
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
7593
104