updated dep list, added versions, and checked that the tests run well against the latest 1.0 beta and 0.90

This commit is contained in:
Spencer Alger
2013-11-11 14:47:47 -07:00
parent 7912ae63af
commit 7ad81390f6
9 changed files with 2641 additions and 2182 deletions

View File

@ -158,24 +158,12 @@ module.exports = function (grunt) {
}
}
}
},
mocha: {
yaml_suite: {
options: {
// log: true,
run: true,
urls: [ 'http://localhost:8888' ],
timeout: 10e3,
'--web-security': false
}
}
}
});
// load plugins
grunt.loadNpmTasks('grunt-run');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-clean');
@ -190,9 +178,7 @@ module.exports = function (grunt) {
'jshint',
'mochaTest:unit',
'build',
'mochaTest:yaml_suite',
// 'start:integration_server',
// 'mocha:yaml_suite' -- this will fail because of the way that PhantomJS handle's DELETE requests with body's
'mochaTest:yaml_suite'
]);
grunt.registerTask('build', [
@ -227,6 +213,11 @@ module.exports = function (grunt) {
var taskData = this.data;
/**
* You must always run the build task first, to ensure that the lastest API and yaml tests are available.
* This is run in the default and browser_tests:{{browser}} tests.
*/
grunt.task.requires('build');
grunt.task.requires('run:integration_server');
grunt.config.set('open.yaml_suite_' + this.target, {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1328
dist/elasticsearch.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -7,36 +7,34 @@
"homepage": "https://github.com/elasticsearch/elasticsearch-js",
"version": "0.0.1",
"devDependencies": {
"tar": "*",
"mocha": "*",
"async": "*",
"mkdirp": "*",
"moment": "*",
"should": "*",
"js-yaml": "*",
"optimist": "*",
"expect.js": "*",
"minimatch": "*",
"browserify": "*",
"grunt": "*",
"grunt-contrib-jshint": "*",
"grunt-contrib-nodeunit": "*",
"grunt-mocha-test": "*",
"grunt-contrib-watch": "*",
"grunt-browserify": "*",
"grunt-contrib-clean": "*",
"grunt-contrib-uglify": "*",
"grunt-mocha": "*",
"tar": "~0.1.18",
"mocha": "~1.14.0",
"async": "~0.2.9",
"mkdirp": "~0.3.5",
"moment": "~2.4.0",
"should": "~2.1.0",
"js-yaml": "~2.1.3",
"optimist": "~0.6.0",
"expect.js": "~0.2.0",
"minimatch": "~0.2.12",
"browserify": "~2.35.1",
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.7.1",
"grunt-mocha-test": "~0.7.0",
"grunt-browserify": "~1.2.11",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-concat": "~0.3.0",
"grunt-open": "~0.2.2",
"grunt-run": "~0.1.0",
"xmlbuilder": "~0.4.3"
"xmlbuilder": "~0.4.3",
"grunt-contrib-watch": "~0.5.3"
},
"license": "Apache License",
"dependencies": {
"when": "~2.6.0",
"lodash": "*",
"agentkeepalive": "*",
"lodash": "~2.3.0",
"agentkeepalive": "~0.1",
"chalk": "~0.3.0"
},
"scripts": {

View File

@ -52,12 +52,14 @@ HttpConnector.prototype.makeReqParams = function (params) {
auth: this.host.auth,
hostname: this.host.host,
port: this.host.port,
path: this.host.path + params.path,
pathname: this.host.path + params.path,
headers: this.host.headers,
agent: this.agent
};
var query = this.host.query ? this.host.query : null;
var queryStr;
if (typeof query === 'string') {
query = qs.parse(query);
}
@ -70,11 +72,10 @@ HttpConnector.prototype.makeReqParams = function (params) {
}
if (query) {
queryStr = qs.stringify(query);
}
if (queryStr) {
reqParams.path = reqParams.path + '?' + queryStr;
reqParams.query = query;
reqParams.path = reqParams.pathname + '?' + qs.stringify(query);
} else {
reqParams.path = reqParams.pathname;
}
return reqParams;

View File

@ -285,6 +285,11 @@ Log.prototype.trace = function (method, requestUrl, body, responseBody, response
}, requestUrl.query)
}, requestUrl);
delete requestUrl.auth;
if (!requestUrl.pathname && requestUrl.path) {
requestUrl.pathname = requestUrl.path.split('?').shift();
}
return this.emit('trace', method, url.format(requestUrl), body, responseBody, responseStatus);
}
};

File diff suppressed because it is too large Load Diff