Skip to content

Commit dc81294

Browse files
committed
Added code coverage
1 parent 3a0386c commit dc81294

File tree

5 files changed

+81
-15
lines changed

5 files changed

+81
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ node_modules
2929

3030
.idea/
3131
*.iml
32+
coverage/

.npmignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# Compiled binary addons (http://nodejs.org/api/addons.html)
20+
build/Release
21+
22+
# Dependency directory
23+
# Commenting this out is preferred by some people, see
24+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25+
node_modules
26+
27+
# Users Environment Variables
28+
.lock-wscript
29+
30+
.idea/
31+
*.iml
32+
coverage/
33+
src/
34+
test/
35+
mocha.start.js
36+
webpack.config.js

README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<img src="https://raw.githubusercontent.com/js-data/js-data/master/js-data.png" alt="js-data logo" title="js-data" align="right" width="64" height="64" />
22

3-
## 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)
3+
## 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]
44

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

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

1010
### Quick Start
11-
`npm install --save js-data js-data-sql`.
11+
`npm install --save knex js-data js-data-sql`.
1212

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

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

4141
### Community
42-
- [Gitter Channel](https://gitter.im/js-data/js-data) - Better than IRC!
42+
- [Slack Channel](http://slack.js-data.io) - Better than IRC!
4343
- [Announcements](http://www.js-data.io/blog)
4444
- [Mailing List](https://groups.io/org/groupsio/jsdata) - Ask your questions!
4545
- [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
4848

4949
### Contributing
5050

51-
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.
51+
First, support is handled via the [Slack Channel](http://slack.js-data.io) and
52+
the [Mailing List](https://groups.io/org/groupsio/jsdata). Ask your questions
53+
there.
5254

53-
When submitting issues on GitHub, please include as much detail as possible to make debugging quick and easy.
55+
When submitting issues on GitHub, please include as much detail as possible to
56+
make debugging quick and easy.
5457

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

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

6167
#### Submitting Pull Requests
6268

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

@@ -109,3 +117,16 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
109117
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
110118
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
111119
SOFTWARE.
120+
121+
[sl_b]: http://slack.js-data.io/badge.svg
122+
[sl_l]: http://slack.js-data.io
123+
[npm_b]: https://img.shields.io/npm/v/js-data-sql.svg?style=flat
124+
[npm_l]: https://www.npmjs.org/package/js-data-sql
125+
[circle_b]: https://img.shields.io/circleci/project/js-data/js-data-sql/master.svg?style=flat
126+
[circle_l]: https://circleci.com/gh/js-data/js-data-sql/tree/master
127+
[dn_b]: https://img.shields.io/npm/dm/js-data-sql.svg?style=flat
128+
[dn_l]: https://www.npmjs.org/package/js-data-sql
129+
[cov_b]: https://img.shields.io/coveralls/js-data/js-data-sql/master.svg?style=flat
130+
[cov_l]: https://coveralls.io/github/js-data/js-data-sql?branch=master
131+
[cod_b]: https://img.shields.io/codacy/307c2e9399394fdaa5354cda7329516d.svg
132+
[cod_l]: https://www.codacy.com/app/jasondobry/js-data-sql/dashboard

circle.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ machine:
55
database:
66
override:
77
- mysql -u ubuntu circle_test < test/setup.sql
8+
test:
9+
override:
10+
- npm run ci

package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,22 @@
3131
"babel-loader": "5.3.2",
3232
"bluebird": "2.10.2",
3333
"chai": "3.3.0",
34-
"co": "^4.6.0",
34+
"co": "4.6.0",
3535
"co-mocha": "1.1.2",
36+
"codacy-coverage": "1.1.3",
37+
"coveralls": "2.11.4",
38+
"istanbul": "0.4.0",
3639
"mocha": "2.3.3",
3740
"standard": "5.3.1",
3841
"webpack": "1.12.2"
3942
},
4043
"scripts": {
41-
"lint": "node_modules/standard/bin/cmd.js src/index.js",
42-
"build": "node_modules/webpack/bin/webpack.js --config webpack.config.js --progress --colors",
43-
"mocha": "mocha --timeout 20000 --reporter spec mocha.start.js test/*.spec.js",
44-
"test": "npm run lint && npm run build && npm run mocha"
44+
"lint": "standard src/index.js",
45+
"build": "webpack --config webpack.config.js --progress --colors",
46+
"mocha": "mocha --timeout 20000 --reporter dot mocha.start.js test/*.spec.js",
47+
"cover": "istanbul cover --hook-run-in-context node_modules/mocha/bin/_mocha -- --timeout 20000 --reporter dot mocha.start.js test/*.spec.js",
48+
"test": "npm run lint && npm run build && npm run cover",
49+
"ci": "npm run test && cat coverage/lcov.info | coveralls || true && cat ./coverage/lcov.info | codacy-coverage || true"
4550
},
4651
"standard": {
4752
"parser": "babel-eslint"

0 commit comments

Comments
 (0)