diff --git a/.gitignore b/.gitignore index b112eb2..b617f51 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ node_modules _SpecRunner.html Gruntfile.js .grunt -test/test.js \ No newline at end of file +test/test.js +reports \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 457a5e8..ae60cd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,9 @@ node_js: before_install: - npm install -g bower - npm install -g grunt-cli - - bower install \ No newline at end of file + - bower install +before_script: + - npm test + - grunt coverage +script: + - grunt coveralls \ No newline at end of file diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 584f619..a7a4ea3 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -4,13 +4,15 @@ module.exports = (grunt) -> 'grunt-contrib-coffee' 'grunt-contrib-jasmine' 'grunt-contrib-watch' + 'grunt-coveralls' 'grunt-ngmin' ] .forEach grunt.loadNpmTasks # task sets build = ['ngmin'] - test = ['coffee', 'jasmine'] + test = ['coffee', 'jasmine:unit'] + coverage = ['coffee', 'jasmine:coverage'] # task defs grunt.initConfig @@ -21,8 +23,40 @@ module.exports = (grunt) -> files: 'test/test.js': 'test/test.coffee' + coveralls: + options: + force: true + main: + src: 'reports/lcov/lcov.info' + jasmine: - test: + coverage: + src: [ + './src/<%= pkg.name %>.js' + ] + options: + specs: ['./test/test.js'] + template: require 'grunt-template-jasmine-istanbul' + templateOptions: + coverage: 'reports/lcov/lcov.json' + report: [ + { + type: 'html' + options: + dir: 'reports/html' + } + { + type: 'lcov' + options: + dir: 'reports/lcov' + } + ] + type: 'lcovonly' + vendor: [ + './bower_components/angular/angular.js' + './bower_components/angular-mocks/angular-mocks.js' + ] + unit: src: './src/<%= pkg.name %>.js' options: specs: './test/test.js' @@ -52,4 +86,5 @@ module.exports = (grunt) -> spawn: false grunt.registerTask 'default', build - grunt.registerTask 'test', test \ No newline at end of file + grunt.registerTask 'test', test + grunt.registerTask 'coverage', coverage \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index f7f2c2a..3c0af26 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -176,18 +176,7 @@ END OF TERMS AND CONDITIONS - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Turn Inc. + Copyright 2014 Boris Cherny. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index f28940e..399cdb1 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -angular-lock-column-widths [![Build Status](https://travis-ci.org/turn/angular-lock-column-widths.svg?branch=master)](https://travis-ci.org/turn/angular-lock-column-widths) -========================== +# angular-lock-column-widths [![Build Status](https://travis-ci.org/bcherny/angular-lock-column-widths.svg?branch=master)](https://travis-ci.org/bcherny/angular-lock-column-widths) [![Coverage Status](https://img.shields.io/coveralls/bcherny/angular-lock-column-widths.svg)](https://coveralls.io/r/bcherny/angular-lock-column-widths) lock and unlock table column widths, to prevent resizing ## install -`bower install -S angular-lock-column-widths` +`bower install -S git@github.com:bcherny/angular-lock-column-widths.git` ## use diff --git a/bower.json b/bower.json index 394a46c..9763ca3 100644 --- a/bower.json +++ b/bower.json @@ -20,7 +20,7 @@ "stuck" ], "authors": [ - "Boris Cherny " + "Boris Cherny " ], "license": "Apache2", "ignore": [ diff --git a/package.json b/package.json index 910a643..30c6409 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,12 @@ "test": "test" }, "scripts": { - "test": "grunt test --verbose" + "test": "grunt test --verbose", + "pretest": "npm i" }, "repository": { "type": "git", - "url": "git+https://github.com/turn/angular-lock-column-widths.git" + "url": "git+https://github.com/bcherny/angular-lock-column-widths.git" }, "keywords": [ "angular", @@ -29,13 +30,15 @@ "prevent", "stuck" ], - "author": "Boris Cherny ", + "author": "Boris Cherny ", "license": "Apache2", "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-coffee": "^0.10.1", - "grunt-contrib-jasmine": "^0.6.4", + "grunt-contrib-jasmine": "^0.8.1", "grunt-contrib-watch": "^0.6.1", - "grunt-ngmin": "0.0.3" + "grunt-coveralls": "^1.0.0", + "grunt-ngmin": "0.0.3", + "grunt-template-jasmine-istanbul": "^0.3.0" } }