changed the tarballUrl in the generator script to the documented version, fixed the order of the default grunt task
This commit is contained in:
@ -176,8 +176,8 @@ module.exports = function (grunt) {
|
|||||||
grunt.registerTask('default', [
|
grunt.registerTask('default', [
|
||||||
/*jshint scripturl:true*/
|
/*jshint scripturl:true*/
|
||||||
'jshint',
|
'jshint',
|
||||||
'mochaTest:unit',
|
|
||||||
'build',
|
'build',
|
||||||
|
'mochaTest:unit',
|
||||||
'mochaTest:yaml_suite'
|
'mochaTest:yaml_suite'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ elasticsearch.js works great in node, as well as modern browsers (many thanks to
|
|||||||
|
|
||||||
- Node:
|
- Node:
|
||||||
|
|
||||||
[](https://magnum.travis-ci.com/spenceralger/elasticsearch-js)
|
[](https://magnum.travis-ci.com/spenceralger/elasticsearch-js)
|
||||||
|
|
||||||
- Browsers (see [browser builds](#browser-builds)):
|
- Browsers (see [browser builds](#browser-builds)):
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,8 @@ var zlib = require('zlib');
|
|||||||
var path = require('path');
|
var path = require('path');
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
var url = require('url');
|
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) {
|
exports.get = function (pattern) {
|
||||||
var stream = new EventEmitter();
|
var stream = new EventEmitter();
|
||||||
@ -27,9 +28,14 @@ exports.get = function (pattern) {
|
|||||||
console.error('request failed', incoming.statusCode, incoming.headers);
|
console.error('request failed', incoming.statusCode, incoming.headers);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
incoming.pipe(zlib.createGunzip()).pipe(tar.Parse())
|
incoming
|
||||||
|
.pipe(zlib.createGunzip())
|
||||||
|
.pipe(tar.Parse())
|
||||||
.on('entry', function (entry) {
|
.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)) {
|
if (matcher.match(entry.path)) {
|
||||||
collectData(entry);
|
collectData(entry);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user