version 2.1.0
This commit is contained in:
@ -2,7 +2,7 @@ language: node_js
|
||||
node_js: "0.10"
|
||||
secure: "NDDRc3eclg/sc3sc6bJq7WX0VuSQeQTg8OwgyCXHi5Cg9wyLLXe3ajzx4glLvsqq8uIl+dRE5HpJ5lEyrTMdxWHspUrVbfjRp4JuujoMbdsLjMzOeZZxuYHMGLbJnCWvN0lxNcosiXKydLEaOxgD79sCEJF549TtiHPMXeTl2z8="
|
||||
env:
|
||||
- ES_BRANCH=master COVERAGE=1
|
||||
- ES_BRANCH=1.1 COVERAGE=1
|
||||
- ES_BRANCH=1.0 NODE_UNIT=0
|
||||
- ES_BRANCH=0.90 NODE_UNIT=0
|
||||
- NODE_UNIT=0 NODE_INTEGRATION=0 BROWSER_UNIT=1
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
# elasticsearch-js changelog
|
||||
|
||||
## 2.1 (Mar 27 2014)
|
||||
- The default API version is now `'1.1'`
|
||||
|
||||
## 2.0 (Mar 27 2014)
|
||||
- The default API version is now `'1.0'`
|
||||
- Promises are now supported using the Bluebird module.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
The official low-level Elasticsearch client for Node.js and the browser.
|
||||
|
||||
[](https://travis-ci.org/elasticsearch/elasticsearch-js?branch=2.0) [](https://coveralls.io/r/elasticsearch/elasticsearch-js?branch=2.0) [](https://david-dm.org/elasticsearch/elasticsearch-js)
|
||||
[](https://travis-ci.org/elasticsearch/elasticsearch-js?branch=2.1) [](https://coveralls.io/r/elasticsearch/elasticsearch-js?branch=2.1) [](https://david-dm.org/elasticsearch/elasticsearch-js)
|
||||
|
||||
## Features
|
||||
|
||||
@ -34,7 +34,7 @@ bower install elasticsearch
|
||||
```
|
||||
|
||||
### Download
|
||||
- v2.0.0: [zip](https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.0.0.zip), [tar.gz](https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.0.0.tar.gz)
|
||||
- v2.1.0: [zip](https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.1.0.zip), [tar.gz](https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.1.0.tar.gz)
|
||||
|
||||
## Docs
|
||||
- [Quick Start](http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/quick-start.html)
|
||||
|
||||
@ -29,7 +29,7 @@ bower install elasticsearch
|
||||
---------
|
||||
|
||||
==== Download
|
||||
* v2.0.0: https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.0.0.zip[zip], https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.0.0.tar.gz[tar.gz]
|
||||
* v2.1.0: https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.1.0.zip[zip], https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-2.1.0.tar.gz[tar.gz]
|
||||
|
||||
|
||||
==== Angular Build (elasticsearch.angular.js)
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"description": "The official low-level Elasticsearch client for Node.js and the browser.",
|
||||
"main": "src/elasticsearch.js",
|
||||
"homepage": "http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"browser": {
|
||||
"./src/lib/connectors/index.js": "./src/lib/connectors/browser_index.js",
|
||||
"./src/lib/loggers/index.js": "./src/lib/loggers/browser_index.js",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
'master': require('./master'),
|
||||
'1.x': require('./1_x'),
|
||||
'1.1': require('./1_1'),
|
||||
'1.0': require('./1_0'),
|
||||
'0.90': require('./0_90'),
|
||||
_default: '0.90'
|
||||
_default: '1.1'
|
||||
};
|
||||
|
||||
@ -63,7 +63,7 @@ function Client(config) {
|
||||
delete this._namespaces;
|
||||
}
|
||||
|
||||
EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '1.0');
|
||||
EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, Client.apis._default);
|
||||
if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) {
|
||||
config.sniffEndpoint = '/_cluster/nodes';
|
||||
}
|
||||
|
||||
@ -21,9 +21,10 @@ describe('Client instances creation', function () {
|
||||
}).to.throwError(/previous "elasticsearch" module/);
|
||||
});
|
||||
|
||||
it('inherits the 1.0 API by default', function () {
|
||||
expect(client.bulk).to.eql(apis['1.0'].bulk);
|
||||
expect(client.nodes.stats).to.eql(apis['1.0'].nodes.prototype.stats);
|
||||
var def = require('../../../package.json').config.default_api_branch;
|
||||
it('inherits the ' + def + ' API by default', function () {
|
||||
expect(client.bulk).to.eql(apis[def].bulk);
|
||||
expect(client.nodes.stats).to.eql(apis[def].nodes.prototype.stats);
|
||||
});
|
||||
|
||||
it('inherits the 0.90 API when specified', function () {
|
||||
|
||||
Reference in New Issue
Block a user