twilio_ip_messaging_rails 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/twilio_ip_messaging_rails.js +225 -223
- data/lib/twilio_ip_messaging_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3330c5d868b9aff1555e2890503bc31e76f686c2
|
4
|
+
data.tar.gz: 4e44105c64cb8968e720c37780856ccf735f9aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c97de909c1b47947ba3f50d5b6455faa211b6e1a8c087ac8edf883167512e221932019ebb1d2146cbd1d1e799276a8964fb767d29560acba58d809ba1b70d3d
|
7
|
+
data.tar.gz: b658a465e4b39d73a1cbf0cd9781b36beddb9f18b2d1c37e8c7c4d6d5deac9662c0c6ca5dc9d48954e8d93a25624f50391c6d3b697a4d28601bb983b032de64b
|
@@ -1,3 +1,5 @@
|
|
1
|
+
//= require twilio_common
|
2
|
+
|
1
3
|
/* twilio-ip-messaging.js 0.10.0
|
2
4
|
The following license applies to all parts of this software except as
|
3
5
|
documented below.
|
@@ -9958,229 +9960,229 @@ module.exports = function (obj) {
|
|
9958
9960
|
}());
|
9959
9961
|
|
9960
9962
|
},{}],60:[function(_dereq_,module,exports){
|
9961
|
-
/*
|
9962
|
-
* loglevel - https://github.com/pimterry/loglevel
|
9963
|
-
*
|
9964
|
-
* Copyright (c) 2013 Tim Perry
|
9965
|
-
* Licensed under the MIT license.
|
9966
|
-
*/
|
9967
|
-
(function (root, definition) {
|
9968
|
-
"use strict";
|
9969
|
-
if (typeof module === 'object' && module.exports && typeof _dereq_ === 'function') {
|
9970
|
-
module.exports = definition();
|
9971
|
-
} else if (typeof define === 'function' && typeof define.amd === 'object') {
|
9972
|
-
define(definition);
|
9973
|
-
} else {
|
9974
|
-
root.log = definition();
|
9975
|
-
}
|
9976
|
-
}(this, function () {
|
9977
|
-
"use strict";
|
9978
|
-
var noop = function() {};
|
9979
|
-
var undefinedType = "undefined";
|
9980
|
-
|
9981
|
-
function realMethod(methodName) {
|
9982
|
-
if (typeof console === undefinedType) {
|
9983
|
-
return false; // We can't build a real method without a console to log to
|
9984
|
-
} else if (console[methodName] !== undefined) {
|
9985
|
-
return bindMethod(console, methodName);
|
9986
|
-
} else if (console.log !== undefined) {
|
9987
|
-
return bindMethod(console, 'log');
|
9988
|
-
} else {
|
9989
|
-
return noop;
|
9990
|
-
}
|
9991
|
-
}
|
9992
|
-
|
9993
|
-
function bindMethod(obj, methodName) {
|
9994
|
-
var method = obj[methodName];
|
9995
|
-
if (typeof method.bind === 'function') {
|
9996
|
-
return method.bind(obj);
|
9997
|
-
} else {
|
9998
|
-
try {
|
9999
|
-
return Function.prototype.bind.call(method, obj);
|
10000
|
-
} catch (e) {
|
10001
|
-
// Missing bind shim or IE8 + Modernizr, fallback to wrapping
|
10002
|
-
return function() {
|
10003
|
-
return Function.prototype.apply.apply(method, [obj, arguments]);
|
10004
|
-
};
|
10005
|
-
}
|
10006
|
-
}
|
10007
|
-
}
|
10008
|
-
|
10009
|
-
// these private functions always need `this` to be set properly
|
10010
|
-
|
10011
|
-
function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {
|
10012
|
-
return function () {
|
10013
|
-
if (typeof console !== undefinedType) {
|
10014
|
-
replaceLoggingMethods.call(this, level, loggerName);
|
10015
|
-
this[methodName].apply(this, arguments);
|
10016
|
-
}
|
10017
|
-
};
|
10018
|
-
}
|
10019
|
-
|
10020
|
-
function replaceLoggingMethods(level, loggerName) {
|
10021
|
-
/*jshint validthis:true */
|
10022
|
-
for (var i = 0; i < logMethods.length; i++) {
|
10023
|
-
var methodName = logMethods[i];
|
10024
|
-
this[methodName] = (i < level) ?
|
10025
|
-
noop :
|
10026
|
-
this.methodFactory(methodName, level, loggerName);
|
10027
|
-
}
|
10028
|
-
}
|
10029
|
-
|
10030
|
-
function defaultMethodFactory(methodName, level, loggerName) {
|
10031
|
-
/*jshint validthis:true */
|
10032
|
-
return realMethod(methodName) ||
|
10033
|
-
enableLoggingWhenConsoleArrives.apply(this, arguments);
|
10034
|
-
}
|
10035
|
-
|
10036
|
-
var logMethods = [
|
10037
|
-
"trace",
|
10038
|
-
"debug",
|
10039
|
-
"info",
|
10040
|
-
"warn",
|
10041
|
-
"error"
|
10042
|
-
];
|
10043
|
-
|
10044
|
-
function Logger(name, defaultLevel, factory) {
|
10045
|
-
var self = this;
|
10046
|
-
var currentLevel;
|
10047
|
-
var storageKey = "loglevel";
|
10048
|
-
if (name) {
|
10049
|
-
storageKey += ":" + name;
|
10050
|
-
}
|
10051
|
-
|
10052
|
-
function persistLevelIfPossible(levelNum) {
|
10053
|
-
var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
|
10054
|
-
|
10055
|
-
// Use localStorage if available
|
10056
|
-
try {
|
10057
|
-
window.localStorage[storageKey] = levelName;
|
10058
|
-
return;
|
10059
|
-
} catch (ignore) {}
|
10060
|
-
|
10061
|
-
// Use session cookie as fallback
|
10062
|
-
try {
|
10063
|
-
window.document.cookie =
|
10064
|
-
encodeURIComponent(storageKey) + "=" + levelName + ";";
|
10065
|
-
} catch (ignore) {}
|
10066
|
-
}
|
10067
|
-
|
10068
|
-
function getPersistedLevel() {
|
10069
|
-
var storedLevel;
|
10070
|
-
|
10071
|
-
try {
|
10072
|
-
storedLevel = window.localStorage[storageKey];
|
10073
|
-
} catch (ignore) {}
|
10074
|
-
|
10075
|
-
if (typeof storedLevel === undefinedType) {
|
10076
|
-
try {
|
10077
|
-
var cookie = window.document.cookie;
|
10078
|
-
var location = cookie.indexOf(
|
10079
|
-
encodeURIComponent(storageKey) + "=");
|
10080
|
-
if (location) {
|
10081
|
-
storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
|
10082
|
-
}
|
10083
|
-
} catch (ignore) {}
|
10084
|
-
}
|
10085
|
-
|
10086
|
-
// If the stored level is not valid, treat it as if nothing was stored.
|
10087
|
-
if (self.levels[storedLevel] === undefined) {
|
10088
|
-
storedLevel = undefined;
|
10089
|
-
}
|
10090
|
-
|
10091
|
-
return storedLevel;
|
10092
|
-
}
|
10093
|
-
|
10094
|
-
/*
|
10095
|
-
*
|
10096
|
-
* Public API
|
10097
|
-
*
|
10098
|
-
*/
|
10099
|
-
|
10100
|
-
self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
|
10101
|
-
"ERROR": 4, "SILENT": 5};
|
10102
|
-
|
10103
|
-
self.methodFactory = factory || defaultMethodFactory;
|
10104
|
-
|
10105
|
-
self.getLevel = function () {
|
10106
|
-
return currentLevel;
|
10107
|
-
};
|
10108
|
-
|
10109
|
-
self.setLevel = function (level, persist) {
|
10110
|
-
if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
|
10111
|
-
level = self.levels[level.toUpperCase()];
|
10112
|
-
}
|
10113
|
-
if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
|
10114
|
-
currentLevel = level;
|
10115
|
-
if (persist !== false) { // defaults to true
|
10116
|
-
persistLevelIfPossible(level);
|
10117
|
-
}
|
10118
|
-
replaceLoggingMethods.call(self, level, name);
|
10119
|
-
if (typeof console === undefinedType && level < self.levels.SILENT) {
|
10120
|
-
return "No console available for logging";
|
10121
|
-
}
|
10122
|
-
} else {
|
10123
|
-
throw "log.setLevel() called with invalid level: " + level;
|
10124
|
-
}
|
10125
|
-
};
|
10126
|
-
|
10127
|
-
self.setDefaultLevel = function (level) {
|
10128
|
-
if (!getPersistedLevel()) {
|
10129
|
-
self.setLevel(level, false);
|
10130
|
-
}
|
10131
|
-
};
|
10132
|
-
|
10133
|
-
self.enableAll = function(persist) {
|
10134
|
-
self.setLevel(self.levels.TRACE, persist);
|
10135
|
-
};
|
10136
|
-
|
10137
|
-
self.disableAll = function(persist) {
|
10138
|
-
self.setLevel(self.levels.SILENT, persist);
|
10139
|
-
};
|
10140
|
-
|
10141
|
-
// Initialize with the right level
|
10142
|
-
var initialLevel = getPersistedLevel();
|
10143
|
-
if (initialLevel == null) {
|
10144
|
-
initialLevel = defaultLevel == null ? "WARN" : defaultLevel;
|
10145
|
-
}
|
10146
|
-
self.setLevel(initialLevel, false);
|
10147
|
-
}
|
10148
|
-
|
10149
|
-
/*
|
10150
|
-
*
|
10151
|
-
* Package-level API
|
10152
|
-
*
|
10153
|
-
*/
|
10154
|
-
|
10155
|
-
var defaultLogger = new Logger();
|
10156
|
-
|
10157
|
-
var _loggersByName = {};
|
10158
|
-
defaultLogger.getLogger = function getLogger(name) {
|
10159
|
-
if (typeof name !== "string" || name === "") {
|
10160
|
-
throw new TypeError("You must supply a name when creating a logger.");
|
10161
|
-
}
|
10162
|
-
|
10163
|
-
var logger = _loggersByName[name];
|
10164
|
-
if (!logger) {
|
10165
|
-
logger = _loggersByName[name] = new Logger(
|
10166
|
-
name, defaultLogger.getLevel(), defaultLogger.methodFactory);
|
10167
|
-
}
|
10168
|
-
return logger;
|
10169
|
-
};
|
10170
|
-
|
10171
|
-
// Grab the current global log variable in case of overwrite
|
10172
|
-
var _log = (typeof window !== undefinedType) ? window.log : undefined;
|
10173
|
-
defaultLogger.noConflict = function() {
|
10174
|
-
if (typeof window !== undefinedType &&
|
10175
|
-
window.log === defaultLogger) {
|
10176
|
-
window.log = _log;
|
10177
|
-
}
|
10178
|
-
|
10179
|
-
return defaultLogger;
|
10180
|
-
};
|
10181
|
-
|
10182
|
-
return defaultLogger;
|
10183
|
-
}));
|
9963
|
+
/*
|
9964
|
+
* loglevel - https://github.com/pimterry/loglevel
|
9965
|
+
*
|
9966
|
+
* Copyright (c) 2013 Tim Perry
|
9967
|
+
* Licensed under the MIT license.
|
9968
|
+
*/
|
9969
|
+
(function (root, definition) {
|
9970
|
+
"use strict";
|
9971
|
+
if (typeof module === 'object' && module.exports && typeof _dereq_ === 'function') {
|
9972
|
+
module.exports = definition();
|
9973
|
+
} else if (typeof define === 'function' && typeof define.amd === 'object') {
|
9974
|
+
define(definition);
|
9975
|
+
} else {
|
9976
|
+
root.log = definition();
|
9977
|
+
}
|
9978
|
+
}(this, function () {
|
9979
|
+
"use strict";
|
9980
|
+
var noop = function() {};
|
9981
|
+
var undefinedType = "undefined";
|
9982
|
+
|
9983
|
+
function realMethod(methodName) {
|
9984
|
+
if (typeof console === undefinedType) {
|
9985
|
+
return false; // We can't build a real method without a console to log to
|
9986
|
+
} else if (console[methodName] !== undefined) {
|
9987
|
+
return bindMethod(console, methodName);
|
9988
|
+
} else if (console.log !== undefined) {
|
9989
|
+
return bindMethod(console, 'log');
|
9990
|
+
} else {
|
9991
|
+
return noop;
|
9992
|
+
}
|
9993
|
+
}
|
9994
|
+
|
9995
|
+
function bindMethod(obj, methodName) {
|
9996
|
+
var method = obj[methodName];
|
9997
|
+
if (typeof method.bind === 'function') {
|
9998
|
+
return method.bind(obj);
|
9999
|
+
} else {
|
10000
|
+
try {
|
10001
|
+
return Function.prototype.bind.call(method, obj);
|
10002
|
+
} catch (e) {
|
10003
|
+
// Missing bind shim or IE8 + Modernizr, fallback to wrapping
|
10004
|
+
return function() {
|
10005
|
+
return Function.prototype.apply.apply(method, [obj, arguments]);
|
10006
|
+
};
|
10007
|
+
}
|
10008
|
+
}
|
10009
|
+
}
|
10010
|
+
|
10011
|
+
// these private functions always need `this` to be set properly
|
10012
|
+
|
10013
|
+
function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {
|
10014
|
+
return function () {
|
10015
|
+
if (typeof console !== undefinedType) {
|
10016
|
+
replaceLoggingMethods.call(this, level, loggerName);
|
10017
|
+
this[methodName].apply(this, arguments);
|
10018
|
+
}
|
10019
|
+
};
|
10020
|
+
}
|
10021
|
+
|
10022
|
+
function replaceLoggingMethods(level, loggerName) {
|
10023
|
+
/*jshint validthis:true */
|
10024
|
+
for (var i = 0; i < logMethods.length; i++) {
|
10025
|
+
var methodName = logMethods[i];
|
10026
|
+
this[methodName] = (i < level) ?
|
10027
|
+
noop :
|
10028
|
+
this.methodFactory(methodName, level, loggerName);
|
10029
|
+
}
|
10030
|
+
}
|
10031
|
+
|
10032
|
+
function defaultMethodFactory(methodName, level, loggerName) {
|
10033
|
+
/*jshint validthis:true */
|
10034
|
+
return realMethod(methodName) ||
|
10035
|
+
enableLoggingWhenConsoleArrives.apply(this, arguments);
|
10036
|
+
}
|
10037
|
+
|
10038
|
+
var logMethods = [
|
10039
|
+
"trace",
|
10040
|
+
"debug",
|
10041
|
+
"info",
|
10042
|
+
"warn",
|
10043
|
+
"error"
|
10044
|
+
];
|
10045
|
+
|
10046
|
+
function Logger(name, defaultLevel, factory) {
|
10047
|
+
var self = this;
|
10048
|
+
var currentLevel;
|
10049
|
+
var storageKey = "loglevel";
|
10050
|
+
if (name) {
|
10051
|
+
storageKey += ":" + name;
|
10052
|
+
}
|
10053
|
+
|
10054
|
+
function persistLevelIfPossible(levelNum) {
|
10055
|
+
var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
|
10056
|
+
|
10057
|
+
// Use localStorage if available
|
10058
|
+
try {
|
10059
|
+
window.localStorage[storageKey] = levelName;
|
10060
|
+
return;
|
10061
|
+
} catch (ignore) {}
|
10062
|
+
|
10063
|
+
// Use session cookie as fallback
|
10064
|
+
try {
|
10065
|
+
window.document.cookie =
|
10066
|
+
encodeURIComponent(storageKey) + "=" + levelName + ";";
|
10067
|
+
} catch (ignore) {}
|
10068
|
+
}
|
10069
|
+
|
10070
|
+
function getPersistedLevel() {
|
10071
|
+
var storedLevel;
|
10072
|
+
|
10073
|
+
try {
|
10074
|
+
storedLevel = window.localStorage[storageKey];
|
10075
|
+
} catch (ignore) {}
|
10076
|
+
|
10077
|
+
if (typeof storedLevel === undefinedType) {
|
10078
|
+
try {
|
10079
|
+
var cookie = window.document.cookie;
|
10080
|
+
var location = cookie.indexOf(
|
10081
|
+
encodeURIComponent(storageKey) + "=");
|
10082
|
+
if (location) {
|
10083
|
+
storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
|
10084
|
+
}
|
10085
|
+
} catch (ignore) {}
|
10086
|
+
}
|
10087
|
+
|
10088
|
+
// If the stored level is not valid, treat it as if nothing was stored.
|
10089
|
+
if (self.levels[storedLevel] === undefined) {
|
10090
|
+
storedLevel = undefined;
|
10091
|
+
}
|
10092
|
+
|
10093
|
+
return storedLevel;
|
10094
|
+
}
|
10095
|
+
|
10096
|
+
/*
|
10097
|
+
*
|
10098
|
+
* Public API
|
10099
|
+
*
|
10100
|
+
*/
|
10101
|
+
|
10102
|
+
self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
|
10103
|
+
"ERROR": 4, "SILENT": 5};
|
10104
|
+
|
10105
|
+
self.methodFactory = factory || defaultMethodFactory;
|
10106
|
+
|
10107
|
+
self.getLevel = function () {
|
10108
|
+
return currentLevel;
|
10109
|
+
};
|
10110
|
+
|
10111
|
+
self.setLevel = function (level, persist) {
|
10112
|
+
if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
|
10113
|
+
level = self.levels[level.toUpperCase()];
|
10114
|
+
}
|
10115
|
+
if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
|
10116
|
+
currentLevel = level;
|
10117
|
+
if (persist !== false) { // defaults to true
|
10118
|
+
persistLevelIfPossible(level);
|
10119
|
+
}
|
10120
|
+
replaceLoggingMethods.call(self, level, name);
|
10121
|
+
if (typeof console === undefinedType && level < self.levels.SILENT) {
|
10122
|
+
return "No console available for logging";
|
10123
|
+
}
|
10124
|
+
} else {
|
10125
|
+
throw "log.setLevel() called with invalid level: " + level;
|
10126
|
+
}
|
10127
|
+
};
|
10128
|
+
|
10129
|
+
self.setDefaultLevel = function (level) {
|
10130
|
+
if (!getPersistedLevel()) {
|
10131
|
+
self.setLevel(level, false);
|
10132
|
+
}
|
10133
|
+
};
|
10134
|
+
|
10135
|
+
self.enableAll = function(persist) {
|
10136
|
+
self.setLevel(self.levels.TRACE, persist);
|
10137
|
+
};
|
10138
|
+
|
10139
|
+
self.disableAll = function(persist) {
|
10140
|
+
self.setLevel(self.levels.SILENT, persist);
|
10141
|
+
};
|
10142
|
+
|
10143
|
+
// Initialize with the right level
|
10144
|
+
var initialLevel = getPersistedLevel();
|
10145
|
+
if (initialLevel == null) {
|
10146
|
+
initialLevel = defaultLevel == null ? "WARN" : defaultLevel;
|
10147
|
+
}
|
10148
|
+
self.setLevel(initialLevel, false);
|
10149
|
+
}
|
10150
|
+
|
10151
|
+
/*
|
10152
|
+
*
|
10153
|
+
* Package-level API
|
10154
|
+
*
|
10155
|
+
*/
|
10156
|
+
|
10157
|
+
var defaultLogger = new Logger();
|
10158
|
+
|
10159
|
+
var _loggersByName = {};
|
10160
|
+
defaultLogger.getLogger = function getLogger(name) {
|
10161
|
+
if (typeof name !== "string" || name === "") {
|
10162
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
10163
|
+
}
|
10164
|
+
|
10165
|
+
var logger = _loggersByName[name];
|
10166
|
+
if (!logger) {
|
10167
|
+
logger = _loggersByName[name] = new Logger(
|
10168
|
+
name, defaultLogger.getLevel(), defaultLogger.methodFactory);
|
10169
|
+
}
|
10170
|
+
return logger;
|
10171
|
+
};
|
10172
|
+
|
10173
|
+
// Grab the current global log variable in case of overwrite
|
10174
|
+
var _log = (typeof window !== undefinedType) ? window.log : undefined;
|
10175
|
+
defaultLogger.noConflict = function() {
|
10176
|
+
if (typeof window !== undefinedType &&
|
10177
|
+
window.log === defaultLogger) {
|
10178
|
+
window.log = _log;
|
10179
|
+
}
|
10180
|
+
|
10181
|
+
return defaultLogger;
|
10182
|
+
};
|
10183
|
+
|
10184
|
+
return defaultLogger;
|
10185
|
+
}));
|
10184
10186
|
|
10185
10187
|
},{}],61:[function(_dereq_,module,exports){
|
10186
10188
|
(function (global){
|