socket.io-rails 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 352e18d1a794e56daaeaffb74c1fb26bc0a9bd03
4
- data.tar.gz: 6c0561b03538061d6a2cbf273c63adb3c7952aef
3
+ metadata.gz: 640476432b7e2a75e572667cb9771e6ea6846dee
4
+ data.tar.gz: 8b9777fed70129c6da93cb5ef0e1c9749e84345b
5
5
  SHA512:
6
- metadata.gz: 5490288f6391c76817b5a9a13b10992de347fed3b098b24acc8e64fefcffec9bdb812624f88f1dfb39dbeb79fd7aa2ed7dd98811cbf2ef1822de55683f9fddce
7
- data.tar.gz: 53876e2d3f641ffff1591883bd4b762a6e75a17ec16637442d90f14c2e6bf351bf207de383e6d09f73fdd1f8452e6ccd1a6dcacdaf52f61ad620e5261c520714
6
+ metadata.gz: 41de87fe5f3862e6a4ac0d9d7f29a6772f8ed581579037de5f49ce1abfebd52c82761a53083ca82968ca9eefc33ca16fc908370cda20c041f35040cdecd95640
7
+ data.tar.gz: 189cef51335950ad724ad77ecff0e149be02a72aa183296ebd0f28e4ee4f5c6675f398eff5c651c07748a4f4bd6d9bdd4344b01cd09bdfdf0542dca44c0a7f2e
@@ -1,5 +1,5 @@
1
1
  module Socketio
2
2
  module Rails
3
- VERSION = "1.2.1"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
@@ -91,7 +91,7 @@ exports.connect = lookup;
91
91
  exports.Manager = _dereq_('./manager');
92
92
  exports.Socket = _dereq_('./socket');
93
93
 
