Comparing version 1.0.0 to 1.0.1
@@ -1,3 +0,11 @@ | ||
# 2pid changelog | ||
# 2conf changelog | ||
## [1.0.1](link/1.0.1) (2016-06-22) | ||
[Full Changelog](/compare/1.0.0...1.0.1) | ||
**What Was Done:** | ||
- add check config files for exists | ||
- updated config examples | ||
## [1.0.0](link/1.0.0) (2016-06-17) | ||
@@ -4,0 +12,0 @@ [Full Changelog](/compare/master...1.0.0) |
@@ -27,5 +27,10 @@ /*! | ||
var config = JSON.parse(fs.readFileSync('./config/'+env+'.json', 'utf8')); | ||
try { | ||
var configFile = './config/'+env+'.json'; | ||
fs.accessSync(configFile, fs.F_OK); | ||
return JSON.parse(fs.readFileSync(configFile, 'utf8')); | ||
} catch (e) { | ||
return {}; | ||
} | ||
return config; | ||
} |
{ | ||
"name": "2conf", | ||
"version": "1.0.0", | ||
"description": "Config", | ||
"version": "1.0.1", | ||
"description": "Simple config", | ||
"main": "index.js", | ||
@@ -22,3 +22,9 @@ "dependencies": { | ||
"keywords": [ | ||
"Config" | ||
"config", | ||
"simple", | ||
"simpleness", | ||
"2conf", | ||
"toconf", | ||
"to conf", | ||
"to congigurate" | ||
], | ||
@@ -25,0 +31,0 @@ "author": { |
# Config | ||
v.1.0.0 | ||
v.1.0.1 | ||
@@ -5,0 +5,0 @@ ## Install |
@@ -17,17 +17,7 @@ var expect = require('chai').expect; | ||
it('ports config', function(done) { | ||
config.should.have.property('PORTS'); | ||
config.PORTS.should.have.property('login'); | ||
expect(config.PORTS.login).to.be.above(0); | ||
config.should.have.property('port'); | ||
expect(config.port).to.be.above(0); | ||
done(); | ||
}); | ||
it('login config', function(done) { | ||
config.should.have.property('login'); | ||
config.login.should.have.property('TOKEN'); | ||
config.login.TOKEN.should.have.property('secret'); | ||
config.login.TOKEN.should.have.property('expire'); | ||
expect(config.login.TOKEN.expire).to.be.above(0); | ||
done(); | ||
}); | ||
it('log config', function(done) { | ||
@@ -49,17 +39,7 @@ config.should.have.property('log'); | ||
it('ports config', function(done) { | ||
config.should.have.property('PORTS'); | ||
config.PORTS.should.have.property('login'); | ||
expect(config.PORTS.login).to.be.above(0); | ||
config.should.have.property('port'); | ||
expect(config.port).to.be.above(0); | ||
done(); | ||
}); | ||
it('login config', function(done) { | ||
config.should.have.property('login'); | ||
config.login.should.have.property('TOKEN'); | ||
config.login.TOKEN.should.have.property('secret'); | ||
config.login.TOKEN.should.have.property('expire'); | ||
expect(config.login.TOKEN.expire).to.be.above(0); | ||
done(); | ||
}); | ||
it('log config', function(done) { | ||
@@ -66,0 +46,0 @@ config.should.have.property('log'); |
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
3283
87