diff --git a/.gitignore b/.gitignore index ab1961f..f048cf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -build build/* coverage coverage/* diff --git a/.istanbul.yml b/.istanbul.yml new file mode 100644 index 0000000..20395ce --- /dev/null +++ b/.istanbul.yml @@ -0,0 +1,9 @@ +reporting: + reports: + - lcov + - clover + - text-summary + - lcovonly + report-config: + clover: {file: ../build/clover.xml} + lcovonly: {file: ../build/lcov.info} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index a995a7d..d3c5cf1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,16 +4,14 @@ module.exports = function(grunt) { // Project configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), - /*jsdoc: { + jsdoc: { dist: { src: ['lib/*.js', 'README.md'], options: { - template: 'node_modules/grunt-jsdoc/node_modules/ink-docstrap/template', - configure: 'node_modules/grunt-jsdoc/node_modules/ink-docstrap/template/jsdoc.conf.json', destination: 'docs' } } - },*/ + }, nodeunit: { all: ['tests/**/*_test.js'], options: { @@ -22,12 +20,11 @@ module.exports = function(grunt) { } }); - //grunt.loadNpmTasks('grunt-jsdoc'); + grunt.loadNpmTasks('grunt-jsdoc'); grunt.loadNpmTasks('grunt-contrib-nodeunit'); - //grunt.registerTask('default', ['nodeunit','jsdoc']); - grunt.registerTask('default', 'nodeunit'); + grunt.registerTask('default', ['nodeunit','jsdoc']); grunt.registerTask('tests', 'nodeunit'); - //grunt.registerTask('docs', 'jsdoc'); + grunt.registerTask('docs', 'jsdoc'); }; \ No newline at end of file diff --git a/package.json b/package.json index 192fd14..dc3bd26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ci-node-query", - "version": "2.1.0", + "version": "2.2.0", "description": "A query builder for node based on the one in CodeIgniter", "author": "Timothy J Warren ", "engines": { @@ -36,7 +36,6 @@ "es6-shim": "*", "getargs": "", "grunt-istanbul": "*", - "jsdoc": "*", "mysql": "^2.9.0", "mysql2": "^0.15.8", "node-firebird": "^0.7.0", @@ -48,12 +47,12 @@ "pg": "*" }, "devDependencies": { - "nodeunit": "^0.9.0", + "nodeunit": "", "grunt": "", "grunt-cli": "", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-nodeunit": "^0.4.1", - "grunt-istanbul": "^0.4.0", + "grunt-istanbul": "", "grunt-jsdoc": ">=0.6.1", "jsdoc": "" }, diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..85bb4bd --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=node-query +sonar.projectName=NodeJS Query Builder +sonar.projectVersion=1.0 +sonar.sources=lib +sonar.javascript.lcov.reportPath=build/lcov.info \ No newline at end of file diff --git a/tests/adapters/pg_test.js b/tests/adapters/pg_test.js index a817993..2af084a 100644 --- a/tests/adapters/pg_test.js +++ b/tests/adapters/pg_test.js @@ -27,7 +27,7 @@ var qb = nodeQuery.init('pg', connection); // Set up the test base testBase._setUp(qb, function(test, err, result) { - if (err != null) { + if (err) { console.error('SQL syntax error', err); }