Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .bithoundrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.nyc_output
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
language: node_js

node_js:
- 0.10
- 4
- 5
- 6
- 14
- 13
- 12
- 11
- 10
- 9
- 8

sudo: required
services:
- xvfb

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

notifications:
email:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
"dependencies": {
"relative-url": "^1.0.2",
"safe-buffer": "^5.1.1",
"ws": "^1.1.0"
"ws": "7.3.0"
},
"devDependencies": {
"mapleTree": "^0.5.1",
"pull-goodbye": "~0.0.1",
"pull-json-doubleline": "^1.0.0",
"pull-json-doubleline": "2.0.0",
"pull-split": "^0.2.0",
"pull-stream": "^3.3.2",
"pull-through": "^1.0.18",
"tap": "^5.7.2",
"tape": "^4.4.0",
"tap": "14.10.7",
"tape": "5.0.1",
"testling": "^1.7.1",
"wsurl": "^1.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ module.exports = !WebSocket.Server ? null : function (opts, onConnection) {
proxy(server, 'request')
proxy(server, 'close')

wsServer.on('connection', function (socket) {
wsServer.on('connection', function (socket, request) {
var stream = ws(socket)
stream.remoteAddress = socket.upgradeReq.socket.remoteAddress
stream.remoteAddress = request.socket.remoteAddress
emitter.emit('connection', stream)
})

Expand Down
4 changes: 2 additions & 2 deletions test/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ test('test error', function (t) {
pull.values(['x', 'y', 'z']),
pull.through(null, function (err) {
if(_err) {
t.strictEqual(err, _err);
t.deepEqual(err, _err);
t.end();
}
_err = err
}),
ws(new WebSocket('ws://localhost:34897/' + Math.random())),
pull.collect(function (err) {
if(_err) {
t.strictEqual(err, _err);
t.deepEqual(err, _err);
t.end();
}
_err = err
Expand Down
8 changes: 4 additions & 4 deletions test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var mapleTree = require('mapleTree');
var port = process.env.ZUUL_PORT || process.env.PORT || 3000;

module.exports = function () {
var router = new mapleTree.RouteTree();
var wss = new WebSocketServer({ port: port });
var router = new mapleTree.RouteTree();
var wss = new WebSocketServer({ port: port });

router.define('/read', function(ws) {
var values = ['a', 'b', 'c', 'd'];
Expand All @@ -27,8 +27,8 @@ var wss = new WebSocketServer({ port: port });
});
});

wss.on('connection', function(ws) {
var match = router.match(ws.upgradeReq.url);
wss.on('connection', function(ws, request) {
var match = router.match(request.url);
if (match && typeof match.fn == 'function') {
match.fn(ws);
}
Expand Down
Empty file added test/tap-parallel-not-ok
Empty file.
Loading