94
- },{"./manager":3,"./socket":5,"./url":6,"debug":9,"socket.io-parser":43}],3:[function(_dereq_,module,exports){
94
+ },{"./manager":3,"./socket":5,"./url":6,"debug":10,"socket.io-parser":44}],3:[function(_dereq_,module,exports){
95
95
 
96
96
  /**
97
97
  * Module dependencies.
@@ -107,6 +107,7 @@ var bind = _dereq_('component-bind');
107
107
  var object = _dereq_('object-component');
108
108
  var debug = _dereq_('debug')('socket.io-client:manager');
109
109
  var indexOf = _dereq_('indexof');
110
+ var Backoff = _dereq_('backo2');
110
111
 
111
112
  /**
112
113
  * Module exports
@@ -138,11 +139,16 @@ function Manager(uri, opts){
138
139
  this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);
139
140
  this.reconnectionDelay(opts.reconnectionDelay || 1000);
140
141
  this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);
142
+ this.randomizationFactor(opts.randomizationFactor || 0.5);
143
+ this.backoff = new Backoff({
144
+ min: this.reconnectionDelay(),
145
+ max: this.reconnectionDelayMax(),
146
+ jitter: this.randomizationFactor()
147
+ });
141
148
  this.timeout(null == opts.timeout ? 20000 : opts.timeout);
142
149
  this.readyState = 'closed';
143
150
  this.uri = uri;
144
151
  this.connected = [];
145
- this.attempts = 0;
146
152
  this.encoding = false;
147
153
  this.packetBuffer = [];
148
154
  this.encoder = new parser.Encoder();
@@ -164,6 +170,18 @@ Manager.prototype.emitAll = function() {
164
170
  }
165
171
  };
166
172
 
173
+ /**
174
+ * Update `socket.id` of all sockets
175
+ *
176
+ * @api private
177
+ */
178
+
179
+ Manager.prototype.updateSocketIds = function(){
180
+ for (var nsp in this.nsps) {
181
+ this.nsps[nsp].id = this.engine.id;
182
+ }
183
+ };
184
+
167
185
  /**
168
186
  * Mix in `Emitter`.
169
187
  */
@@ -209,6 +227,14 @@ Manager.prototype.reconnectionAttempts = function(v){
209
227
  Manager.prototype.reconnectionDelay = function(v){
210
228
  if (!arguments.length) return this._reconnectionDelay;
211
229
  this._reconnectionDelay = v;
230
+ this.backoff && this.backoff.setMin(v);
231
+ return this;
232
+ };
233
+
234
+ Manager.prototype.randomizationFactor = function(v){
235
+ if (!arguments.length) return this._randomizationFactor;
236
+ this._randomizationFactor = v;
237
+ this.backoff && this.backoff.setJitter(v);
212
238
  return this;
213
239
  };
214
240
 
@@ -223,6 +249,7 @@ Manager.prototype.reconnectionDelay = function(v){
223
249
  Manager.prototype.reconnectionDelayMax = function(v){
224
250
  if (!arguments.length) return this._reconnectionDelayMax;
225
251
  this._reconnectionDelayMax = v;
252
+ this.backoff && this.backoff.setMax(v);
226
253
  return this;
227
254
  };
228
255
 
@@ -248,9 +275,8 @@ Manager.prototype.timeout = function(v){
248
275
 
249
276
  Manager.prototype.maybeReconnectOnOpen = function() {
250
277
  // Only try to reconnect if it's the first time we're connecting
251
- if (!this.openReconnect && !this.reconnecting && this._reconnection && this.attempts === 0) {
278
+ if (!this.reconnecting && this._reconnection && this.backoff.attempts === 0) {
252
279
  // keeps reconnection from firing twice for the same reconnection loop
253
- this.openReconnect = true;
254
280
  this.reconnect();
255
281
  }
256
282
  };
@@ -292,9 +318,10 @@ Manager.prototype.connect = function(fn){
292
318
  var err = new Error('Connection error');
293
319
  err.data = data;
294
320
  fn(err);
321
+ } else {
322
+ // Only do this if there is no fn to handle the error
323
+ self.maybeReconnectOnOpen();
295
324
  }
296
-
297
- self.maybeReconnectOnOpen();
298
325
  });
299
326
 
300
327
  // emit `connect_timeout`
@@ -393,6 +420,7 @@ Manager.prototype.socket = function(nsp){
393
420
  this.nsps[nsp] = socket;
394
421
  var self = this;
395
422
  socket.on('connect', function(){
423
+ socket.id = self.engine.id;
396
424
  if (!~indexOf(self.connected, socket)) {
397
425
  self.connected.push(socket);
398
426
  }
@@ -480,6 +508,7 @@ Manager.prototype.cleanup = function(){
480
508
  Manager.prototype.close =
481
509
  Manager.prototype.disconnect = function(){
482
510
  this.skipReconnect = true;
511
+ this.backoff.reset();
483
512
  this.readyState = 'closed';
484
513
  this.engine && this.engine.close();
485
514
  };
@@ -493,6 +522,7 @@ Manager.prototype.disconnect = function(){
493
522
  Manager.prototype.onclose = function(reason){
494
523
  debug('close');
495
524
  this.cleanup();
525
+ this.backoff.reset();
496
526
  this.readyState = 'closed';
497
527
  this.emit('close', reason);
498
528
  if (this._reconnection && !this.skipReconnect) {
@@ -510,15 +540,14 @@ Manager.prototype.reconnect = function(){
510
540
  if (this.reconnecting || this.skipReconnect) return this;
511
541
 
512
542
  var self = this;
513
- this.attempts++;
514
543
 
515
- if (this.attempts > this._reconnectionAttempts) {
544
+ if (this.backoff.attempts >= this._reconnectionAttempts) {
516
545
  debug('reconnect failed');
546
+ this.backoff.reset();
517
547
  this.emitAll('reconnect_failed');
518
548
  this.reconnecting = false;
519
549
  } else {
520
- var delay = this.attempts * this.reconnectionDelay();
521
- delay = Math.min(delay, this.reconnectionDelayMax());
550
+ var delay = this.backoff.duration();
522
551
  debug('will wait %dms before reconnect attempt', delay);
523
552
 
524
553
  this.reconnecting = true;
@@ -526,8 +555,8 @@ Manager.prototype.reconnect = function(){
526
555
  if (self.skipReconnect) return;
527
556
 
528
557
  debug('attempting reconnect');
529
- self.emitAll('reconnect_attempt', self.attempts);
530
- self.emitAll('reconnecting', self.attempts);
558
+ self.emitAll('reconnect_attempt', self.backoff.attempts);
559
+ self.emitAll('reconnecting', self.backoff.attempts);
531
560
 
532
561
  // check again for the case socket closed in above events
533
562
  if (self.skipReconnect) return;
@@ -560,13 +589,14 @@ Manager.prototype.reconnect = function(){
560
589
  */
561
590
 
562
591
  Manager.prototype.onreconnect = function(){
563
- var attempt = this.attempts;
564
- this.attempts = 0;
592
+ var attempt = this.backoff.attempts;
565
593
  this.reconnecting = false;
594
+ this.backoff.reset();
595
+ this.updateSocketIds();
566
596
  this.emitAll('reconnect', attempt);
567
597
  };
568
598
 
569
- },{"./on":4,"./socket":5,"./url":6,"component-bind":7,"component-emitter":8,"debug":9,"engine.io-client":10,"indexof":39,"object-component":40,"socket.io-parser":43}],4:[function(_dereq_,module,exports){
599
+ },{"./on":4,"./socket":5,"./url":6,"backo2":7,"component-bind":8,"component-emitter":9,"debug":10,"engine.io-client":11,"indexof":40,"object-component":41,"socket.io-parser":44}],4:[function(_dereq_,module,exports){
570
600
 
571
601
  /**
572
602
  * Module exports.
@@ -784,6 +814,7 @@ Socket.prototype.onclose = function(reason){
784
814
  debug('close (%s)', reason);
785
815
  this.connected = false;
786
816
  this.disconnected = true;
817
+ delete this.id;
787
818
  this.emit('disconnect', reason);
788
819
  };
789
820
 
@@ -978,7 +1009,7 @@ Socket.prototype.disconnect = function(){
978
1009
  return this;
979
1010
  };
980
1011
 
981
- },{"./on":4,"component-bind":7,"component-emitter":8,"debug":9,"has-binary":35,"socket.io-parser":43,"to-array":47}],6:[function(_dereq_,module,exports){
1012
+ },{"./on":4,"component-bind":8,"component-emitter":9,"debug":10,"has-binary":36,"socket.io-parser":44,"to-array":48}],6:[function(_dereq_,module,exports){
982
1013
  (function (global){
983
1014
 
984
1015
  /**
@@ -1008,7 +1039,7 @@ function url(uri, loc){
1008
1039
 
1009
1040
  // default to window.location
1010
1041
  var loc = loc || global.location;
1011
- if (null == uri) uri = loc.protocol + '//' + loc.hostname;
1042
+ if (null == uri) uri = loc.protocol + '//' + loc.host;
1012
1043
 
1013
1044
  // relative path support
1014
1045
  if ('string' == typeof uri) {
@@ -1055,7 +1086,94 @@ function url(uri, loc){
1055
1086
  }
1056
1087
 
1057
1088
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
1058
- },{"debug":9,"parseuri":41}],7:[function(_dereq_,module,exports){
1089
+ },{"debug":10,"parseuri":42}],7:[function(_dereq_,module,exports){
1090
+
1091
+ /**
1092
+ * Expose `Backoff`.
1093
+ */
1094
+
1095
+ module.exports = Backoff;
1096
+
1097
+ /**
1098
+ * Initialize backoff timer with `opts`.
1099
+ *
1100
+ * - `min` initial timeout in milliseconds [100]
1101
+ * - `max` max timeout [10000]
1102
+ * - `jitter` [0]
1103
+ * - `factor` [2]
1104
+ *
1105
+ * @param {Object} opts
1106
+ * @api public
1107
+ */
1108
+
1109
+ function Backoff(opts) {
1110
+ opts = opts || {};
1111
+ this.ms = opts.min || 100;
1112
+ this.max = opts.max || 10000;
1113
+ this.factor = opts.factor || 2;
1114
+ this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;
1115
+ this.attempts = 0;
1116
+ }
1117
+
1118
+ /**
1119
+ * Return the backoff duration.
1120
+ *
1121
+ * @return {Number}
1122
+ * @api public
1123
+ */
1124
+
1125
+ Backoff.prototype.duration = function(){
1126
+ var ms = this.ms * Math.pow(this.factor, this.attempts++);
1127
+ if (this.jitter) {
1128
+ var rand = Math.random();
1129
+ var deviation = Math.floor(rand * this.jitter * ms);
1130
+ ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;
1131
+ }
1132
+ return Math.min(ms, this.max) | 0;
1133
+ };
1134
+
1135
+ /**
1136
+ * Reset the number of attempts.
1137
+ *
1138
+ * @api public
1139
+ */
1140
+
1141
+ Backoff.prototype.reset = function(){
1142
+ this.attempts = 0;
1143
+ };
1144
+
1145
+ /**
1146
+ * Set the minimum duration
1147
+ *
1148
+ * @api public
1149
+ */
1150
+
1151
+ Backoff.prototype.setMin = function(min){
1152
+ this.ms = min;
1153
+ };
1154
+
1155
+ /**
1156
+ * Set the maximum duration
1157
+ *
1158
+ * @api public
1159
+ */
1160
+
1161
+ Backoff.prototype.setMax = function(max){
1162
+ this.max = max;
1163
+ };
1164
+
1165
+ /**
1166
+ * Set the jitter
1167
+ *
1168
+ * @api public
1169
+ */
1170
+
1171
+ Backoff.prototype.setJitter = function(jitter){
1172
+ this.jitter = jitter;
1173
+ };
1174
+
1175
+
1176
+ },{}],8:[function(_dereq_,module,exports){
1059
1177
  /**
1060
1178
  * Slice reference.
1061
1179
  */
@@ -1080,7 +1198,7 @@ module.exports = function(obj, fn){
1080
1198
  }
1081
1199
  };
1082
1200
 
1083
- },{}],8:[function(_dereq_,module,exports){
1201
+ },{}],9:[function(_dereq_,module,exports){
1084
1202
 
1085
1203
  /**
1086
1204
  * Expose `Emitter`.
@@ -1246,7 +1364,7 @@ Emitter.prototype.hasListeners = function(event){
1246
1364
  return !! this.listeners(event).length;
1247
1365
  };
1248
1366
 
1249
- },{}],9:[function(_dereq_,module,exports){
1367
+ },{}],10:[function(_dereq_,module,exports){
1250
1368
 
1251
1369
  /**
1252
1370
  * Expose `debug()` as the module.
@@ -1385,11 +1503,11 @@ try {
1385
1503
  if (window.localStorage) debug.enable(localStorage.debug);
1386
1504
  } catch(e){}
1387
1505
 
1388
- },{}],10:[function(_dereq_,module,exports){
1506
+ },{}],11:[function(_dereq_,module,exports){
1389
1507
 
1390
1508
  module.exports = _dereq_('./lib/');
1391
1509
 
1392
- },{"./lib/":11}],11:[function(_dereq_,module,exports){
1510
+ },{"./lib/":12}],12:[function(_dereq_,module,exports){
1393
1511
 
1394
1512
  module.exports = _dereq_('./socket');
1395
1513
 
@@ -1401,7 +1519,7 @@ module.exports = _dereq_('./socket');
1401
1519
  */
1402
1520
  module.exports.parser = _dereq_('engine.io-parser');
1403
1521
 
1404
- },{"./socket":12,"engine.io-parser":24}],12:[function(_dereq_,module,exports){
1522
+ },{"./socket":13,"engine.io-parser":25}],13:[function(_dereq_,module,exports){
1405
1523
  (function (global){
1406
1524
  /**
1407
1525
  * Module dependencies.
@@ -2088,7 +2206,7 @@ Socket.prototype.filterUpgrades = function (upgrades) {
2088
2206
  };
2089
2207
 
2090
2208
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2091
- },{"./transport":13,"./transports":14,"component-emitter":8,"debug":21,"engine.io-parser":24,"indexof":39,"parsejson":31,"parseqs":32,"parseuri":33}],13:[function(_dereq_,module,exports){
2209
+ },{"./transport":14,"./transports":15,"component-emitter":9,"debug":22,"engine.io-parser":25,"indexof":40,"parsejson":32,"parseqs":33,"parseuri":34}],14:[function(_dereq_,module,exports){
2092
2210
  /**
2093
2211
  * Module dependencies.
2094
2212
  */
@@ -2240,7 +2358,7 @@ Transport.prototype.onClose = function () {
2240
2358
  this.emit('close');
2241
2359
  };
2242
2360
 
2243
- },{"component-emitter":8,"engine.io-parser":24}],14:[function(_dereq_,module,exports){
2361
+ },{"component-emitter":9,"engine.io-parser":25}],15:[function(_dereq_,module,exports){
2244
2362
  (function (global){
2245
2363
  /**
2246
2364
  * Module dependencies
@@ -2297,7 +2415,7 @@ function polling(opts){
2297
2415
  }
2298
2416
 
2299
2417
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2300
- },{"./polling-jsonp":15,"./polling-xhr":16,"./websocket":18,"xmlhttprequest":19}],15:[function(_dereq_,module,exports){
2418
+ },{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,"xmlhttprequest":20}],16:[function(_dereq_,module,exports){
2301
2419
  (function (global){
2302
2420
 
2303
2421
  /**
@@ -2534,7 +2652,7 @@ JSONPPolling.prototype.doWrite = function (data, fn) {
2534
2652
  };
2535
2653
 
2536
2654
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2537
- },{"./polling":17,"component-inherit":20}],16:[function(_dereq_,module,exports){
2655
+ },{"./polling":18,"component-inherit":21}],17:[function(_dereq_,module,exports){
2538
2656
  (function (global){
2539
2657
  /**
2540
2658
  * Module requirements.
@@ -2889,7 +3007,7 @@ function unloadHandler() {
2889
3007
  }
2890
3008
 
2891
3009
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2892
- },{"./polling":17,"component-emitter":8,"component-inherit":20,"debug":21,"xmlhttprequest":19}],17:[function(_dereq_,module,exports){
3010
+ },{"./polling":18,"component-emitter":9,"component-inherit":21,"debug":22,"xmlhttprequest":20}],18:[function(_dereq_,module,exports){
2893
3011
  /**
2894
3012
  * Module dependencies.
2895
3013
  */
@@ -3136,7 +3254,7 @@ Polling.prototype.uri = function(){
3136
3254
  return schema + '://' + this.hostname + port + this.path + query;
3137
3255
  };
3138
3256
 
3139
- },{"../transport":13,"component-inherit":20,"debug":21,"engine.io-parser":24,"parseqs":32,"xmlhttprequest":19}],18:[function(_dereq_,module,exports){
3257
+ },{"../transport":14,"component-inherit":21,"debug":22,"engine.io-parser":25,"parseqs":33,"xmlhttprequest":20}],19:[function(_dereq_,module,exports){
3140
3258
  /**
3141
3259
  * Module dependencies.
3142
3260
  */
@@ -3367,7 +3485,7 @@ WS.prototype.check = function(){
3367
3485
  return !!WebSocket && !('__initialize' in WebSocket && this.name === WS.prototype.name);
3368
3486
  };
3369
3487
 
3370
- },{"../transport":13,"component-inherit":20,"debug":21,"engine.io-parser":24,"parseqs":32,"ws":34}],19:[function(_dereq_,module,exports){
3488
+ },{"../transport":14,"component-inherit":21,"debug":22,"engine.io-parser":25,"parseqs":33,"ws":35}],20:[function(_dereq_,module,exports){
3371
3489
  // browser shim for xmlhttprequest module
3372
3490
  var hasCORS = _dereq_('has-cors');
3373
3491
 
@@ -3405,7 +3523,7 @@ module.exports = function(opts) {
3405
3523
  }
3406
3524
  }
3407
3525
 
3408
- },{"has-cors":37}],20:[function(_dereq_,module,exports){
3526
+ },{"has-cors":38}],21:[function(_dereq_,module,exports){
3409
3527
 
3410
3528
  module.exports = function(a, b){
3411
3529
  var fn = function(){};
@@ -3413,7 +3531,7 @@ module.exports = function(a, b){
3413
3531
  a.prototype = new fn;
3414
3532
  a.prototype.constructor = a;
3415
3533
  };
3416
- },{}],21:[function(_dereq_,module,exports){
3534
+ },{}],22:[function(_dereq_,module,exports){
3417
3535
 
3418
3536
  /**
3419
3537
  * This is the web browser implementation of `debug()`.
@@ -3562,7 +3680,7 @@ function load() {
3562
3680
 
3563
3681
  exports.enable(load());
3564
3682
 
3565
- },{"./debug":22}],22:[function(_dereq_,module,exports){
3683
+ },{"./debug":23}],23:[function(_dereq_,module,exports){
3566
3684
 
3567
3685
  /**
3568
3686
  * This is the common logic for both the Node.js and web browser
@@ -3761,7 +3879,7 @@ function coerce(val) {
3761
3879
  return val;
3762
3880
  }
3763
3881
 
3764
- },{"ms":23}],23:[function(_dereq_,module,exports){
3882
+ },{"ms":24}],24:[function(_dereq_,module,exports){
3765
3883
  /**
3766
3884
  * Helpers.
3767
3885
  */
@@ -3874,7 +3992,7 @@ function plural(ms, n, name) {
3874
3992
  return Math.ceil(ms / n) + ' ' + name + 's';
3875
3993
  }
3876
3994
 
3877
- },{}],24:[function(_dereq_,module,exports){
3995
+ },{}],25:[function(_dereq_,module,exports){
3878
3996
  (function (global){
3879
3997
  /**
3880
3998
  * Module dependencies.
@@ -4444,7 +4562,7 @@ exports.decodePayloadAsBinary = function (data, binaryType, callback) {
4444
4562
  };
4445
4563
 
4446
4564
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
4447
- },{"./keys":25,"after":26,"arraybuffer.slice":27,"base64-arraybuffer":28,"blob":29,"utf8":30}],25:[function(_dereq_,module,exports){
4565
+ },{"./keys":26,"after":27,"arraybuffer.slice":28,"base64-arraybuffer":29,"blob":30,"utf8":31}],26:[function(_dereq_,module,exports){
4448
4566
 
4449
4567
  /**
4450
4568
  * Gets the keys for an object.
@@ -4465,7 +4583,7 @@ module.exports = Object.keys || function keys (obj){
4465
4583
  return arr;
4466
4584
  };
4467
4585
 
4468
- },{}],26:[function(_dereq_,module,exports){
4586
+ },{}],27:[function(_dereq_,module,exports){
4469
4587
  module.exports = after
4470
4588
 
4471
4589
  function after(count, callback, err_cb) {
@@ -4495,7 +4613,7 @@ function after(count, callback, err_cb) {
4495
4613
 
4496
4614
  function noop() {}
4497
4615
 
4498
- },{}],27:[function(_dereq_,module,exports){
4616
+ },{}],28:[function(_dereq_,module,exports){
4499
4617
  /**
4500
4618
  * An abstraction for slicing an arraybuffer even when
4501
4619
  * ArrayBuffer.prototype.slice is not supported
@@ -4526,7 +4644,7 @@ module.exports = function(arraybuffer, start, end) {
4526
4644
  return result.buffer;
4527
4645
  };
4528
4646
 
4529
- },{}],28:[function(_dereq_,module,exports){
4647
+ },{}],29:[function(_dereq_,module,exports){
4530
4648
  /*
4531
4649
  * base64-arraybuffer
4532
4650
  * https://github.com/niklasvh/base64-arraybuffer
@@ -4587,7 +4705,7 @@ module.exports = function(arraybuffer, start, end) {
4587
4705
  };
4588
4706
  })("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
4589
4707
 
4590
- },{}],29:[function(_dereq_,module,exports){
4708
+ },{}],30:[function(_dereq_,module,exports){
4591
4709
  (function (global){
4592
4710
  /**
4593
4711
  * Create a blob builder even when vendor prefixes exist
@@ -4640,7 +4758,7 @@ module.exports = (function() {
4640
4758
  })();
4641
4759
 
4642
4760
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
4643
- },{}],30:[function(_dereq_,module,exports){
4761
+ },{}],31:[function(_dereq_,module,exports){
4644
4762
  (function (global){
4645
4763
  /*! http://mths.be/utf8js v2.0.0 by @mathias */
4646
4764
  ;(function(root) {
@@ -4883,7 +5001,7 @@ module.exports = (function() {
4883
5001
  }(this));
4884
5002
 
4885
5003
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
4886
- },{}],31:[function(_dereq_,module,exports){
5004
+ },{}],32:[function(_dereq_,module,exports){
4887
5005
  (function (global){
4888
5006
  /**
4889
5007
  * JSON parse.
@@ -4918,7 +5036,7 @@ module.exports = function parsejson(data) {
4918
5036
  }
4919
5037
  };
4920
5038
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
4921
- },{}],32:[function(_dereq_,module,exports){
5039
+ },{}],33:[function(_dereq_,module,exports){
4922
5040
  /**
4923
5041
  * Compiles a querystring
4924
5042
  * Returns string representation of the object
@@ -4957,7 +5075,7 @@ exports.decode = function(qs){
4957
5075
  return qry;
4958
5076
  };
4959
5077
 
4960
- },{}],33:[function(_dereq_,module,exports){
5078
+ },{}],34:[function(_dereq_,module,exports){
4961
5079
  /**
4962
5080
  * Parses an URI
4963
5081
  *
@@ -4998,7 +5116,7 @@ module.exports = function parseuri(str) {
4998
5116
  return uri;
4999
5117
  };
5000
5118
 
5001
- },{}],34:[function(_dereq_,module,exports){
5119
+ },{}],35:[function(_dereq_,module,exports){
5002
5120
 
5003
5121
  /**
5004
5122
  * Module dependencies.
@@ -5043,7 +5161,7 @@ function ws(uri, protocols, opts) {
5043
5161
 
5044
5162
  if (WebSocket) ws.prototype = WebSocket.prototype;
5045
5163
 
5046
- },{}],35:[function(_dereq_,module,exports){
5164
+ },{}],36:[function(_dereq_,module,exports){
5047
5165
  (function (global){
5048
5166
 
5049
5167
  /*
@@ -5105,12 +5223,12 @@ function hasBinary(data) {
5105
5223
  }
5106
5224
 
5107
5225
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
5108
- },{"isarray":36}],36:[function(_dereq_,module,exports){
5226
+ },{"isarray":37}],37:[function(_dereq_,module,exports){
5109
5227
  module.exports = Array.isArray || function (arr) {
5110
5228
  return Object.prototype.toString.call(arr) == '[object Array]';
5111
5229
  };
5112
5230
 
5113
- },{}],37:[function(_dereq_,module,exports){
5231
+ },{}],38:[function(_dereq_,module,exports){
5114
5232
 
5115
5233
  /**
5116
5234
  * Module dependencies.
@@ -5135,7 +5253,7 @@ try {
5135
5253
  module.exports = false;
5136
5254
  }
5137
5255
 
5138
- },{"global":38}],38:[function(_dereq_,module,exports){
5256
+ },{"global":39}],39:[function(_dereq_,module,exports){
5139
5257
 
5140
5258
  /**
5141
5259
  * Returns `this`. Execute this without a "context" (i.e. without it being
@@ -5145,7 +5263,7 @@ try {
5145
5263
 
5146
5264
  module.exports = (function () { return this; })();
5147
5265
 
5148
- },{}],39:[function(_dereq_,module,exports){
5266
+ },{}],40:[function(_dereq_,module,exports){
5149
5267
 
5150
5268
  var indexOf = [].indexOf;
5151
5269
 
@@ -5156,7 +5274,7 @@ module.exports = function(arr, obj){
5156
5274
  }
5157
5275
  return -1;
5158
5276
  };
5159
- },{}],40:[function(_dereq_,module,exports){
5277
+ },{}],41:[function(_dereq_,module,exports){
5160
5278
 
5161
5279
  /**
5162
5280
  * HOP ref.
@@ -5241,7 +5359,7 @@ exports.length = function(obj){
5241
5359
  exports.isEmpty = function(obj){
5242
5360
  return 0 == exports.length(obj);
5243
5361
  };
5244
- },{}],41:[function(_dereq_,module,exports){
5362
+ },{}],42:[function(_dereq_,module,exports){
5245
5363
  /**
5246
5364
  * Parses an URI
5247
5365
  *
@@ -5268,7 +5386,7 @@ module.exports = function parseuri(str) {
5268
5386
  return uri;
5269
5387
  };
5270
5388
 
5271
- },{}],42:[function(_dereq_,module,exports){
5389
+ },{}],43:[function(_dereq_,module,exports){
5272
5390
  (function (global){
5273
5391
  /*global Blob,File*/
5274
5392
 
@@ -5413,7 +5531,7 @@ exports.removeBlobs = function(data, callback) {
5413
5531
  };
5414
5532
 
5415
5533
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
5416
- },{"./is-buffer":44,"isarray":45}],43:[function(_dereq_,module,exports){
5534
+ },{"./is-buffer":45,"isarray":46}],44:[function(_dereq_,module,exports){
5417
5535
 
5418
5536
  /**
5419
5537
  * Module dependencies.
@@ -5811,7 +5929,7 @@ function error(data){
5811
5929
  };
5812
5930
  }
5813
5931
 
5814
- },{"./binary":42,"./is-buffer":44,"component-emitter":8,"debug":9,"isarray":45,"json3":46}],44:[function(_dereq_,module,exports){
5932
+ },{"./binary":43,"./is-buffer":45,"component-emitter":9,"debug":10,"isarray":46,"json3":47}],45:[function(_dereq_,module,exports){
5815
5933
  (function (global){
5816
5934
 
5817
5935
  module.exports = isBuf;
@@ -5828,9 +5946,9 @@ function isBuf(obj) {
5828
5946
  }
5829
5947
 
5830
5948
  }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
5831
- },{}],45:[function(_dereq_,module,exports){
5832
- module.exports=_dereq_(36)
5833
5949
  },{}],46:[function(_dereq_,module,exports){
5950
+ module.exports=_dereq_(37)
5951
+ },{}],47:[function(_dereq_,module,exports){
5834
5952
  /*! JSON v3.2.6 | http://bestiejs.github.io/json3 | Copyright 2012-2013, Kit Cambridge | http://kit.mit-license.org */
5835
5953
  ;(function (window) {
5836
5954
  // Convenience aliases.
@@ -6693,7 +6811,7 @@ module.exports=_dereq_(36)
6693
6811
  }
6694
6812
  }(this));
6695
6813
 
6696
- },{}],47:[function(_dereq_,module,exports){
6814
+ },{}],48:[function(_dereq_,module,exports){
6697
6815
  module.exports = toArray
6698
6816
 
6699
6817
  function toArray(list, index) {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socket.io-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-23 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties