From e38a0c0b485de15f9615713a9b47950ae225cdef Mon Sep 17 00:00:00 2001 From: SuperPaintman Date: Tue, 26 Jan 2016 13:56:23 +0500 Subject: [PATCH 1/7] Added badges into README.md --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ba7ee915..1568153f 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,12 @@ Stores language files in json files compatible to [webtranslateit](http://webtra Adds new strings on-the-fly when first used in your app. No extra parsing needed. -[![Build Status](https://api.travis-ci.org/mashpie/i18n-node.svg?branch=master)](http://travis-ci.org/mashpie/i18n-node) [![NPM version](https://badge.fury.io/js/i18n.svg)](http://badge.fury.io/js/i18n) -[![Dependency Status](https://gemnasium.com/mashpie/i18n-node.png)](https://gemnasium.com/mashpie/i18n-node) +[![Linux Build][travis-image]][travis-url] +[![Windows Build][appveyor-image]][appveyor-url] +[![NPM version][npm-v-image]][npm-url] +[![Dependency Status][dependency-image]][dependency-url] +[![Test Coverage][coveralls-image]][coveralls-url] + ## Install ```sh @@ -570,3 +574,15 @@ 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. + +[npm-url]: https://www.npmjs.com/package/i18n +[npm-v-image]: https://img.shields.io/npm/v/i18n.svg +[npm-dm-image]: https://img.shields.io/npm/dm/i18n.svg +[travis-image]: https://img.shields.io/travis/SuperPaintman/i18n-node/master.svg?label=linux +[travis-url]: https://travis-ci.org/SuperPaintman/i18n-node +[appveyor-image]: https://img.shields.io/appveyor/ci/SuperPaintman/i18n-node/master.svg?label=windows +[appveyor-url]: https://ci.appveyor.com/project/SuperPaintman/i18n-node +[coveralls-image]: https://img.shields.io/coveralls/SuperPaintman/i18n-node/master.svg +[coveralls-url]: https://coveralls.io/r/SuperPaintman/i18n-node?branch=master +[dependency-image]: https://gemnasium.com/mashpie/i18n-node.png +[dependency-utl]: https://gemnasium.com/mashpie/i18n-node From 041014f61109a5ae64acf0dd1e93021ac288aa35 Mon Sep 17 00:00:00 2001 From: SuperPaintman Date: Tue, 26 Jan 2016 13:57:59 +0500 Subject: [PATCH 2/7] Fixed README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1568153f..f320c5b9 100644 --- a/README.md +++ b/README.md @@ -585,4 +585,4 @@ SOFTWARE. [coveralls-image]: https://img.shields.io/coveralls/SuperPaintman/i18n-node/master.svg [coveralls-url]: https://coveralls.io/r/SuperPaintman/i18n-node?branch=master [dependency-image]: https://gemnasium.com/mashpie/i18n-node.png -[dependency-utl]: https://gemnasium.com/mashpie/i18n-node +[dependency-url]: https://gemnasium.com/mashpie/i18n-node From 5a1b4d3112d4b237d1126bd2eb52b8d003c6641d Mon Sep 17 00:00:00 2001 From: SuperPaintman Date: Tue, 26 Jan 2016 14:08:10 +0500 Subject: [PATCH 3/7] Added coveralls test --- .gitignore | 1 + .jshintignore | 3 ++- .travis.yml | 13 ++++++++++++- Makefile | 12 ++++++------ package.json | 3 ++- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 23c99054..1ceadfe4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules/ testlocales/ +coverage/ .DS_Store /npm-debug.log diff --git a/.jshintignore b/.jshintignore index 40b878db..642271f5 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1 +1,2 @@ -node_modules/ \ No newline at end of file +node_modules/ +coverage/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index ae26b8cc..535dc9b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,18 @@ language: node_js node_js: - 0.10 + - 0.12 + - 4 + - 5 + - iojs branches: only: - master - - stable \ No newline at end of file + - stable +before_install: + - "npm install -g istanbul" +script: + - "npm run test-ci" +after_script: + - "npm install -g coveralls" + - "cat ./coverage/lcov.info | coveralls" \ No newline at end of file diff --git a/Makefile b/Makefile index c7bb651e..6d21ac86 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,18 @@ REPORTER = spec test: - mocha --reporter $(REPORTER) + mocha --reporter $(REPORTER) coverage: lib-cov - @EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html + @EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html lib-cov: - @jscoverage i18n.js i18n-cov.js + @jscoverage i18n.js i18n-cov.js examples: - for example in examples/*/test.js ; do \ - mocha --reporter $(REPORTER) $$example; \ - done + for example in examples/*/test.js ; do \ + mocha --reporter $(REPORTER) $$example; \ + done all: test examples diff --git a/package.json b/package.json index aecc3cae..b0fd7477 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ }, "scripts": { "jshint": "jshint --verbose .", - "test": "npm run jshint && make test" + "test": "npm run jshint && make test", + "test-ci": "npm run jshint && istanbul cover ./node_modules/mocha/bin/_mocha" } } From 102fb8d375a0b18247c8b9ef7425c2f5dfe114f9 Mon Sep 17 00:00:00 2001 From: SuperPaintman Date: Tue, 26 Jan 2016 14:11:03 +0500 Subject: [PATCH 4/7] Added appveyor test --- appveyor.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..6e74f8a6 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,17 @@ +environment: + matrix: + - nodejs_version: "0.10" + - nodejs_version: "0.12" + - nodejs_version: "4" + - nodejs_version: "5" + - nodejs_version: "iojs" +branches: + only: + - master + - stable +install: + - "npm install -g istanbul" +build: off +test_script: + - "npm run test-ci" +version: "{build}" \ No newline at end of file From b2d80ed41f91814b45c0c7f963f813a2051be776 Mon Sep 17 00:00:00 2001 From: SuperPaintman Date: Tue, 26 Jan 2016 14:13:56 +0500 Subject: [PATCH 5/7] Fixed gemnasium badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f320c5b9..4a5b6f70 100644 --- a/README.md +++ b/README.md @@ -584,5 +584,5 @@ SOFTWARE. [appveyor-url]: https://ci.appveyor.com/project/SuperPaintman/i18n-node [coveralls-image]: https://img.shields.io/coveralls/SuperPaintman/i18n-node/master.svg [coveralls-url]: https://coveralls.io/r/SuperPaintman/i18n-node?branch=master -[dependency-image]: https://gemnasium.com/mashpie/i18n-node.png +[dependency-image]: https://img.shields.io/gemnasium/mashpie/i18n-node.svg [dependency-url]: https://gemnasium.com/mashpie/i18n-node From 9729e75ca1d7e1b847a4139918d409223104b450 Mon Sep 17 00:00:00 2001 From: SuperPaintman Date: Tue, 26 Jan 2016 14:23:01 +0500 Subject: [PATCH 6/7] Fixed appveyor test --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 6e74f8a6..32cb88ea 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,7 @@ branches: - master - stable install: + - "npm install -g jshint" - "npm install -g istanbul" build: off test_script: From 0c9164a73deada20774eb6421e82aa9692899c6e Mon Sep 17 00:00:00 2001 From: SuperPaintman Date: Tue, 26 Jan 2016 14:31:37 +0500 Subject: [PATCH 7/7] Fixed appveyor test --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 32cb88ea..1fc97dc0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,6 +12,7 @@ branches: install: - "npm install -g jshint" - "npm install -g istanbul" + - "npm install" build: off test_script: - "npm run test-ci"