From 9465eea65707a47597ada9a505da767dba3d43d6 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Wed, 23 Dec 2015 02:27:33 +0000 Subject: [PATCH 01/15] Integrated Code Climate --- .codeclimate.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..0524503 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,10 @@ +engines: + csslint: + enabled: true + eslint: + enabled: true + fixme: + enabled: true +ratings: + paths: + - "src/**" \ No newline at end of file From 2d4b37d674943c6de499307cb058aebe15deb49d Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Wed, 23 Dec 2015 02:53:54 +0000 Subject: [PATCH 02/15] Integrated Travis CI --- .travis.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..61644ae --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +language: node_js + +node_js: + - "4.1" + - "4.0" + - "0.12" + - "0.11" + - "0.10" + +before_script: + - npm install -g gulp + +script: gulp \ No newline at end of file From 12af1407522e8434b095fc8e28e3758e9575afcf Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 14:46:09 +0000 Subject: [PATCH 03/15] Karma: Added isparta as the istrumenter --- karma.conf.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index 09c2da3..06841c4 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,12 +1,17 @@ 'use strict'; +var browserifyIstanbul = require('browserify-istanbul'); +var isparta = require('isparta'); + module.exports = function(config) { config.set({ browserify: { debug: true, transform: [ 'babelify', - 'browserify-istanbul' + browserifyIstanbul({ + istrumenter: isparta + }) ] }, browsers: ['PhantomJS'], From 94a96be6e51113cbd5e5afd7a864df6a20ea2add Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 14:46:32 +0000 Subject: [PATCH 04/15] Karma: Added lcov and text-summary reports --- karma.conf.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 06841c4..60b6378 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -24,8 +24,19 @@ module.exports = function(config) { } }, coverageReporter: { - type : 'html', - dir : 'coverage/' + dir: 'coverage', + reporters: [ + { + type: 'text-summary' + }, + { + type : 'html' + }, + { + type: 'lcovonly', + subdir: 'lcov' + } + ] }, files: [ 'node_modules/babel-polyfill/dist/polyfill.js', From 4b243f87a009e24c126acbbc88c446946870a6f4 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 16:15:16 +0000 Subject: [PATCH 05/15] Test: Added documentation for promisfiedWrite --- test/spec/test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/spec/test.js b/test/spec/test.js index 90a9ccc..2cb3ec9 100644 --- a/test/spec/test.js +++ b/test/spec/test.js @@ -7,6 +7,18 @@ import testUser from '../fixtures/user.json'; describe('Github', () => { let github, repository, testRepositoryName; + /** + * Creates or update a file + * + * @param {Object} data The data to create or update the file + * @param {string} data.repository The repository to work with + * @param {string} data.branch The branch in which the file has to be created or updated + * @param {string} data.filename The full path of the file + * @param {string} data.content The content of the file + * @param {string} data.commitMessage The commit message to use + * + * @returns {Promise} + */ function promisifiedWrite(data) { return new Promise((resolve, reject) => { data.repository.write(data.branch, data.filename, data.content, data.commitMessage, error => { From d30e45d79b5c61de0418a8e8044397d74339d3d9 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 16:41:31 +0000 Subject: [PATCH 06/15] Test: Fixes an issue when writing multiple files in succession. --- test/spec/test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/spec/test.js b/test/spec/test.js index 2cb3ec9..77445ed 100644 --- a/test/spec/test.js +++ b/test/spec/test.js @@ -26,7 +26,10 @@ describe('Github', () => { reject(error); } - resolve(); + // Fixes an issue when writing multiple files in succession. + // This issue only happens in Travis CI. + // (http://stackoverflow.com/questions/19576601/github-api-issue-with-file-upload#comment29076073_19576601) + setTimeout(resolve, 500); }); }); } From dd7cecf090098c9846853d9c28fea55dfa848d39 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 16:42:58 +0000 Subject: [PATCH 07/15] .travis.yml: Fixed Travis build --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 61644ae..ab0af53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,9 @@ node_js: - "4.0" - "0.12" - "0.11" - - "0.10" -before_script: - - npm install -g gulp +before_install: + - npm i -g npm@^3.3.0 -script: gulp \ No newline at end of file +script: + - npm run-script test \ No newline at end of file From ee2fb1dd83ad9ddaf64261cf93d3cf0b1851d9a8 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 16:43:36 +0000 Subject: [PATCH 08/15] .travis.yml: Improved the performance by caching npm dependencies --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index ab0af53..d89d4a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,10 @@ node_js: - "0.12" - "0.11" +cache: + directories: + - node_modules + before_install: - npm i -g npm@^3.3.0 From d78e1be1200338ba6a2ee27e48e77baee4a659db Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 17:33:00 +0000 Subject: [PATCH 09/15] Integrated coveralls --- karma.conf.js | 3 ++- package.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index 60b6378..6b56b68 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -54,7 +54,8 @@ module.exports = function(config) { }, reporters: [ 'mocha', - 'coverage' + 'coverage', + 'coveralls' ], reportSlowerThan: 800, singleRun: true diff --git a/package.json b/package.json index 96cb47d..af69783 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "karma-chai": "^0.1.0", "karma-chai-as-promised": "^0.1.2", "karma-coverage": "git://github.com/douglasduteil/karma-coverage#next", + "karma-coveralls": "^1.1.2", "karma-mocha": "^0.2.1", "karma-mocha-reporter": "^1.1.3", "karma-phantomjs-launcher": "^0.2.1", From 5204e0a2ed0c9d8f4d8638d08483ea42e9abdd7f Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 17:36:14 +0000 Subject: [PATCH 10/15] README: Added badges for code climate, travis, and coveralls --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 56b98fa..dbaae4d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # GitHub Extended +[![Code Climate](https://codeclimate.com/github/AurelioDeRosa/github-extended/badges/gpa.svg)](https://codeclimate.com/github/AurelioDeRosa/github-extended) +[![Build Status](https://travis-ci.org/AurelioDeRosa/github-extended.svg?branch=master)](https://travis-ci.org/AurelioDeRosa/github-extended) +[![Coverage Status](https://coveralls.io/repos/AurelioDeRosa/github-extended/badge.svg?branch=master&service=github)](https://coveralls.io/github/AurelioDeRosa/github-extended?branch=master) + [GitHub Extended](https://github.com/AurelioDeRosa/github-extended) is a collection of methods to extend the functionality of [Github.js](https://github.com/michael/github) (known on [npm](https://www.npmjs.com) as [github-api](https://www.npmjs.com/package/github-api)). From 7e412e296beb031ee6159db9d23a87c8865444be Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 17:46:27 +0000 Subject: [PATCH 11/15] Test: update forked repository --- test/spec/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/spec/test.js b/test/spec/test.js index 77445ed..90ce23b 100644 --- a/test/spec/test.js +++ b/test/spec/test.js @@ -444,8 +444,8 @@ describe('Github', () => { }); describe('fork()', () => { - let forkUsername = 'AurelioDeRosa'; - let forkRepositoryName = 'HTML5-API-demos'; + let forkUsername = 'jquery'; + let forkRepositoryName = 'irc.jquery.org'; afterEach(done => { let fork = github.getRepo(testUser.username, forkRepositoryName); From 903876fa62d2ed6f36ba30298bdfa4cfe896af44 Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 18:15:39 +0000 Subject: [PATCH 12/15] README: Fixed coveralls badge --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dbaae4d..8a48be0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Code Climate](https://codeclimate.com/github/AurelioDeRosa/github-extended/badges/gpa.svg)](https://codeclimate.com/github/AurelioDeRosa/github-extended) [![Build Status](https://travis-ci.org/AurelioDeRosa/github-extended.svg?branch=master)](https://travis-ci.org/AurelioDeRosa/github-extended) -[![Coverage Status](https://coveralls.io/repos/AurelioDeRosa/github-extended/badge.svg?branch=master&service=github)](https://coveralls.io/github/AurelioDeRosa/github-extended?branch=master) +[![Coverage Status](https://coveralls.io/repos/AurelioDeRosa/github-extended/badge.svg?branch=master)](https://coveralls.io/github/AurelioDeRosa/github-extended?branch=master) [GitHub Extended](https://github.com/AurelioDeRosa/github-extended) is a collection of methods to extend the functionality of [Github.js](https://github.com/michael/github) (known on [npm](https://www.npmjs.com) as @@ -57,4 +57,4 @@ Creates a fork of the repository ## Author -[Aurelio De Rosa](http://www.audero.it) ([@AurelioDeRosa](https://twitter.com/AurelioDeRosa)) \ No newline at end of file +[Aurelio De Rosa](http://www.audero.it) ([@AurelioDeRosa](https://twitter.com/AurelioDeRosa)) From e588417eccac87c13a9a47466f097bdb5cf303fb Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 19:02:25 +0000 Subject: [PATCH 13/15] README: Updated badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a48be0..6fe2f44 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GitHub Extended -[![Code Climate](https://codeclimate.com/github/AurelioDeRosa/github-extended/badges/gpa.svg)](https://codeclimate.com/github/AurelioDeRosa/github-extended) -[![Build Status](https://travis-ci.org/AurelioDeRosa/github-extended.svg?branch=master)](https://travis-ci.org/AurelioDeRosa/github-extended) +[![Code Climate](https://codeclimate.com/github/github-tools/github-extended/badges/gpa.svg)](https://codeclimate.com/github/github-tools/github-extended) +[![Build Status](https://travis-ci.org/github-tools/github-extended.svg?branch=master)](https://travis-ci.org/github-tools/github-extended) [![Coverage Status](https://coveralls.io/repos/AurelioDeRosa/github-extended/badge.svg?branch=master)](https://coveralls.io/github/AurelioDeRosa/github-extended?branch=master) [GitHub Extended](https://github.com/AurelioDeRosa/github-extended) is a collection of methods to extend the From 06d964dec27f4319c4331006b87d02705850de6e Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 19:10:46 +0000 Subject: [PATCH 14/15] README: Updated coveralls badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fe2f44..a1aa222 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Code Climate](https://codeclimate.com/github/github-tools/github-extended/badges/gpa.svg)](https://codeclimate.com/github/github-tools/github-extended) [![Build Status](https://travis-ci.org/github-tools/github-extended.svg?branch=master)](https://travis-ci.org/github-tools/github-extended) -[![Coverage Status](https://coveralls.io/repos/AurelioDeRosa/github-extended/badge.svg?branch=master)](https://coveralls.io/github/AurelioDeRosa/github-extended?branch=master) +[![Coverage Status](https://coveralls.io/repos/github-tools/github-extended/badge.svg?branch=master&service=github)](https://coveralls.io/github/github-tools/github-extended?branch=master) [GitHub Extended](https://github.com/AurelioDeRosa/github-extended) is a collection of methods to extend the functionality of [Github.js](https://github.com/michael/github) (known on [npm](https://www.npmjs.com) as From de1825e29a9347acb1f68ad4a82f9a12d387f98d Mon Sep 17 00:00:00 2001 From: Aurelio De Rosa Date: Mon, 28 Dec 2015 19:32:58 +0000 Subject: [PATCH 15/15] README: Updated URLs of the repository --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a1aa222..3680718 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Build Status](https://travis-ci.org/github-tools/github-extended.svg?branch=master)](https://travis-ci.org/github-tools/github-extended) [![Coverage Status](https://coveralls.io/repos/github-tools/github-extended/badge.svg?branch=master&service=github)](https://coveralls.io/github/github-tools/github-extended?branch=master) -[GitHub Extended](https://github.com/AurelioDeRosa/github-extended) is a collection of methods to extend the +[GitHub Extended](https://github.com/github-tools/github-extended) is a collection of methods to extend the functionality of [Github.js](https://github.com/michael/github) (known on [npm](https://www.npmjs.com) as [github-api](https://www.npmjs.com/package/github-api)). @@ -12,7 +12,7 @@ functionality of [Github.js](https://github.com/michael/github) (known on [npm]( Being an extension for Github.js, the only requirement is to install and include [Github.js](https://github.com/michael/github) before -[GitHub Extended](https://github.com/AurelioDeRosa/github-extended). +[GitHub Extended](https://github.com/github-tools/github-extended). ## Installation @@ -52,9 +52,9 @@ Creates a fork of the repository ## License -[GitHub Extended](https://github.com/AurelioDeRosa/github-extended) is dual licensed under +[GitHub Extended](https://github.com/github-tools/github-extended) is dual licensed under [MIT](http://www.opensource.org/licenses/MIT) and [GPL-3.0](http://opensource.org/licenses/GPL-3.0). ## Author -[Aurelio De Rosa](http://www.audero.it) ([@AurelioDeRosa](https://twitter.com/AurelioDeRosa)) +[Aurelio De Rosa](http://www.audero.it) ([@AurelioDeRosa](https://twitter.com/AurelioDeRosa)) \ No newline at end of file