Skip to content

Commit 540035b

Browse files
author
Spencer Alger
committed
changed the tarballUrl in the generator script to the documented version, fixed the order of the default grunt task
2 parents 7ad8139 + 81225a3 commit 540035b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ module.exports = function (grunt) {
176176
grunt.registerTask('default', [
177177
/*jshint scripturl:true*/
178178
'jshint',
179-
'mochaTest:unit',
180179
'build',
180+
'mochaTest:unit',
181181
'mochaTest:yaml_suite'
182182
]);
183183

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ elasticsearch.js works great in node, as well as modern browsers (many thanks to
1616

1717
- Node:
1818

19-
[![Build Status](https://magnum.travis-ci.com/spenceralger/elasticsearch-js.png?token=tsFxSKHtVKG8EZavSjXY)](https://magnum.travis-ci.com/spenceralger/elasticsearch-js)
19+
[![Build Status](https://travis-ci.com/elasticsearch/elasticsearch-js)](https://magnum.travis-ci.com/spenceralger/elasticsearch-js)
2020

2121
- Browsers (see [browser builds](#browser-builds)):
2222

scripts/get_spec.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ var zlib = require('zlib');
66
var path = require('path');
77
var _ = require('lodash');
88
var url = require('url');
9-
var tarUrl = 'https://github.com/elasticsearch/elasticsearch-rest-api-spec/archive/master.tar.gz';
9+
var tarUrl = 'https://github.com/elasticsearch/elasticsearch-rest-api-spec/tarball/master';
10+
var topDir = null; // remove the lowest directory, which changes with each commit.
1011

1112
exports.get = function (pattern) {
1213
var stream = new EventEmitter();
@@ -27,9 +28,14 @@ exports.get = function (pattern) {
2728
console.error('request failed', incoming.statusCode, incoming.headers);
2829
}
2930
} else {
30-
incoming.pipe(zlib.createGunzip()).pipe(tar.Parse())
31+
incoming
32+
.pipe(zlib.createGunzip())
33+
.pipe(tar.Parse())
3134
.on('entry', function (entry) {
32-
entry.path = path.relative('elasticsearch-rest-api-spec-master', entry.path);
35+
if (!topDir) {
36+
topDir = entry.path.split('/').shift();
37+
}
38+
entry.path = path.relative(topDir, entry.path);
3339
if (matcher.match(entry.path)) {
3440
collectData(entry);
3541
} else {

0 commit comments

Comments
 (0)