Skip to content

Commit 5af7baf

Browse files
author
Anthony Sendra
committed
Merge remote-tracking branch 'origin/release-2.0.0'
Conflicts: dist/kuzzle.min.js dist/kuzzle.min.map
2 parents a5ee604 + c66edc2 commit 5af7baf

36 files changed

+2341
-1212
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
"yoda": [2, "never"]
5252
},
5353
"env": {
54-
"node": true
54+
"node": true,
55+
"mocha": true
5556
},
5657
"extends": "eslint:recommended"
5758
}

.travis.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ sudo: false
22
language: node_js
33
node_js:
44
- '4.2.6'
5-
env:
6-
- CXX=g++-4.8
75
addons:
86
apt:
97
sources:
10-
- ubuntu-toolchain-r-test
8+
- ubuntu-toolchain-r-test
119
packages:
12-
- g++-4.8
10+
- gcc-4.9
11+
- g++-4.9
1312
script:
14-
- grunt && npm test && cat ./coverage/lcov.info | ./node_modules/.bin/codecov
15-
before_install: npm install -g grunt-cli
16-
install: npm install
17-
13+
- grunt && npm test && cat ./coverage/lcov.info | ./node_modules/.bin/codecov
14+
before_install:
15+
- export CC="gcc-4.9" CXX="g++-4.9"
16+
- npm install -g grunt-cli
17+
install:
18+
- npm install
1819
after_success:
1920
- chmod 755 ${TRAVIS_BUILD_DIR}/deploy.sh && sh -c "${TRAVIS_BUILD_DIR}/deploy.sh"
20-
2121
env:
2222
global:
2323
secure: EZ+XXJFDtehmag7wt8JbutqgzpkkJUCzkEWw6W+p7MIxWenLyuGv/RUu7KGqAloOud1cZbmZGSfRx/vsPvxRjo+ZC7aaPqb74qRvfctGdlJTtEffS2jFno1pEppJzCR4n7vocSfMVYtOD6oHP67lXwn/Qnh++WUkZaV137m5+7rqiYgJ+JTeSs5jBRZ6X7VNoNz8tZXejQ+FOymCFQTS2JM/rSZX9NEK+OwUEhEjRcxqWMm2avk6NAQNAL3WQuIBJQH8lxEJxOXkMc0rQZZ09AoLpqJKzsaicaZMInt5JstPo2e9vJfhi+PpRSNhErIff36aCHWRYYDPKl5x6IelZpBfZeTdrs4V2TbRi1y0ELbgMG1FHS4HAw3vTnh4/49g01lAJed4UguFRc6MzwTLAL8uPG/zFe8snm9+kaf4pL7yO89Hf3eltE03+N//tyVv+X/jdSca2dBZ9FMeLE5pJ2jlRiKitCLjXmLUEMMxEwNF7K/IvOrD9wue3JXK0UogOpcXfppk++pNTijsZluU1Yj7k3fGFeS8d6rIU0Yj40y6/VMaJeL4EXlARRsGLigUKVjQL6+/N5xudlsCng+EG+WVIy4wEEPH0QgjUkPTgWx1NrUlTwjskE0cdqDOBu39WkRFJHHECYFPTfTuDJ7xxuuibFTQmUFu2zjbYfYKhPE=

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
*__note:__ the # at the end of lines are the pull request numbers on GitHub*
22

3+
# 2.0.0
4+
5+
* https://github.com/kuzzleio/sdk-javascript/releases/tag/2.0.0
6+
37
# 1.9.2
48

