socket.io-rails 1.4.4 → 1.4.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: 7d1b9474dcff19a449eae0170f3882119722908b
4
- data.tar.gz: 09abbce389cb554de5f37b64a87a66fef955044b
3
+ metadata.gz: 33f4da11be72ae125c429754efcfefa5843110f4
4
+ data.tar.gz: d77ee919381d87a43ce06822ba83352b11463aef
5
5
  SHA512:
6
- metadata.gz: 7079f90c5ffea44c50bf59d7cf6fdf5fbf4de47287aad1eb97db890f3107bdd56c8aabe8326720f4a8dd552fb479966f36f16d0ff8ae298f0f0d88920b4b9878
7
- data.tar.gz: 1c189bb346e14334b881089cbdf5bb2008635c129acc5fcc25a82fac3e2df6ffd35d64223e4a4ec4b7a9fbf6da83d369da1fd9dd8110e8e6f63ee64563b85e9f
6
+ metadata.gz: 458969fe58572b7f35b4cbd0f5d67ccbb6f8d2d010a3640a6efd0d4d5cb1c4b230e9697185f03ed0599e19a718d924b0a71b1b283fedd15536bcbf784767edc7
7
+ data.tar.gz: 932ab28cf6b2a9da820c7d3191fd5a83447aad64064752d14cc71fb4dc653a85552761d183528f62831ea0aa7d9d43489dff40a7bc8d031f98a53517593ba790
@@ -1,5 +1,5 @@
1
1
  module Socketio
2
2
  module Rails
3
- VERSION = "1.4.4"
3
+ VERSION = "1.4.5"
4
4
  end
5
5
  end
@@ -1105,7 +1105,7 @@ JSONPPolling.prototype.doPoll = function () {
1105
1105
  this.script = script;
1106
1106
 
1107
1107
  var isUAgecko = 'undefined' != typeof navigator && /gecko/i.test(navigator.userAgent);
1108
-
1108
+
1109
1109
  if (isUAgecko) {
1110
1110
  setTimeout(function () {
1111
1111
  var iframe = document.createElement('iframe');
@@ -1883,11 +1883,16 @@ var BrowserWebSocket = global.WebSocket || global.MozWebSocket;
1883
1883
 
1884
1884
  /**
1885
1885
  * Get either the `WebSocket` or `MozWebSocket` globals
1886
- * in the browser or the WebSocket-compatible interface
1887
- * exposed by `ws` for Node environment.
1886
+ * in the browser or try to resolve WebSocket-compatible
1887
+ * interface exposed by `ws` for Node-like environment.
1888
1888
  */
1889
1889
 
1890
- var WebSocket = BrowserWebSocket || (typeof window !== 'undefined' ? null : _dereq_('ws'));
1890
+ var WebSocket = BrowserWebSocket;
1891
+ if (!WebSocket && typeof window === 'undefined') {
1892
+ try {
1893
+ WebSocket = _dereq_('ws');
1894
+ } catch (e) { }
1895
+ }
1891
1896
 
1892
1897
  /**
1893
1898
  * Module exports.
@@ -3920,245 +3925,245 @@ module.exports = function parseuri(str) {
3920
3925
  /*! https://mths.be/utf8js v2.0.0 by @mathias */
3921
3926
  ;(function(root) {
3922
3927
 
3923
- // Detect free variables `exports`
3924
- var freeExports = typeof exports == 'object' && exports;
3925
-
3926
- // Detect free variable `module`
3927
- var freeModule = typeof module == 'object' && module &&
3928
- module.exports == freeExports && module;
3929
-
3930
- // Detect free variable `global`, from Node.js or Browserified code,
3931
- // and use it as `root`
3932
- var freeGlobal = typeof global == 'object' && global;
3933
- if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
3934
- root = freeGlobal;
3935
- }
3936
-
3937
- /*--------------------------------------------------------------------------*/
3938
-
3939
- var stringFromCharCode = String.fromCharCode;
3940
-
3941
- // Taken from https://mths.be/punycode
3942
- function ucs2decode(string) {
3943
- var output = [];
3944
- var counter = 0;
3945
- var length = string.length;
3946
- var value;
3947
- var extra;
3948
- while (counter < length) {
3949
- value = string.charCodeAt(counter++);
3950
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
3951
- // high surrogate, and there is a next character
3952
- extra = string.charCodeAt(counter++);
3953
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
3954
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
3955
- } else {
3956
- // unmatched surrogate; only append this code unit, in case the next
3957
- // code unit is the high surrogate of a surrogate pair
3958
- output.push(value);
3959
- counter--;
3960
- }
3961
- } else {
3962
- output.push(value);
3963
- }
3964
- }
3965
- return output;
3966
- }
3967
-
3968
- // Taken from https://mths.be/punycode
3969
- function ucs2encode(array) {
3970
- var length = array.length;
3971
- var index = -1;
3972
- var value;
3973
- var output = '';
3974
- while (++index < length) {
3975
- value = array[index];
3976
- if (value > 0xFFFF) {
3977
- value -= 0x10000;
3978
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
3979
- value = 0xDC00 | value & 0x3FF;
3980
- }
3981
- output += stringFromCharCode(value);
3982
- }
3983
- return output;
3984
- }
3985
-
3986
- function checkScalarValue(codePoint) {
3987
- if (codePoint >= 0xD800 && codePoint <= 0xDFFF) {
3988
- throw Error(
3989
- 'Lone surrogate U+' + codePoint.toString(16).toUpperCase() +
3990
- ' is not a scalar value'
3991
- );
3992
- }
3993
- }
3994
- /*--------------------------------------------------------------------------*/
3995
-
3996
- function createByte(codePoint, shift) {
3997
- return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);
3998
- }
3999
-
4000
- function encodeCodePoint(codePoint) {
4001
- if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence
4002
- return stringFromCharCode(codePoint);
4003
- }
4004
- var symbol = '';
4005
- if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence
4006
- symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);
4007
- }
4008
- else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence
4009
- checkScalarValue(codePoint);
4010
- symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);
4011
- symbol += createByte(codePoint, 6);
4012
- }
4013
- else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence
4014
- symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);
4015
- symbol += createByte(codePoint, 12);
4016
- symbol += createByte(codePoint, 6);
4017
- }
4018
- symbol += stringFromCharCode((codePoint & 0x3F) | 0x80);
4019
- return symbol;
4020
- }
4021
-
4022
- function utf8encode(string) {
4023
- var codePoints = ucs2decode(string);
4024
- var length = codePoints.length;
4025
- var index = -1;
4026
- var codePoint;
4027
- var byteString = '';
4028
- while (++index < length) {
4029
- codePoint = codePoints[index];
4030
- byteString += encodeCodePoint(codePoint);
4031
- }
4032
- return byteString;
4033
- }
4034
-
4035
- /*--------------------------------------------------------------------------*/
4036
-
4037
- function readContinuationByte() {
4038
- if (byteIndex >= byteCount) {
4039
- throw Error('Invalid byte index');
4040
- }
4041
-
4042
- var continuationByte = byteArray[byteIndex] & 0xFF;
4043
- byteIndex++;
4044
-
4045
- if ((continuationByte & 0xC0) == 0x80) {
4046
- return continuationByte & 0x3F;
4047
- }
4048
-
4049
- // If we end up here, it’s not a continuation byte
4050
- throw Error('Invalid continuation byte');
4051
- }
4052
-
4053
- function decodeSymbol() {
4054
- var byte1;
4055
- var byte2;
4056
- var byte3;
4057
- var byte4;
4058
- var codePoint;
4059
-
4060
- if (byteIndex > byteCount) {
4061
- throw Error('Invalid byte index');
4062
- }
4063
-
4064
- if (byteIndex == byteCount) {
4065
- return false;
4066
- }
4067
-
4068
- // Read first byte
4069
- byte1 = byteArray[byteIndex] & 0xFF;
4070
- byteIndex++;
4071
-
4072
- // 1-byte sequence (no continuation bytes)
4073
- if ((byte1 & 0x80) == 0) {
4074
- return byte1;
4075
- }
4076
-
4077
- // 2-byte sequence
4078
- if ((byte1 & 0xE0) == 0xC0) {
4079
- var byte2 = readContinuationByte();
4080
- codePoint = ((byte1 & 0x1F) << 6) | byte2;
4081
- if (codePoint >= 0x80) {
4082
- return codePoint;
4083
- } else {
4084
- throw Error('Invalid continuation byte');
4085
- }
4086
- }
4087
-
4088
- // 3-byte sequence (may include unpaired surrogates)
4089
- if ((byte1 & 0xF0) == 0xE0) {
4090
- byte2 = readContinuationByte();
4091
- byte3 = readContinuationByte();
4092
- codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;
4093
- if (codePoint >= 0x0800) {
4094
- checkScalarValue(codePoint);
4095
- return codePoint;
4096
- } else {
4097
- throw Error('Invalid continuation byte');
4098
- }
4099
- }
4100
-
4101
- // 4-byte sequence
4102
- if ((byte1 & 0xF8) == 0xF0) {
4103
- byte2 = readContinuationByte();
4104
- byte3 = readContinuationByte();
4105
- byte4 = readContinuationByte();
4106
- codePoint = ((byte1 & 0x0F) << 0x12) | (byte2 << 0x0C) |
4107
- (byte3 << 0x06) | byte4;
4108
- if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {
4109
- return codePoint;
4110
- }
4111
- }
4112
-
4113
- throw Error('Invalid UTF-8 detected');
4114
- }
4115
-
4116
- var byteArray;
4117
- var byteCount;
4118
- var byteIndex;
4119
- function utf8decode(byteString) {
4120
- byteArray = ucs2decode(byteString);
4121
- byteCount = byteArray.length;
4122
- byteIndex = 0;
4123
- var codePoints = [];
4124
- var tmp;
4125
- while ((tmp = decodeSymbol()) !== false) {
4126
- codePoints.push(tmp);
4127
- }
4128
- return ucs2encode(codePoints);
4129
- }
4130
-
4131
- /*--------------------------------------------------------------------------*/
4132
-
4133
- var utf8 = {
4134
- 'version': '2.0.0',
4135
- 'encode': utf8encode,
4136
- 'decode': utf8decode
4137
- };
4138
-
4139
- // Some AMD build optimizers, like r.js, check for specific condition patterns
4140
- // like the following:
4141
- if (
4142
- typeof define == 'function' &&
4143
- typeof define.amd == 'object' &&
4144
- define.amd
4145
- ) {
4146
- define(function() {
4147
- return utf8;
4148
- });
4149
- } else if (freeExports && !freeExports.nodeType) {
4150
- if (freeModule) { // in Node.js or RingoJS v0.8.0+
4151
- freeModule.exports = utf8;
4152
- } else { // in Narwhal or RingoJS v0.7.0-
4153
- var object = {};
4154
- var hasOwnProperty = object.hasOwnProperty;
4155
- for (var key in utf8) {
4156
- hasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]);
4157
- }
4158
- }
4159
- } else { // in Rhino or a web browser
4160
- root.utf8 = utf8;
4161
- }
3928
+ // Detect free variables `exports`
3929
+ var freeExports = typeof exports == 'object' && exports;
3930
+
3931
+ // Detect free variable `module`
3932
+ var freeModule = typeof module == 'object' && module &&
3933
+ module.exports == freeExports && module;
3934
+
3935
+ // Detect free variable `global`, from Node.js or Browserified code,
3936
+ // and use it as `root`
3937
+ var freeGlobal = typeof global == 'object' && global;
3938
+ if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
3939
+ root = freeGlobal;
3940
+ }
3941
+
3942
+ /*--------------------------------------------------------------------------*/
3943
+
3944
+ var stringFromCharCode = String.fromCharCode;
3945
+
3946
+ // Taken from https://mths.be/punycode
3947
+ function ucs2decode(string) {
3948
+ var output = [];
3949
+ var counter = 0;
3950
+ var length = string.length;
3951
+ var value;
3952
+ var extra;
3953
+ while (counter < length) {
3954
+ value = string.charCodeAt(counter++);
3955
+ if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
3956
+ // high surrogate, and there is a next character
3957
+ extra = string.charCodeAt(counter++);
3958
+ if ((extra & 0xFC00) == 0xDC00) { // low surrogate
3959
+ output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
3960
+ } else {
3961
+ // unmatched surrogate; only append this code unit, in case the next
3962
+ // code unit is the high surrogate of a surrogate pair
3963
+ output.push(value);
3964
+ counter--;
3965
+ }
3966
+ } else {
3967
+ output.push(value);
3968
+ }
3969
+ }
3970
+ return output;
3971
+ }
3972
+
3973
+ // Taken from https://mths.be/punycode
3974
+ function ucs2encode(array) {
3975
+ var length = array.length;
3976
+ var index = -1;
3977
+ var value;
3978
+ var output = '';
3979
+ while (++index < length) {
3980
+ value = array[index];
3981
+ if (value > 0xFFFF) {
3982
+ value -= 0x10000;
3983
+ output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
3984
+ value = 0xDC00 | value & 0x3FF;
3985
+ }
3986
+ output += stringFromCharCode(value);
3987
+ }
3988
+ return output;
3989
+ }
3990
+
3991
+ function checkScalarValue(codePoint) {
3992
+ if (codePoint >= 0xD800 && codePoint <= 0xDFFF) {
3993
+ throw Error(
3994
+ 'Lone surrogate U+' + codePoint.toString(16).toUpperCase() +
3995
+ ' is not a scalar value'
3996
+ );
3997
+ }
3998
+ }
3999
+ /*--------------------------------------------------------------------------*/
4000
+
4001
+ function createByte(codePoint, shift) {
4002
+ return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);
4003
+ }
4004
+
4005
+ function encodeCodePoint(codePoint) {
4006
+ if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence
4007
+ return stringFromCharCode(codePoint);
4008
+ }
4009
+ var symbol = '';
4010
+ if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence
4011
+ symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);
4012
+ }
4013
+ else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence
4014
+ checkScalarValue(codePoint);
4015
+ symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);
4016
+ symbol += createByte(codePoint, 6);
4017
+ }
4018
+ else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence
4019
+ symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);
4020
+ symbol += createByte(codePoint, 12);
4021
+ symbol += createByte(codePoint, 6);
4022
+ }
4023
+ symbol += stringFromCharCode((codePoint & 0x3F) | 0x80);
4024
+ return symbol;
4025
+ }
4026
+
4027
+ function utf8encode(string) {
4028
+ var codePoints = ucs2decode(string);
4029
+ var length = codePoints.length;
4030
+ var index = -1;
4031
+ var codePoint;
4032
+ var byteString = '';
4033
+ while (++index < length) {
4034
+ codePoint = codePoints[index];
4035
+ byteString += encodeCodePoint(codePoint);
4036
+ }
4037
+ return byteString;
4038
+ }
4039
+
4040
+ /*--------------------------------------------------------------------------*/
4041
+
4042
+ function readContinuationByte() {
4043
+ if (byteIndex >= byteCount) {
4044
+ throw Error('Invalid byte index');
4045
+ }
4046
+
4047
+ var continuationByte = byteArray[byteIndex] & 0xFF;
4048
+ byteIndex++;
4049
+
4050
+ if ((continuationByte & 0xC0) == 0x80) {
4051
+ return continuationByte & 0x3F;
4052
+ }
4053
+
4054
+ // If we end up here, it’s not a continuation byte
4055
+ throw Error('Invalid continuation byte');
4056
+ }
4057
+
4058
+ function decodeSymbol() {
4059
+ var byte1;
4060
+ var byte2;
4061
+ var byte3;
4062
+ var byte4;
4063
+ var codePoint;
4064
+
4065
+ if (byteIndex > byteCount) {
4066
+ throw Error('Invalid byte index');
4067
+ }
4068
+
4069
+ if (byteIndex == byteCount) {
4070
+ return false;
4071
+ }
4072
+
4073
+ // Read first byte
4074
+ byte1 = byteArray[byteIndex] & 0xFF;
4075
+ byteIndex++;
4076
+
4077
+ // 1-byte sequence (no continuation bytes)
4078
+ if ((byte1 & 0x80) == 0) {
4079
+ return byte1;
4080
+ }
4081
+
4082
+ // 2-byte sequence
4083
+ if ((byte1 & 0xE0) == 0xC0) {
4084
+ var byte2 = readContinuationByte();
4085
+ codePoint = ((byte1 & 0x1F) << 6) | byte2;
4086
+ if (codePoint >= 0x80) {
4087
+ return codePoint;
4088
+ } else {
4089
+ throw Error('Invalid continuation byte');
4090
+ }
4091
+ }
4092
+
4093
+ // 3-byte sequence (may include unpaired surrogates)
4094
+ if ((byte1 & 0xF0) == 0xE0) {
4095
+ byte2 = readContinuationByte();
4096
+ byte3 = readContinuationByte();
4097
+ codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;
4098
+ if (codePoint >= 0x0800) {
4099
+ checkScalarValue(codePoint);
4100
+ return codePoint;
4101
+ } else {
4102
+ throw Error('Invalid continuation byte');
4103
+ }
4104
+ }
4105
+
4106
+ // 4-byte sequence
4107
+ if ((byte1 & 0xF8) == 0xF0) {
4108
+ byte2 = readContinuationByte();
4109
+ byte3 = readContinuationByte();
4110
+ byte4 = readContinuationByte();
4111
+ codePoint = ((byte1 & 0x0F) << 0x12) | (byte2 << 0x0C) |
4112
+ (byte3 << 0x06) | byte4;
4113
+ if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {
4114
+ return codePoint;
4115
+ }
4116
+ }
4117
+
4118
+ throw Error('Invalid UTF-8 detected');
4119
+ }
4120
+
4121
+ var byteArray;
4122
+ var byteCount;
4123
+ var byteIndex;
4124
+ function utf8decode(byteString) {
4125
+ byteArray = ucs2decode(byteString);
4126
+ byteCount = byteArray.length;
4127
+ byteIndex = 0;
4128
+ var codePoints = [];
4129
+ var tmp;
4130
+ while ((tmp = decodeSymbol()) !== false) {
4131
+ codePoints.push(tmp);
4132
+ }
4133
+ return ucs2encode(codePoints);
4134
+ }
4135
+
4136
+ /*--------------------------------------------------------------------------*/
4137
+
4138
+ var utf8 = {
4139
+ 'version': '2.0.0',
4140
+ 'encode': utf8encode,
4141
+ 'decode': utf8decode
4142
+ };
4143
+
4144
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
4145
+ // like the following:
4146
+ if (
4147
+ typeof define == 'function' &&
4148
+ typeof define.amd == 'object' &&
4149
+ define.amd
4150
+ ) {
4151
+ define(function() {
4152
+ return utf8;
4153
+ });
4154
+ } else if (freeExports && !freeExports.nodeType) {
4155
+ if (freeModule) { // in Node.js or RingoJS v0.8.0+
4156
+ freeModule.exports = utf8;
4157
+ } else { // in Narwhal or RingoJS v0.7.0-
4158
+ var object = {};
4159
+ var hasOwnProperty = object.hasOwnProperty;
4160
+ for (var key in utf8) {
4161
+ hasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]);
4162
+ }
4163
+ }
4164
+ } else { // in Rhino or a web browser
4165
+ root.utf8 = utf8;
4166
+ }
4162
4167
 
4163
4168
  }(this));
4164
4169
 
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.4.4
4
+ version: 1.4.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: 2016-01-11 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties