[Pkg-javascript-commits] [sockjs-client] 180/350: Move events. Rename errors to not smurf.
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:04:19 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit 574b7ec7c251c23f5dea3d57cedc3da2d3b88471
Author: Bryce Kahle <bkahle at gmail.com>
Date: Sun Oct 19 22:30:42 2014 -0400
Move events. Rename errors to not smurf.
---
.travis.yml | 1 -
lib/error/{invalidaccesserror.js => invalid-access.js} | 0
lib/error/{invalidstateerror.js => invalid-state.js} | 0
lib/error/{securityerror.js => security.js} | 0
lib/{transport/lib/close-event.js => event/close.js} | 2 +-
lib/{polyfills => event}/event.js | 0
lib/{polyfills => event}/eventtarget.js | 0
.../trans-message-event.js => event/trans-message.js} | 2 +-
lib/iframe-bootstrap.js | 2 +-
lib/{polyfills => }/location.js | 0
lib/main.js | 16 ++++++++--------
tests/browser.js | 4 ----
tests/lib/main-node.js | 2 +-
13 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 16526c8..23ad97e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,7 +7,6 @@ script:
- '[ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] && npm test || false'
env:
global:
- - TRAVIS_CI=true
- secure: L36j3mbU1U2FiOhxYZrTZ7apVnb56gE+QFixsYyDpCRBrVW0q8WR9LTMJx+aPNdlzhRS5FT4gfInujPTnZeb+EvqEoYwtT+CeNG15XtGkfJDkfBFjBa4IZpJAjIwJB+0kKkZr9R7lQEEgy7H9FvLHY2N2WgdzuG8WZwiVRnkwVw=
- secure: K6NxT5qIzV/4Ce1HqoYMdpFtqxx5S5Ua/sKp1bbHCXTCft6gLBR3mrf1RR14Wj9AwcM9QY6YbNF/dXGmBdMNtiJN+a2nvcfIoPTGJ3UpK4r2xI5w/U+uhRQMxD55SkWaxUIPvEfgvwyETSpFZRYACnNkpxeQWMkdc14vk74Feu0=
- secure: V39QiKk9SMbu2T9Uytitc/d0iZcC2vLkXsP0lEOOhdH2TvwB2naIr62i0MG3/MSa54pjEp7X8db+lNBVQZ6dlfUMS0SJcybCbf4whmNyvdThuAkWS2pWkg3ZW7uT43XqXX2JXvKA3IXHWsBJUyrOn+GYTNN7OTw0fo/4GFDbsnE=
diff --git a/lib/error/invalidaccesserror.js b/lib/error/invalid-access.js
similarity index 100%
rename from lib/error/invalidaccesserror.js
rename to lib/error/invalid-access.js
diff --git a/lib/error/invalidstateerror.js b/lib/error/invalid-state.js
similarity index 100%
rename from lib/error/invalidstateerror.js
rename to lib/error/invalid-state.js
diff --git a/lib/error/securityerror.js b/lib/error/security.js
similarity index 100%
rename from lib/error/securityerror.js
rename to lib/error/security.js
diff --git a/lib/transport/lib/close-event.js b/lib/event/close.js
similarity index 85%
rename from lib/transport/lib/close-event.js
rename to lib/event/close.js
index c638a5c..31beb6b 100644
--- a/lib/transport/lib/close-event.js
+++ b/lib/event/close.js
@@ -1,7 +1,7 @@
'use strict';
var util = require('util')
- , Event = require('../../polyfills/event')
+ , Event = require('./event')
;
function CloseEvent() {
diff --git a/lib/polyfills/event.js b/lib/event/event.js
similarity index 100%
rename from lib/polyfills/event.js
rename to lib/event/event.js
diff --git a/lib/polyfills/eventtarget.js b/lib/event/eventtarget.js
similarity index 100%
rename from lib/polyfills/eventtarget.js
rename to lib/event/eventtarget.js
diff --git a/lib/transport/lib/trans-message-event.js b/lib/event/trans-message.js
similarity index 85%
rename from lib/transport/lib/trans-message-event.js
rename to lib/event/trans-message.js
index 62e7b39..24f9eae 100644
--- a/lib/transport/lib/trans-message-event.js
+++ b/lib/event/trans-message.js
@@ -1,7 +1,7 @@
'use strict';
var util = require('util')
- , Event = require('../../polyfills/event')
+ , Event = require('./event')
;
function TransportMessageEvent(data) {
diff --git a/lib/iframe-bootstrap.js b/lib/iframe-bootstrap.js
index 8d247d6..0bdeb7d 100644
--- a/lib/iframe-bootstrap.js
+++ b/lib/iframe-bootstrap.js
@@ -6,7 +6,7 @@ var urlUtils = require('./utils/url')
, FacadeJS = require('./facade')
, InfoIframeReceiver = require('./info-iframe-receiver')
, iframeUtils = require('./utils/iframe')
- , loc = require('./polyfills/location')
+ , loc = require('./location')
;
module.exports = function (SockJS, availableTransports) {
diff --git a/lib/polyfills/location.js b/lib/location.js
similarity index 100%
rename from lib/polyfills/location.js
rename to lib/location.js
diff --git a/lib/main.js b/lib/main.js
index f525fe1..39b7771 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -12,14 +12,14 @@ var u = require('url')
, eventUtils = require('./utils/event')
, transport = require('./utils/transport')
, objectUtils = require('./utils/object')
- , SecurityError = require('./error/securityerror')
- , InvalidAccessError = require('./error/invalidaccesserror')
- , InvalidStateError = require('./error/invalidstateerror')
- , Event = require('./polyfills/event')
- , EventTarget = require('./polyfills/eventtarget')
- , loc = require('./polyfills/location')
- , CloseEvent = require('./transport/lib/close-event')
- , TransportMessageEvent = require('./transport/lib/trans-message-event')
+ , SecurityError = require('./error/security')
+ , InvalidAccessError = require('./error/invalid-access')
+ , InvalidStateError = require('./error/invalid-state')
+ , Event = require('./event/event')
+ , EventTarget = require('./event/eventtarget')
+ , loc = require('./location')
+ , CloseEvent = require('./event/close')
+ , TransportMessageEvent = require('./event/trans-message')
, InfoReceiver = require('./info-receiver')
;
diff --git a/tests/browser.js b/tests/browser.js
index 229a010..c0d9d5d 100644
--- a/tests/browser.js
+++ b/tests/browser.js
@@ -2,10 +2,6 @@
require('../lib/shims');
-if (!process.env.TRAVIS_CI) {
- require('debug').enable('sockjs-client:*');
-}
-
// prevent global leak warnings on this
global._jp = {};
global._sockjs_global = null;
diff --git a/tests/lib/main-node.js b/tests/lib/main-node.js
index e125db3..c67fe35 100644
--- a/tests/lib/main-node.js
+++ b/tests/lib/main-node.js
@@ -10,7 +10,7 @@ describe('SockJS', function() {
describe('WebSocket specification step #2', function () {
it('should throw SecurityError for an insecure url from a secure page', function () {
- var main = proxyquire('../../lib/main', { './polyfills/location': {
+ var main = proxyquire('../../lib/main', { './location': {
protocol: 'https'
}});
var sjs = proxyquire('../../lib/entry', { './main': main });
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list