Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 3e4f3ec

Browse files
author
Rodrigo Fernandes
committed
Merge pull request #2 from codacy/switch-name
Update Package Name
2 parents 2483511 + 27ad974 commit 3e4f3ec

File tree

5 files changed

+31
-34
lines changed

5 files changed

+31
-34
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ node_js:
66
matrix:
77
fast_finish: true
88
script: npm test
9-
after_script: chmod +x ./bin/codacy.js && cat ./coverage/lcov.info | node ./bin/codacy.js
9+
after_script: chmod +x ./bin/codacy-coverage.js && cat ./coverage/lcov.info | node ./bin/codacy-coverage.js

README.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
# Codacy [DEPRECATED]
2-
3-
Renamed to [codacy-coverage](https://www.npmjs.com/package/codacy-coverage)
4-
1+
# Codacy Coverage Reporter
52
[Codacy](https://codacy.com/) support for Node.js. Get coverage reporting and code analysis for Node.js from Codacy.
63

7-
[![Build Status](https://travis-ci.org/codacy/node-codacy-reporter.svg?branch=1.0.0)](https://travis-ci.org/codacy/node-codacy-reporter)
8-
[![npm](https://img.shields.io/npm/v/codacy.svg)](https://www.npmjs.com/package/codacy)
9-
[![npm](https://img.shields.io/npm/dm/codacy.svg)](https://www.npmjs.com/package/codacy)
10-
[![Codacy](https://www.codacy.com/project/badge/d1bfdf020cc044bb8a2020d009378733)](https://www.codacy.com/public/davidtpate/codacy)
11-
[![David](https://img.shields.io/david/codacy/node-codacy-reporter.svg)](https://david-dm.org/codacy/node-codacy-reporter)
12-
[![David](https://img.shields.io/david/dev/codacy/node-codacy-reporter.svg)](https://david-dm.org/codacy/node-codacy-reporter)
13-
[![David](https://img.shields.io/david/peer/codacy/node-codacy-reporter.svg)](https://david-dm.org/codacy/node-codacy-reporter)
4+
[![Build Status](https://travis-ci.org/codacy/node-codacy-coverage.svg?branch=1.0.0)](https://travis-ci.org/codacy/node-codacy-coverage)
5+
[![npm](https://img.shields.io/npm/v/codacy-coverage.svg)](https://www.npmjs.com/package/codacy-coverage)
6+
[![npm](https://img.shields.io/npm/dm/codacy-coverage.svg)](https://www.npmjs.com/package/codacy-coverage)
7+
[![Codacy](https://www.codacy.com/project/badge/3c7f5de6ce734762981d3e689de7b941)](https://www.codacy.com/public/codacy/node-codacy-coverage)
8+
[![David](https://img.shields.io/david/codacy/node-codacy-coverage.svg)](https://david-dm.org/codacy/node-codacy-coverage)
9+
[![David](https://img.shields.io/david/dev/codacy/node-codacy-coverage.svg)](https://david-dm.org/codacy/node-codacy-coverage)
10+
[![David](https://img.shields.io/david/peer/codacy/node-codacy-coverage.svg)](https://david-dm.org/codacy/node-codacy-coverage)
1411

1512
##Installation:
16-
Add the latest version of `codacy` to your package.json:
13+
Add the latest version of `codacy-coverage` to your package.json:
1714
```
18-
npm install codacy --save
15+
npm install codacy-coverage --save
1916
```
2017

2118
If you're using mocha, add `mocha-lcov-reporter` to your package.json:
@@ -25,9 +22,9 @@ npm install mocha-lcov-reporter --save
2522

2623
##Usage:
2724

28-
This script ( `bin/codacy.js` ) can take standard input from any tool that emits the lcov data format (including [mocha](http://visionmedia.github.com/mocha/)'s [LCov reporter](https://npmjs.org/package/mocha-lcov-reporter)) and send it to Codacy to report your code coverage there.
25+
This script ( `bin/codacy-coverage.js` ) can take standard input from any tool that emits the lcov data format (including [mocha](http://visionmedia.github.com/mocha/)'s [LCov reporter](https://npmjs.org/package/mocha-lcov-reporter)) and send it to Codacy to report your code coverage there.
2926

30-
Once your app is instrumented for coverage, and building, you need to pipe the lcov output to `./node_modules/codacy/bin/codacy.js`.
27+
Once your app is instrumented for coverage, and building, you need to pipe the lcov output to `./node_modules/codacy-coverage/bin/codacy-coverage.js`.
3128

3229
You'll need to provide the Report token from Codacy via an environment variable:
3330
* CODACY_REPO_TOKEN (the secret repo token from Codacy.com)
@@ -40,28 +37,28 @@ You'll need to provide the Report token from Codacy via an environment variable:
4037
```sh
4138
NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha \
4239
--require blanket \
43-
--reporter mocha-lcov-reporter | ./node_modules/codacy/bin/codacy.js
40+
--reporter mocha-lcov-reporter | ./node_modules/codacy-coverage/bin/codacy-coverage.js
4441
```
4542
### [Mocha](http://visionmedia.github.io/mocha/) + [JSCoverage](https://github.com/fishbar/jscoverage)
4643

4744
Instrumenting your app for coverage is probably harder than it needs to be (read [here](http://www.seejohncode.com/2012/03/13/setting-up-mocha-jscoverage/)), but that's also a necessary step.
4845

4946
In mocha, if you've got your code instrumented for coverage, the command for a travis build would look something like this:
5047
```sh
51-
YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha test -R mocha-lcov-reporter | ./node_modules/codacy/bin/codacy.js
48+
YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha test -R mocha-lcov-reporter | ./node_modules/codacy-coverage/bin/codacy-coverage.js
5249
```
5350
### [Istanbul](https://github.com/gotwarlost/istanbul)
5451

5552
**With Mocha:**
5653

5754
```sh
58-
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/codacy/bin/codacy.js && rm -rf ./coverage
55+
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/codacy-coverage/bin/codacy-coverage.js && rm -rf ./coverage
5956
```
6057

6158
**With Jasmine:**
6259

6360
```sh
64-
istanbul cover jasmine-node --captureExceptions spec/ && cat ./coverage/lcov.info | ./node_modules/codacy/bin/codacy.js && rm -rf ./coverage
61+
istanbul cover jasmine-node --captureExceptions spec/ && cat ./coverage/lcov.info | ./node_modules/codacy-coverage/bin/codacy-coverage.js && rm -rf ./coverage
6562
```
6663

6764
### [Poncho](https://github.com/deepsweet/poncho)
@@ -71,7 +68,7 @@ Client-side JS code coverage using [PhantomJS](https://github.com/ariya/phantomj
7168
- Run your tests with a command like this:
7269

7370
```sh
74-
./node_modules/.bin/poncho -R lcov test/test.html | ./node_modules/codacy/bin/codacy.js
71+
./node_modules/.bin/poncho -R lcov test/test.html | ./node_modules/codacy-coverage/bin/codacy-coverage.js
7572
```
7673

7774
## License

bin/codacy.js renamed to bin/codacy-coverage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@
6464
});
6565
});
6666

67-
}(require('commander'), require('../lib/logger'), require('util'), require('../index'), require('../lib/getGitData'), require('q')));
67+
}(require('commander'), require('../lib/logger'), require('util'), require('../index'), require('../lib/getGitData'), require('q')));

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"name": "codacy",
3-
"version": "1.0.1-1",
4-
"description": "Code Coverage reporter for Codacy.com [DEPRECATED]",
2+
"name": "codacy-coverage",
3+
"version": "1.0.3",
4+
"description": "Code Coverage reporter for Codacy.com",
55
"keywords": [
66
"codacy",
77
"coverage",
88
"code coverage",
99
"codacy.com"
1010
],
11-
"homepage": "http://github.com/DavidTPate/codacy",
11+
"homepage": "https://github.com/codacy/node-codacy-coverage",
1212
"repository": {
1313
"type": "git",
14-
"url": "git://github.com/DavidTPate/codacy.git"
14+
"url": "git://github.com/codacy/node-codacy-coverage.git"
1515
},
1616
"bugs": {
17-
"url": "http://github.com/DavidTPate/codacy/issues"
17+
"url": "https://github.com/codacy/node-codacy-coverage/issues"
1818
},
1919
"author": {
2020
"name": "David Pate",
@@ -30,7 +30,7 @@
3030
],
3131
"main": "index.js",
3232
"bin": {
33-
"codacy": "./bin/codacy.js"
33+
"codacy-coverage": "./bin/codacy-coverage.js"
3434
},
3535
"dependencies": {
3636
"commander": "^2.x",

test/cli.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
describe('Command Line', function () {
1010
it('should be able to get help with `-h`', function (done) {
11-
exec('node ./bin/codacy.js -h', function (err, res) {
11+
exec('node ./bin/codacy-coverage.js -h', function (err, res) {
1212
expect(res).to.equal('\n' +
13-
' Usage: codacy [options]\n\n' +
13+
' Usage: codacy-coverage [options]\n\n' +
1414
' Options:\n\n' +
1515
' -h, --help output usage information\n' +
1616
' -V, --version output the version number\n' +
@@ -25,9 +25,9 @@
2525
});
2626
});
2727
it('should be able to get help with `-help`', function (done) {
28-
exec('node ./bin/codacy.js -help', function (err, res) {
28+
exec('node ./bin/codacy-coverage.js -help', function (err, res) {
2929
expect(res).to.equal('\n' +
30-
' Usage: codacy [options]\n\n' +
30+
' Usage: codacy-coverage [options]\n\n' +
3131
' Options:\n\n' +
3232
' -h, --help output usage information\n' +
3333
' -V, --version output the version number\n' +
@@ -81,7 +81,7 @@
8181
};
8282

8383
helper.setupMockEndpoint('1234', '4321', Joi.compile(bodyObject)).then(function () {
84-
exec('cat ./test/mock/lcov.info | node ./bin/codacy.js --token 1234 --commit 4321', function (err, res) {
84+
exec('cat ./test/mock/lcov.info | node ./bin/codacy-coverage.js --token 1234 --commit 4321', function (err, res) {
8585
if (err) {
8686
return done(err);
8787
}

0 commit comments

Comments
 (0)