59
* Reinforce unit tests on the `security.getProfile` method #94

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function(grunt) {
1616
src: ['src/kuzzle.js'],
1717
dest: 'dist/kuzzle.js',
1818
options: {
19-
exclude: ['socket.io-client'],
19+
exclude: ['socket.io-client', 'ws', './src/networkWrapper/wrappers/wsnode.js'],
2020
browserifyOptions: {
2121
noParse: [require.resolve('node-uuid')]
2222
}

README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[![Build Status](https://travis-ci.org/kuzzleio/sdk-javascript.svg?branch=master)](https://travis-ci.org/kuzzleio/sdk-javascript) [![codecov.io](http://codecov.io/github/kuzzleio/sdk-javascript/coverage.svg?branch=master)](http://codecov.io/github/kuzzleio/sdk-javascript?branch=master) [![Dependency Status](https://david-dm.org/kuzzleio/sdk-javascript.svg)](https://david-dm.org/kuzzleio/sdk-javascript)
22

33

4-
Official Kuzzle Javascript SDK
4+
Official Kuzzle Javascript SDK
55
======
66

7-
This SDK version is compatible with Kuzzle 1.0.0-beta.1 and higher
7+
This SDK version is compatible with Kuzzle 1.0.0-RC5 and higher
8+
9+
Please use SDK v1.x for earlier versions of Kuzzle.
810

911
## About Kuzzle
1012

@@ -13,18 +15,38 @@ For UI and linked objects developers, Kuzzle is an open-source solution that han
1315
You can access the Kuzzle repository on [Github](https://github.com/kuzzleio/kuzzle)
1416

1517
* [SDK Documentation](#sdk-documentation)
18+
* [Protocols used](#protocols-used)
1619
* [Installation](#installation)
1720
* [NodeJS](#nodejs)
1821
* [Basic usage](#basic-usage-node)
1922
* [Javascript](#javascript)
2023
* [Basic usage](#basic-usage-js)
2124
* [Building manually](#building-manually)
25+
* [Migrating from SDK v1.x](#migrating-from-sdk-v1.x)
2226
* [License](#license)
2327

2428
## SDK Documentation
2529

2630
The complete SDK documentation is available [here](http://kuzzleio.github.io/sdk-documentation)
2731

32+
## Protocols used
33+
34+
The SDK Javascript implements two network protocols: raw WebSocket, and [Socket.IO](http://socket.io/)
35+
The main reason behind this is that while Socket.IO offers better compatibility with older web browsers, our raw WebSocket implementation is about 20% faster
36+
37+
For this reason, there is a slight difference with the [generic SDK documentation](http://kuzzleio.github.io/sdk-documentation): instead of 1 available `port` option, there are actually a `wsPort` and a `ioPort` options.
38+
These options are defaulted to Kuzzle default protocol plugins.
39+
40+
What protocol is used when you connect to Kuzzle depends on multiple factors:
41+
42+
#### NodeJS
43+
44+
The protocol used is always raw WebSocket.
45+
46+
#### Web Browsers
47+
48+
The SDK will first try to use raw WebSocket to connect to Kuzzle. If the web browser does not support this protocol, then the SDK falls back to Socket.IO
49+
2850
## Installation
2951

3052
This SDK can be used either in NodeJS or in a browser.
@@ -40,7 +62,7 @@ npm install kuzzle-sdk --save
4062
```javascript
4163
var
4264
Kuzzle = require('kuzzle-sdk'),
43-
kuzzle = new Kuzzle('http://foobar:7512');
65+
kuzzle = new Kuzzle('serverName');
4466

4567
var myDoc = {
4668
name: 'Rick Astley',
@@ -93,7 +115,7 @@ bower install kuzzle-sdk --save
93115

94116
```javascript
95117
var
96-
kuzzle = new Kuzzle('http://foobar:7512');
118+
kuzzle = new Kuzzle('serverName');
97119

98120
var myDoc = {
99121
name: 'Rick Astley',
@@ -119,6 +141,10 @@ kuzzle
119141

120142
Clone this github repository and run ``grunt``. A ``dist`` directory will be created, containing a plain browserified version of this SDK, and a minified version.
121143

144+
## Migrating from SDK v1.x
145+
146+
* Kuzzle constructor has been changed. Instead of an URL, you have to provide a resolvable server name, or an IP address. If you need to specify a port different than the provided default values, you can do so using these two new options: `wsPort` (WebSocket port) and `ioPort` (Socket.IO port)
147+
122148
## License
123149

124150
[Apache 2](LICENSE.md)

0 commit comments

Comments
 (0)