socket.io-rails 1.3.3 → 1.3.5

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: f8ffd31c42f8991d6275a8fc6a2d366cd33af996
4
- data.tar.gz: b62f3d430a23179d4f84411536c6bc3153a368c1
3
+ metadata.gz: 9f282748e08389059fb8076ce7eb2e2273b31520
4
+ data.tar.gz: 12296683cc59f74a70e6b41e8f1e7ab13939e0a7
5
5
  SHA512:
6
- metadata.gz: eadba0636c6628fc9909119de61366c015c88e05c2d5b8f57860ca8027aceae2e0b0d489c032961d8a268999ac20a91b9367391d539c776b7e39f4e205cb02a6
7
- data.tar.gz: bdb9ea2d8e8fe9bddfc83339e8dfef4875300bb8280bb5592c51dc42a3a2404813fb960c869e3b80282e2683a031bcad075f890b6bfb20317913cf4ca9be447b
6
+ metadata.gz: e105d132deaf4c041022a3705be30cf3768e7c6c2926b09bdfacca5a41d1d728f5fa9aef881f1b38f18446e9ae13def3757820f72c430ef266b147ffd1e58d9a
7
+ data.tar.gz: 27847c77e0de444e0ae6c6ecc71b4b38bbb68de64caadb26692cbcfff7c5bdf94f25a2fa7faf08a487c70f03ca4d44a5d11b8bf0d5aca825557b08cbf09b4e95
@@ -1,5 +1,5 @@
1
1
  module Socketio
2
2
  module Rails
3
- VERSION = "1.3.3"
3
+ VERSION = "1.3.5"
4
4
  end
5
5
  end
@@ -1612,7 +1612,6 @@ function Socket(uri, opts){
1612
1612
  this.rememberUpgrade = opts.rememberUpgrade || false;
1613
1613
  this.binaryType = null;
1614
1614
  this.onlyBinaryUpgrades = opts.onlyBinaryUpgrades;
1615
- this.perMessageDeflate = false !== opts.perMessageDeflate ? (opts.perMessageDeflate || true) : false;
1616
1615
 
1617
1616
  // SSL options for Node.js client
1618
1617
  this.pfx = opts.pfx || null;
@@ -1694,8 +1693,7 @@ Socket.prototype.createTransport = function (name) {
1694
1693
  cert: this.cert,
1695
1694
  ca: this.ca,
1696
1695
  ciphers: this.ciphers,
1697
- rejectUnauthorized: this.rejectUnauthorized,
1698
- perMessageDeflate: this.perMessageDeflate
1696
+ rejectUnauthorized: this.rejectUnauthorized
1699
1697
  });
1700
1698
 
1701
1699
  return transport;
