-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First version containg the data validator.
- Loading branch information
Mickael van der Beek
committed
Oct 4, 2014
1 parent
c51c2d1
commit dddfbaa
Showing
18 changed files
with
1,243 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Created by http://www.gitignore.io | ||
|
||
### Dot files ### | ||
.* | ||
|
||
### Git ### | ||
!/.gitignore | ||
!/.gitmodules | ||
|
||
### Logs ### | ||
logs | ||
*.log | ||
|
||
### Runtime data ### | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
### NPM dependency directory ### | ||
node_modules | ||
|
||
### JSHint ### | ||
!/.jshintrc | ||
|
||
### JSCSrc ### | ||
!/.jscsrc | ||
|
||
### Travis ### | ||
!/.travis.yml | ||
|
||
### Test reports ### | ||
test/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"preset": "google", | ||
"validateIndentation": "\t" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"boss": true, | ||
"expr": true, | ||
"curly": true, | ||
"undef": true, | ||
"noarg": true, | ||
"immed": true, | ||
"eqnull": true, | ||
"strict": true, | ||
"unused": true, | ||
"freeze": true, | ||
"eqeqeq": true, | ||
"nonbsp": false, | ||
"nonew": true, | ||
"newcap": false, | ||
"noempty": true, | ||
"quotmark": "single", | ||
|
||
"browser": false, | ||
"node": true, | ||
|
||
"globals": { | ||
"module": false, | ||
|
||
"console": false, | ||
|
||
"beforeEach": false, | ||
"requirejs": false, | ||
"require": false, | ||
"define": false, | ||
|
||
"describe": false, | ||
"before": false, | ||
"it": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
function GruntTasks (grunt) { | ||
'use strict'; | ||
|
||
grunt.initConfig({ | ||
jsonlint: { | ||
pkg: { | ||
src: 'package.json' | ||
}, | ||
jshint: { | ||
src: '.jshintrc' | ||
}, | ||
jscsrc: { | ||
src: '.jscsrc' | ||
} | ||
}, | ||
jshint: { | ||
options: { | ||
jshintrc: '.jshintrc' | ||
}, | ||
src: [ | ||
'src/**/*.js', | ||
'!src/schemas/**/*.js', | ||
'test/**/*.js', | ||
'!test/coverage/**', | ||
'Gruntfile.js' | ||
] | ||
}, | ||
jscs: { | ||
src: [ | ||
'src/**/*.js', | ||
'test/**/*.js', | ||
'!test/coverage/**', | ||
'Gruntfile.js' | ||
], | ||
options: { | ||
config: '.jscsrc' | ||
} | ||
}, | ||
clean: { | ||
coverage: [ | ||
'test/coverage' | ||
] | ||
}, | ||
instrument: { | ||
files: [ | ||
'src/**/*.js' | ||
], | ||
options: { | ||
basePath: 'test/coverage/instrument/', | ||
lazy: false | ||
} | ||
}, | ||
mochaTest: { | ||
test: { | ||
options: { | ||
reporter: 'spec', | ||
timeout: 2000 | ||
}, | ||
src: [ | ||
'test/test.js' | ||
] | ||
} | ||
}, | ||
storeCoverage: { | ||
options: { | ||
dir: 'test/coverage/reports' | ||
} | ||
}, | ||
makeReport: { | ||
src: 'test/coverage/reports/**/*.json', | ||
options: { | ||
type: 'lcov', | ||
dir: 'test/coverage/reports', | ||
print: 'detail' | ||
} | ||
}, | ||
coveralls: { | ||
options: { | ||
src: 'test/coverage/reports/lcov.info', | ||
force: false | ||
}, | ||
default: { | ||
src: 'test/coverage/reports/lcov.info' | ||
} | ||
} | ||
}); | ||
|
||
require('load-grunt-tasks')(grunt); | ||
|
||
grunt.registerTask('verify', [ | ||
'jsonlint', | ||
'jshint', | ||
'jscs' | ||
]); | ||
|
||
grunt.registerTask('test', [ | ||
'clean:coverage', | ||
'instrument', | ||
'mochaTest', | ||
'storeCoverage', | ||
'makeReport' | ||
]); | ||
|
||
grunt.registerTask('ci', [ | ||
'verify', | ||
'test', | ||
'coveralls' | ||
]); | ||
} | ||
|
||
module.exports = GruntTasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
node-cerberus | ||
============= | ||
<h1 align="center">Node Cerberus</h1> | ||
|
||
Cerberus aka. Fluffy, is a fuzzing library for arguments of Node.js core modules. | ||
<p align="center">Cerberus aka. Fluffy, is a fuzzing library for arguments of Node.js core modules.</p> | ||
|
||
<p align="center"> | ||
<a title="Build Status" href="https://travis-ci.org/Mickael-van-der-Beek/node-cerberus"> | ||
<img src="https://secure.travis-ci.org/Mickael-van-der-Beek/node-cerberus.svg?branch=master" /> | ||
</a> | ||
<a title="Coverage Status" href="https://coveralls.io/r/Mickael-van-der-Beek/node-cerberus"> | ||
<img src="https://coveralls.io/repos/Mickael-van-der-Beek/node-cerberus/badge.png" alt="Coverage Status" /> | ||
</a> | ||
<a title="Dependency status" href="https://david-dm.org/Mickael-van-der-Beek/node-cerberus#info=dependencies&view=table"> | ||
<img src="https://david-dm.org/Mickael-van-der-Beek/node-cerberus/status.png" alt="Dependency status" /> | ||
</a> | ||
<a title="Dev Dependency status" href="https://david-dm.org/Mickael-van-der-Beek/node-cerberus#info=devDependencies&view=table"> | ||
<img src="https://david-dm.org/Mickael-van-der-Beek/node-cerberus/dev-status.png" alt="Dev Dependency status" /> | ||
</a> | ||
<a title="Peer Dependency status" href="https://david-dm.org/Mickael-van-der-Beek/node-cerberus#info=peerDependencies&view=table"> | ||
<img src="https://david-dm.org/Mickael-van-der-Beek/node-cerberus/peer-status.png" alt="Peer Dependency status" /> | ||
</a> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "node-cerberus", | ||
"private": false, | ||
"version": "0.0.1", | ||
"description": "Cerberus aka. Fluffy, is a validation and fuzzing library for arguments of Node.js core modules.", | ||
"main": "src/cerberus.js", | ||
"scripts": { | ||
"test": "grunt ci" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"mocha": "^1.21.4", | ||
"grunt-cli": "^0.1.13", | ||
"load-grunt-tasks": "^0.6.0", | ||
"grunt-contrib-jshint": "^0.10.0", | ||
"grunt-contrib-clean": "^0.6.0", | ||
"grunt-mocha-test": "^0.11.0", | ||
"grunt-coveralls": "^1.0.0", | ||
"grunt-istanbul": "^0.2.4", | ||
"grunt-jsonlint": "^1.0.4", | ||
"grunt-jscs": "^0.6.1" | ||
}, | ||
"peerDependencies": { | ||
"grunt": "^0.4.5" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Mickael-van-der-Beek/node-cerberus" | ||
}, | ||
"author": "Mickael van der Beek (https://github.com/Mickael-van-der-Beek)", | ||
"bugs": { | ||
"url": "https://github.com/Mickael-van-der-Beek/node-cerberus/issues" | ||
}, | ||
"homepage": "https://github.com/Mickael-van-der-Beek/node-cerberus" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = (function () { | ||
'use strict'; | ||
|
||
function Cerberus () {} | ||
|
||
Cerberus.prototype.init = function (config) { | ||
|
||
config = config || {}; | ||
|
||
}; | ||
|
||
return Cerberus; | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var crypto = require('crypto'); | ||
|
||
module.exports = { | ||
|
||
createCipher: { | ||
input: [{ | ||
name: 'algorithm', | ||
type: 'String' | ||
}, { | ||
name: 'password', | ||
type: ['String', 'Buffer'] | ||
}], | ||
output: [{ | ||
type: crypto.Cipher | ||
}] | ||
} | ||
|
||
}; |
Oops, something went wrong.