Skip to content

Added code coverage #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -29,3 +29,4 @@ node_modules

.idea/
*.iml
coverage/
36 changes: 36 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# Users Environment Variables
.lock-wscript

.idea/
*.iml
coverage/
src/
test/
mocha.start.js
webpack.config.js
41 changes: 31 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<img src="https://github.com/raw/js-data/js-data/master/js-data.png" alt="js-data logo" title="js-data" align="right" width="64" height="64" />

## js-data-sql [![npm version](https://img.shields.io/npm/v/js-data-sql.svg?style=flat-square)](https://www.npmjs.org/package/js-data-sql) [![Circle CI](https://img.shields.io/circleci/project/js-data/js-data-sql/master.svg?style=flat-square)](https://circleci.com/gh/js-data/js-data-sql/tree/master) [![npm downloads](https://img.shields.io/npm/dm/js-data-sql.svg?style=flat-square)](https://www.npmjs.org/package/js-data-sql)
## js-data-sql [![Slack Status][sl_b]][sl_l] [![npm version][npm_b]][npm_l] [![Circle CI][circle_b]][circle_l] [![npm downloads][dn_b]][dn_l] [![Coverage Status][cov_b]][cov_l] [![Codacy][cod_b]][cod_l]

Postgres/MySQL/MariaDB/SQLite3 adapter for [js-data](http://www.js-data.io/).

### API Documentation
[DSSqlAdapter](http://www.js-data.io/docs/dssqladapter)

### Quick Start
`npm install --save js-data js-data-sql`.
`npm install --save knex js-data js-data-sql`.

You also need to install the driver for the database you want to connect to.

@@ -39,7 +39,7 @@ Read about using [JSData on the Server](http://www.js-data.io/docs/jsdata-on-the
[CHANGELOG.md](https://github.com/js-data/js-data-sql/blob/master/CHANGELOG.md)

### Community
- [Gitter Channel](https://gitter.im/js-data/js-data) - Better than IRC!
- [Slack Channel](http://slack.js-data.io) - Better than IRC!
- [Announcements](http://www.js-data.io/blog)
- [Mailing List](https://groups.io/org/groupsio/jsdata) - Ask your questions!
- [Issues](https://github.com/js-data/js-data-sql/issues) - Found a bug? Feature request? Submit an issue!
@@ -48,27 +48,35 @@ Read about using [JSData on the Server](http://www.js-data.io/docs/jsdata-on-the

### Contributing

First, support is handled via the [Gitter Channel](https://gitter.im/js-data/js-data) and the [Mailing List](https://groups.io/org/groupsio/jsdata). Ask your questions there.
First, support is handled via the [Slack Channel](http://slack.js-data.io) and
the [Mailing List](https://groups.io/org/groupsio/jsdata). Ask your questions
there.

When submitting issues on GitHub, please include as much detail as possible to make debugging quick and easy.
When submitting issues on GitHub, please include as much detail as possible to
make debugging quick and easy.

- good - Your versions of js-data, js-data-sql, etc., relevant console logs/error, code examples that revealed the issue
- better - A [plnkr](http://plnkr.co/), [fiddle](http://jsfiddle.net/), or [bin](http://jsbin.com/?html,output) that demonstrates the issue
- best - A Pull Request that fixes the issue, including test coverage for the issue and the fix
- good - Your versions of js-data, js-data-sql, etc., relevant console
logs/error, code examples that revealed the issue
- better - A [plnkr](http://plnkr.co/), [fiddle](http://jsfiddle.net/), or
[bin](http://jsbin.com/?html,output) that demonstrates the issue
- best - A Pull Request that fixes the issue, including test coverage for the
issue and the fix

[Github Issues](https://github.com/js-data/js-data-sql/issues).

#### Submitting Pull Requests

1. Contribute to the issue/discussion that is the reason you'll be developing in the first place
1. Contribute to the issue/discussion that is the reason you'll be developing in
the first place
1. Fork js-data-sql
1. `git clone [email protected]:<you>/js-data-sql.git`
1. `cd js-data-sql; npm install;`
1. Write your code, including relevant documentation and tests
1. Run `npm test` (build and test)
- You need io.js or Node 4.x that includes generator support without a flag
1. Your code will be linted and checked for formatting, the tests will be run
1. The `dist/` folder & files will be generated, do NOT commit `dist/*`! They will be committed when a release is cut.
1. The `dist/` folder & files will be generated, do NOT commit `dist/*`! They
will be committed when a release is cut.
1. Submit your PR and we'll review!
1. Thanks!

@@ -109,3 +117,16 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

[sl_b]: http://slack.js-data.io/badge.svg
[sl_l]: http://slack.js-data.io
[npm_b]: https://img.shields.io/npm/v/js-data-sql.svg?style=flat
[npm_l]: https://www.npmjs.org/package/js-data-sql
[circle_b]: https://img.shields.io/circleci/project/js-data/js-data-sql/master.svg?style=flat
[circle_l]: https://circleci.com/gh/js-data/js-data-sql/tree/master
[dn_b]: https://img.shields.io/npm/dm/js-data-sql.svg?style=flat
[dn_l]: https://www.npmjs.org/package/js-data-sql
[cov_b]: https://img.shields.io/coveralls/js-data/js-data-sql/master.svg?style=flat
[cov_l]: https://coveralls.io/github/js-data/js-data-sql?branch=master
[cod_b]: https://img.shields.io/codacy/307c2e9399394fdaa5354cda7329516d.svg
[cod_l]: https://www.codacy.com/app/jasondobry/js-data-sql/dashboard
3 changes: 3 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -5,3 +5,6 @@ machine:
database:
override:
- mysql -u ubuntu circle_test < test/setup.sql
test:
override:
- npm run ci
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -31,17 +31,22 @@
"babel-loader": "5.3.2",
"bluebird": "2.10.2",
"chai": "3.3.0",
"co": "^4.6.0",
"co": "4.6.0",
"co-mocha": "1.1.2",
"codacy-coverage": "1.1.3",
"coveralls": "2.11.4",
"istanbul": "0.4.0",
"mocha": "2.3.3",
"standard": "5.3.1",
"webpack": "1.12.2"
},
"scripts": {
"lint": "node_modules/standard/bin/cmd.js src/index.js",
"build": "node_modules/webpack/bin/webpack.js --config webpack.config.js --progress --colors",
"mocha": "mocha --timeout 20000 --reporter spec mocha.start.js test/*.spec.js",
"test": "npm run lint && npm run build && npm run mocha"
"lint": "standard src/index.js",
"build": "webpack --config webpack.config.js --progress --colors",
"mocha": "mocha --timeout 20000 --reporter dot mocha.start.js test/*.spec.js",
"cover": "istanbul cover --hook-run-in-context node_modules/mocha/bin/_mocha -- --timeout 20000 --reporter dot mocha.start.js test/*.spec.js",
"test": "npm run lint && npm run build && npm run cover",
"ci": "npm run test && cat coverage/lcov.info | coveralls || true && cat ./coverage/lcov.info | codacy-coverage || true"
},
"standard": {
"parser": "babel-eslint"