@@ -1803,7 +1801,7 @@ Socket.prototype.probe = function (name) {
1803
1801
  if (failed) return;
1804
1802
 
1805
1803
  debug('probe transport "%s" opened', name);
1806
- transport.send([{ type: 'ping', data: 'probe', options: { compress: true } }]);
1804
+ transport.send([{ type: 'ping', data: 'probe' }]);
1807
1805
  transport.once('packet', function (msg) {
1808
1806
  if (failed) return;
1809
1807
  if ('pong' == msg.type && 'probe' == msg.data) {
@@ -1822,7 +1820,7 @@ Socket.prototype.probe = function (name) {
1822
1820
  cleanup();
1823
1821
 
1824
1822
  self.setTransport(transport);
1825
- transport.send([{ type: 'upgrade', options: { compress: true } }]);
1823
+ transport.send([{ type: 'upgrade' }]);
1826
1824
  self.emit('upgrade', transport);
1827
1825
  transport = null;
1828
1826
  self.upgrading = false;
@@ -2078,14 +2076,13 @@ Socket.prototype.flush = function () {
2078
2076
  *
2079
2077
  * @param {String} message.
2080
2078
  * @param {Function} callback function.
2081
- * @param {Object} options.
2082
2079
  * @return {Socket} for chaining.
2083
2080
  * @api public
2084
2081
  */
2085
2082
 
2086
2083
  Socket.prototype.write =
2087
- Socket.prototype.send = function (msg, options, fn) {
2088
- this.sendPacket('message', msg, options, fn);
2084
+ Socket.prototype.send = function (msg, fn) {
2085
+ this.sendPacket('message', msg, fn);
2089
2086
  return this;
2090
2087
  };
2091
2088
 
@@ -2094,29 +2091,16 @@ Socket.prototype.send = function (msg, options, fn) {
2094
2091
  *
2095
2092
  * @param {String} packet type.
2096
2093
  * @param {String} data.
2097
- * @param {Object} options.
2098
2094
  * @param {Function} callback function.
2099
2095
  * @api private
2100
2096
  */
2101
2097
 
2102
- Socket.prototype.sendPacket = function (type, data, options, fn) {
2103
- if ('function' == typeof options) {
2104
- fn = options;
2105
- options = null;
2106
- }
2107
-
2098
+ Socket.prototype.sendPacket = function (type, data, fn) {
2108
2099
  if ('closing' == this.readyState || 'closed' == this.readyState) {
2109
2100
  return;
2110
2101
  }
2111
2102
 
2112
- options = options || {};
2113
- options.compress = false !== options.compress;
2114
-
2115
- var packet = {
2116
- type: type,
2117
- data: data,
2118
- options: options
2119
- };
2103
+ var packet = { type: type, data: data };
2120
2104
  this.emit('packetCreate', packet);
2121
2105
  this.writeBuffer.push(packet);
2122
2106
  this.callbackBuffer.push(fn);
@@ -2602,7 +2586,7 @@ JSONPPolling.prototype.doPoll = function () {
2602
2586
  this.script = script;
2603
2587
 
2604
2588
  var isUAgecko = 'undefined' != typeof navigator && /gecko/i.test(navigator.userAgent);
2605
-
2589
+
2606
2590
  if (isUAgecko) {
2607
2591
  setTimeout(function () {
2608
2592
  var iframe = document.createElement('iframe');
@@ -3371,7 +3355,6 @@ function WS(opts){
3371
3355
  if (forceBase64) {
3372
3356
  this.supportsBinary = false;
3373
3357
  }
3374
- this.perMessageDeflate = opts.perMessageDeflate;
3375
3358
  Transport.call(this, opts);
3376
3359
  }
3377
3360
 
@@ -3410,10 +3393,7 @@ WS.prototype.doOpen = function(){
3410
3393
  var self = this;
3411
3394
  var uri = this.uri();
3412
3395
  var protocols = void(0);
3413
- var opts = {
3414
- agent: this.agent,
3415
- perMessageDeflate: this.perMessageDeflate
3416
- };
3396
+ var opts = { agent: this.agent };
3417
3397
 
3418
3398
  // SSL options for Node.js client
3419
3399
  opts.pfx = this.pfx;
@@ -3487,13 +3467,12 @@ WS.prototype.write = function(packets){
3487
3467
  // encodePacket efficient as it uses WS framing
3488
3468
  // no need for encodePayload
3489
3469
  for (var i = 0, l = packets.length; i < l; i++) {
3490
- var packet = packets[i];
3491
- parser.encodePacket(packet, this.supportsBinary, function(data) {
3470
+ parser.encodePacket(packets[i], this.supportsBinary, function(data) {
3492
3471
  //Sometimes the websocket has already been closed but the browser didn't
3493
3472
  //have a chance of informing us about it yet, in that case send will
3494
3473
  //throw an error
3495
3474
  try {
3496
- self.ws.send(data, packet.options);
3475
+ self.ws.send(data);
3497
3476
  } catch (e){
3498
3477
  debug('websocket closed before onclose event');
3499
3478
  }
@@ -4952,240 +4931,240 @@ module.exports = Array.isArray || function (arr) {
4952
4931
  /*! http://mths.be/utf8js v2.0.0 by @mathias */
4953
4932
  ;(function(root) {
4954
4933
 
4955
- // Detect free variables `exports`
4956
- var freeExports = typeof exports == 'object' && exports;
4957
-
4958
- // Detect free variable `module`
4959
- var freeModule = typeof module == 'object' && module &&
4960
- module.exports == freeExports && module;
4961
-
4962
- // Detect free variable `global`, from Node.js or Browserified code,
4963
- // and use it as `root`
4964
- var freeGlobal = typeof global == 'object' && global;
4965
- if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
4966
- root = freeGlobal;
4967
- }
4968
-
4969
- /*--------------------------------------------------------------------------*/
4970
-
4971
- var stringFromCharCode = String.fromCharCode;
4972
-
4973
- // Taken from http://mths.be/punycode
4974
- function ucs2decode(string) {
4975
- var output = [];
4976
- var counter = 0;
4977
- var length = string.length;
4978
- var value;
4979
- var extra;
4980
- while (counter < length) {
4981
- value = string.charCodeAt(counter++);
4982
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
4983
- // high surrogate, and there is a next character
4984
- extra = string.charCodeAt(counter++);
4985
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
4986
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
4987
- } else {
4988
- // unmatched surrogate; only append this code unit, in case the next
4989
- // code unit is the high surrogate of a surrogate pair
4990
- output.push(value);
4991
- counter--;
4992
- }
4993
- } else {
4994
- output.push(value);
4995
- }
4996
- }
4997
- return output;
4998
- }
4999
-
5000
- // Taken from http://mths.be/punycode
5001
- function ucs2encode(array) {
5002
- var length = array.length;
5003
- var index = -1;
5004
- var value;
5005
- var output = '';
5006
- while (++index < length) {
5007
- value = array[index];
5008
- if (value > 0xFFFF) {
5009
- value -= 0x10000;
5010
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
5011
- value = 0xDC00 | value & 0x3FF;
5012
- }
5013
- output += stringFromCharCode(value);
5014
- }
5015
- return output;
5016
- }
5017
-
5018
- /*--------------------------------------------------------------------------*/
5019
-
5020
- function createByte(codePoint, shift) {
5021
- return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);
5022
- }
5023
-
5024
- function encodeCodePoint(codePoint) {
5025
- if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence
5026
- return stringFromCharCode(codePoint);
5027
- }
5028
- var symbol = '';
5029
- if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence
5030
- symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);
5031
- }
5032
- else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence
5033
- symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);
5034
- symbol += createByte(codePoint, 6);
5035
- }
5036
- else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence
5037
- symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);
5038
- symbol += createByte(codePoint, 12);
5039
- symbol += createByte(codePoint, 6);
5040
- }
5041
- symbol += stringFromCharCode((codePoint & 0x3F) | 0x80);
5042
- return symbol;
5043
- }
5044
-
5045
- function utf8encode(string) {
5046
- var codePoints = ucs2decode(string);
5047
-
5048
- // console.log(JSON.stringify(codePoints.map(function(x) {
5049
- // return 'U+' + x.toString(16).toUpperCase();
5050
- // })));
5051
-
5052
- var length = codePoints.length;
5053
- var index = -1;
5054
- var codePoint;
5055
- var byteString = '';
5056
- while (++index < length) {
5057
- codePoint = codePoints[index];
5058
- byteString += encodeCodePoint(codePoint);
5059
- }
5060
- return byteString;
5061
- }
5062
-
5063
- /*--------------------------------------------------------------------------*/
5064
-
5065
- function readContinuationByte() {
5066
- if (byteIndex >= byteCount) {
5067
- throw Error('Invalid byte index');
5068
- }
5069
-
5070
- var continuationByte = byteArray[byteIndex] & 0xFF;
5071
- byteIndex++;
5072
-
5073
- if ((continuationByte & 0xC0) == 0x80) {
5074
- return continuationByte & 0x3F;
5075
- }
5076
-
5077
- // If we end up here, it’s not a continuation byte
5078
- throw Error('Invalid continuation byte');
5079
- }
5080
-
5081
- function decodeSymbol() {
5082
- var byte1;
5083
- var byte2;
5084
- var byte3;
5085
- var byte4;
5086
- var codePoint;
5087
-
5088
- if (byteIndex > byteCount) {
5089
- throw Error('Invalid byte index');
5090
- }
5091
-
5092
- if (byteIndex == byteCount) {
5093
- return false;
5094
- }
5095
-
5096
- // Read first byte
5097
- byte1 = byteArray[byteIndex] & 0xFF;
5098
- byteIndex++;
5099
-
5100
- // 1-byte sequence (no continuation bytes)
5101
- if ((byte1 & 0x80) == 0) {
5102
- return byte1;
5103
- }
5104
-
5105
- // 2-byte sequence
5106
- if ((byte1 & 0xE0) == 0xC0) {
5107
- var byte2 = readContinuationByte();
5108
- codePoint = ((byte1 & 0x1F) << 6) | byte2;
5109
- if (codePoint >= 0x80) {
5110
- return codePoint;
5111
- } else {
5112
- throw Error('Invalid continuation byte');
5113
- }
5114
- }
5115
-
5116
- // 3-byte sequence (may include unpaired surrogates)
5117
- if ((byte1 & 0xF0) == 0xE0) {
5118
- byte2 = readContinuationByte();
5119
- byte3 = readContinuationByte();
5120
- codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;
5121
- if (codePoint >= 0x0800) {
5122
- return codePoint;
5123
- } else {
5124
- throw Error('Invalid continuation byte');
5125
- }
5126
- }
5127
-
5128
- // 4-byte sequence
5129
- if ((byte1 & 0xF8) == 0xF0) {
5130
- byte2 = readContinuationByte();
5131
- byte3 = readContinuationByte();
5132
- byte4 = readContinuationByte();
5133
- codePoint = ((byte1 & 0x0F) << 0x12) | (byte2 << 0x0C) |
5134
- (byte3 << 0x06) | byte4;
5135
- if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {
5136
- return codePoint;
5137
- }
5138
- }
5139
-
5140
- throw Error('Invalid UTF-8 detected');
5141
- }
5142
-
5143
- var byteArray;
5144
- var byteCount;
5145
- var byteIndex;
5146
- function utf8decode(byteString) {
5147
- byteArray = ucs2decode(byteString);
5148
- byteCount = byteArray.length;
5149
- byteIndex = 0;
5150
- var codePoints = [];
5151
- var tmp;
5152
- while ((tmp = decodeSymbol()) !== false) {
5153
- codePoints.push(tmp);
5154
- }
5155
- return ucs2encode(codePoints);
5156
- }
5157
-
5158
- /*--------------------------------------------------------------------------*/
5159
-
5160
- var utf8 = {
5161
- 'version': '2.0.0',
5162
- 'encode': utf8encode,
5163
- 'decode': utf8decode
5164
- };
5165
-
5166
- // Some AMD build optimizers, like r.js, check for specific condition patterns
5167
- // like the following:
5168
- if (
5169
- typeof define == 'function' &&
5170
- typeof define.amd == 'object' &&
5171
- define.amd
5172
- ) {
5173
- define(function() {
5174
- return utf8;
5175
- });
5176
- } else if (freeExports && !freeExports.nodeType) {
5177
- if (freeModule) { // in Node.js or RingoJS v0.8.0+
5178
- freeModule.exports = utf8;
5179
- } else { // in Narwhal or RingoJS v0.7.0-
5180
- var object = {};
5181
- var hasOwnProperty = object.hasOwnProperty;
5182
- for (var key in utf8) {
5183
- hasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]);
5184
- }
5185
- }
5186
- } else { // in Rhino or a web browser
5187
- root.utf8 = utf8;
5188
- }
4934
+ // Detect free variables `exports`
4935
+ var freeExports = typeof exports == 'object' && exports;
4936
+
4937
+ // Detect free variable `module`
4938
+ var freeModule = typeof module == 'object' && module &&
4939
+ module.exports == freeExports && module;
4940
+
4941
+ // Detect free variable `global`, from Node.js or Browserified code,
4942
+ // and use it as `root`
4943
+ var freeGlobal = typeof global == 'object' && global;
4944
+ if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
4945
+ root = freeGlobal;
4946
+ }
4947
+
4948
+ /*--------------------------------------------------------------------------*/
4949
+
4950
+ var stringFromCharCode = String.fromCharCode;
4951
+
4952
+ // Taken from http://mths.be/punycode
4953
+ function ucs2decode(string) {
4954
+ var output = [];
4955
+ var counter = 0;
4956
+ var length = string.length;
4957
+ var value;
4958
+ var extra;
4959
+ while (counter < length) {
4960
+ value = string.charCodeAt(counter++);
4961
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
4962
+ // high surrogate, and there is a next character
4963
+ extra = string.charCodeAt(counter++);
4964
+ if ((extra & 0xFC00) == 0xDC00) { // low surrogate
4965
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
4966
+ } else {
4967
+ // unmatched surrogate; only append this code unit, in case the next
4968
+ // code unit is the high surrogate of a surrogate pair
4969
+ output.push(value);
4970
+ counter--;
4971
+ }
4972
+ } else {
4973
+ output.push(value);
4974
+ }
4975
+ }
4976
+ return output;
4977
+ }
4978
+
4979
+ // Taken from http://mths.be/punycode
4980
+ function ucs2encode(array) {
4981
+ var length = array.length;
4982
+ var index = -1;
4983
+ var value;
4984
+ var output = '';
4985
+ while (++index < length) {
4986
+ value = array[index];
4987
+ if (value > 0xFFFF) {
4988
+ value -= 0x10000;
4989
+ output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
4990
+ value = 0xDC00 | value & 0x3FF;
4991
+ }
4992
+ output += stringFromCharCode(value);
4993
+ }
4994
+ return output;
4995
+ }
4996
+
4997
+ /*--------------------------------------------------------------------------*/
4998
+
4999
+ function createByte(codePoint, shift) {
5000
+ return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);
5001
+ }
5002
+
5003
+ function encodeCodePoint(codePoint) {
5004
+ if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence
5005
+ return stringFromCharCode(codePoint);
5006
+ }
5007
+ var symbol = '';
5008
+ if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence
5009
+ symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);
5010
+ }
5011
+ else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence
5012
+ symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);
5013
+ symbol += createByte(codePoint, 6);
5014
+ }
5015
+ else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence
5016
+ symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);
5017
+ symbol += createByte(codePoint, 12);
5018
+ symbol += createByte(codePoint, 6);
5019
+ }
5020
+ symbol += stringFromCharCode((codePoint & 0x3F) | 0x80);
5021
+ return symbol;
5022
+ }
5023
+
5024
+ function utf8encode(string) {
5025
+ var codePoints = ucs2decode(string);
5026
+
5027
+ // console.log(JSON.stringify(codePoints.map(function(x) {
5028
+ // return 'U+' + x.toString(16).toUpperCase();
5029
+ // })));
5030
+
5031
+ var length = codePoints.length;
5032
+ var index = -1;
5033
+ var codePoint;
5034
+ var byteString = '';
5035
+ while (++index < length) {
5036
+ codePoint = codePoints[index];
5037
+ byteString += encodeCodePoint(codePoint);
5038
+ }
5039
+ return byteString;
5040
+ }
5041
+
5042
+ /*--------------------------------------------------------------------------*/
5043
+
5044
+ function readContinuationByte() {
5045
+ if (byteIndex >= byteCount) {
5046
+ throw Error('Invalid byte index');
5047
+ }
5048
+
5049
+ var continuationByte = byteArray[byteIndex] & 0xFF;
5050
+ byteIndex++;
5051
+
5052
+ if ((continuationByte & 0xC0) == 0x80) {
5053
+ return continuationByte & 0x3F;
5054
+ }
5055
+
5056
+ // If we end up here, it’s not a continuation byte
5057
+ throw Error('Invalid continuation byte');
5058
+ }
5059
+
5060
+ function decodeSymbol() {
5061
+ var byte1;
5062
+ var byte2;
5063
+ var byte3;
5064
+ var byte4;
5065
+ var codePoint;
5066
+
5067
+ if (byteIndex > byteCount) {
5068
+ throw Error('Invalid byte index');
5069
+ }
5070
+
5071
+ if (byteIndex == byteCount) {
5072
+ return false;
5073
+ }
5074
+
5075
+ // Read first byte
5076
+ byte1 = byteArray[byteIndex] & 0xFF;
5077
+ byteIndex++;
5078
+
5079
+ // 1-byte sequence (no continuation bytes)
5080
+ if ((byte1 & 0x80) == 0) {
5081
+ return byte1;
5082
+ }
5083
+
5084
+ // 2-byte sequence
5085
+ if ((byte1 & 0xE0) == 0xC0) {
5086
+ var byte2 = readContinuationByte();
5087
+ codePoint = ((byte1 & 0x1F) << 6) | byte2;
5088
+ if (codePoint >= 0x80) {
5089
+ return codePoint;
5090
+ } else {
5091
+ throw Error('Invalid continuation byte');
5092
+ }
5093
+ }
5094
+
5095
+ // 3-byte sequence (may include unpaired surrogates)
5096
+ if ((byte1 & 0xF0) == 0xE0) {
5097
+ byte2 = readContinuationByte();
5098
+ byte3 = readContinuationByte();
5099
+ codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;
5100
+ if (codePoint >= 0x0800) {
5101
+ return codePoint;
5102
+ } else {
5103
+ throw Error('Invalid continuation byte');
5104
+ }
5105
+ }
5106
+
5107
+ // 4-byte sequence
5108
+ if ((byte1 & 0xF8) == 0xF0) {
5109
+ byte2 = readContinuationByte();
5110
+ byte3 = readContinuationByte();
5111
+ byte4 = readContinuationByte();
5112
+ codePoint = ((byte1 & 0x0F) << 0x12) | (byte2 << 0x0C) |
5113
+ (byte3 << 0x06) | byte4;
5114
+ if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {
5115
+ return codePoint;
5116
+ }
5117
+ }
5118
+
5119
+ throw Error('Invalid UTF-8 detected');
5120
+ }
5121
+
5122
+ var byteArray;
5123
+ var byteCount;
5124
+ var byteIndex;
5125
+ function utf8decode(byteString) {
5126
+ byteArray = ucs2decode(byteString);
5127
+ byteCount = byteArray.length;
5128
+ byteIndex = 0;
5129
+ var codePoints = [];
5130
+ var tmp;
5131
+ while ((tmp = decodeSymbol()) !== false) {
5132
+ codePoints.push(tmp);
5133
+ }
5134
+ return ucs2encode(codePoints);
5135
+ }
5136
+
5137
+ /*--------------------------------------------------------------------------*/
5138
+
5139
+ var utf8 = {
5140
+ 'version': '2.0.0',
5141
+ 'encode': utf8encode,
5142
+ 'decode': utf8decode
5143
+ };
5144
+
5145
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
5146
+ // like the following:
5147
+ if (
5148
+ typeof define == 'function' &&
5149
+ typeof define.amd == 'object' &&
5150
+ define.amd
5151
+ ) {
5152
+ define(function() {
5153
+ return utf8;
5154
+ });
5155
+ } else if (freeExports && !freeExports.nodeType) {
5156
+ if (freeModule) { // in Node.js or RingoJS v0.8.0+
5157
+ freeModule.exports = utf8;
5158
+ } else { // in Narwhal or RingoJS v0.7.0-
5159
+ var object = {};
5160
+ var hasOwnProperty = object.hasOwnProperty;
5161
+ for (var key in utf8) {
5162
+ hasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]);
5163
+ }
5164
+ }
5165
+ } else { // in Rhino or a web browser
5166
+ root.utf8 = utf8;
5167
+ }
5189
5168
 
5190
5169
  }(this));
5191
5170
 
@@ -6004,7 +5983,7 @@ function decodeString(str) {
6004
5983
  var buf = '';
6005
5984
  while (str.charAt(++i) != '-') {
6006
5985
  buf += str.charAt(i);
6007
- if (i + 1 == str.length) break;
5986
+ if (i == str.length) break;
6008
5987
  }
6009
5988
  if (buf != Number(buf) || str.charAt(i) != '-') {
6010
5989
  throw new Error('Illegal attachments');
@@ -6019,7 +5998,7 @@ function decodeString(str) {
6019
5998
  var c = str.charAt(i);
6020
5999
  if (',' == c) break;
6021
6000
  p.nsp += c;
6022
- if (i + 1 == str.length) break;
6001
+ if (i == str.length) break;
6023
6002
  }
6024
6003
  } else {
6025
6004
  p.nsp = '/';
@@ -6036,7 +6015,7 @@ function decodeString(str) {
6036
6015
  break;
6037
6016
  }
6038
6017
  p.id += str.charAt(i);
6039
- if (i + 1 == str.length) break;
6018
+ if (i == str.length) break;
6040
6019
  }
6041
6020
  p.id = Number(p.id);
6042
6021
  }
@@ -7018,4 +6997,4 @@ function toArray(list, index) {
7018
6997
 
7019
6998
  },{}]},{},[1])
7020
6999
  (1)
7021
- });
7000
+ });
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.3.3
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-08 00:00:00.000000000 Z
11
+ date: 2015-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  version: '0'
56
56
  requirements: []
57
57
  rubyforge_project:
58
- rubygems_version: 2.2.2
58
+ rubygems_version: 2.4.6
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Rails asset pipeline wrapper for socket.io