diff --git a/Gruntfile.js b/Gruntfile.js index 3f34c27ba..33f21b9a2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -176,8 +176,8 @@ module.exports = function (grunt) { grunt.registerTask('default', [ /*jshint scripturl:true*/ 'jshint', - 'mochaTest:unit', 'build', + 'mochaTest:unit', 'mochaTest:yaml_suite' ]); diff --git a/README.md b/README.md index fd33a8883..7835ad5f4 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ elasticsearch.js works great in node, as well as modern browsers (many thanks to - Node: - [![Build Status](https://magnum.travis-ci.com/spenceralger/elasticsearch-js.png?token=tsFxSKHtVKG8EZavSjXY)](https://magnum.travis-ci.com/spenceralger/elasticsearch-js) + [![Build Status](https://travis-ci.com/elasticsearch/elasticsearch-js)](https://magnum.travis-ci.com/spenceralger/elasticsearch-js) - Browsers (see [browser builds](#browser-builds)): diff --git a/scripts/get_spec.js b/scripts/get_spec.js index 54191ffdc..293b91fd1 100644 --- a/scripts/get_spec.js +++ b/scripts/get_spec.js @@ -6,7 +6,8 @@ var zlib = require('zlib'); var path = require('path'); var _ = require('lodash'); var url = require('url'); -var tarUrl = 'https://github.com/elasticsearch/elasticsearch-rest-api-spec/archive/master.tar.gz'; +var tarUrl = 'https://github.com/elasticsearch/elasticsearch-rest-api-spec/tarball/master'; +var topDir = null; // remove the lowest directory, which changes with each commit. exports.get = function (pattern) { var stream = new EventEmitter(); @@ -27,9 +28,14 @@ exports.get = function (pattern) { console.error('request failed', incoming.statusCode, incoming.headers); } } else { - incoming.pipe(zlib.createGunzip()).pipe(tar.Parse()) + incoming + .pipe(zlib.createGunzip()) + .pipe(tar.Parse()) .on('entry', function (entry) { - entry.path = path.relative('elasticsearch-rest-api-spec-master', entry.path); + if (!topDir) { + topDir = entry.path.split('/').shift(); + } + entry.path = path.relative(topDir, entry.path); if (matcher.match(entry.path)) { collectData(entry); } else {