twilio_ip_messaging_rails 0.1.4 → 0.1.5
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/vendor/twilio_ip_messaging.js +228 -227
- data/lib/twilio_ip_messaging_rails/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 48aa38603f2d7c1fe11b7acce8b670bb0f2d49dd
         | 
| 4 | 
            +
              data.tar.gz: 55afa8a591c2a4ff52323e1fed6fccec968ec8a1
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 73b0ba6cf37323d5ea2da0c08d2d4e8c06718850ec5dbbcacf2f15434f93122586908719f153cef4ebe70c1469f6adb83fa738cd1b85260021ccb7651757cbc2
         | 
| 7 | 
            +
              data.tar.gz: c36720f35f912cd7cd0212159c20ed3cc4f338d114a64f71c3a903ddee3996d305e9dda5945824b47f053c5b0816ca766eb4a5590269178725d78145db458b85
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            /* twilio-ip-messaging.js 0.10. | 
| 1 | 
            +
            /* twilio-ip-messaging.js 0.10.1
         | 
| 2 2 | 
             
            The following license applies to all parts of this software except as
         | 
| 3 3 | 
             
            documented below.
         | 
| 4 4 |  | 
| @@ -4633,6 +4633,7 @@ function UserInfo(identity, uri, datasync, session) { | |
| 4633 4633 | 
             
              });
         | 
| 4634 4634 |  | 
| 4635 4635 | 
             
              EventEmitter.call(this);
         | 
| 4636 | 
            +
              this.setMaxListeners(0);
         | 
| 4636 4637 | 
             
            }
         | 
| 4637 4638 |  | 
| 4638 4639 | 
             
            inherits(UserInfo, EventEmitter);
         | 
| @@ -9958,229 +9959,229 @@ module.exports = function (obj) { | |
| 9958 9959 | 
             
            }());
         | 
| 9959 9960 |  | 
| 9960 9961 | 
             
            },{}],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 | 
            -
            }));
         | 
| 9962 | 
            +
            /*
         | 
| 9963 | 
            +
            * loglevel - https://github.com/pimterry/loglevel
         | 
| 9964 | 
            +
            *
         | 
| 9965 | 
            +
            * Copyright (c) 2013 Tim Perry
         | 
| 9966 | 
            +
            * Licensed under the MIT license.
         | 
| 9967 | 
            +
            */
         | 
| 9968 | 
            +
            (function (root, definition) {
         | 
| 9969 | 
            +
                "use strict";
         | 
| 9970 | 
            +
                if (typeof module === 'object' && module.exports && typeof _dereq_ === 'function') {
         | 
| 9971 | 
            +
                    module.exports = definition();
         | 
| 9972 | 
            +
                } else if (typeof define === 'function' && typeof define.amd === 'object') {
         | 
| 9973 | 
            +
                    define(definition);
         | 
| 9974 | 
            +
                } else {
         | 
| 9975 | 
            +
                    root.log = definition();
         | 
| 9976 | 
            +
                }
         | 
| 9977 | 
            +
            }(this, function () {
         | 
| 9978 | 
            +
                "use strict";
         | 
| 9979 | 
            +
                var noop = function() {};
         | 
| 9980 | 
            +
                var undefinedType = "undefined";
         | 
| 9981 | 
            +
             | 
| 9982 | 
            +
                function realMethod(methodName) {
         | 
| 9983 | 
            +
                    if (typeof console === undefinedType) {
         | 
| 9984 | 
            +
                        return false; // We can't build a real method without a console to log to
         | 
| 9985 | 
            +
                    } else if (console[methodName] !== undefined) {
         | 
| 9986 | 
            +
                        return bindMethod(console, methodName);
         | 
| 9987 | 
            +
                    } else if (console.log !== undefined) {
         | 
| 9988 | 
            +
                        return bindMethod(console, 'log');
         | 
| 9989 | 
            +
                    } else {
         | 
| 9990 | 
            +
                        return noop;
         | 
| 9991 | 
            +
                    }
         | 
| 9992 | 
            +
                }
         | 
| 9993 | 
            +
             | 
| 9994 | 
            +
                function bindMethod(obj, methodName) {
         | 
| 9995 | 
            +
                    var method = obj[methodName];
         | 
| 9996 | 
            +
                    if (typeof method.bind === 'function') {
         | 
| 9997 | 
            +
                        return method.bind(obj);
         | 
| 9998 | 
            +
                    } else {
         | 
| 9999 | 
            +
                        try {
         | 
| 10000 | 
            +
                            return Function.prototype.bind.call(method, obj);
         | 
| 10001 | 
            +
                        } catch (e) {
         | 
| 10002 | 
            +
                            // Missing bind shim or IE8 + Modernizr, fallback to wrapping
         | 
| 10003 | 
            +
                            return function() {
         | 
| 10004 | 
            +
                                return Function.prototype.apply.apply(method, [obj, arguments]);
         | 
| 10005 | 
            +
                            };
         | 
| 10006 | 
            +
                        }
         | 
| 10007 | 
            +
                    }
         | 
| 10008 | 
            +
                }
         | 
| 10009 | 
            +
             | 
| 10010 | 
            +
                // these private functions always need `this` to be set properly
         | 
| 10011 | 
            +
             | 
| 10012 | 
            +
                function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {
         | 
| 10013 | 
            +
                    return function () {
         | 
| 10014 | 
            +
                        if (typeof console !== undefinedType) {
         | 
| 10015 | 
            +
                            replaceLoggingMethods.call(this, level, loggerName);
         | 
| 10016 | 
            +
                            this[methodName].apply(this, arguments);
         | 
| 10017 | 
            +
                        }
         | 
| 10018 | 
            +
                    };
         | 
| 10019 | 
            +
                }
         | 
| 10020 | 
            +
             | 
| 10021 | 
            +
                function replaceLoggingMethods(level, loggerName) {
         | 
| 10022 | 
            +
                    /*jshint validthis:true */
         | 
| 10023 | 
            +
                    for (var i = 0; i < logMethods.length; i++) {
         | 
| 10024 | 
            +
                        var methodName = logMethods[i];
         | 
| 10025 | 
            +
                        this[methodName] = (i < level) ?
         | 
| 10026 | 
            +
                            noop :
         | 
| 10027 | 
            +
                            this.methodFactory(methodName, level, loggerName);
         | 
| 10028 | 
            +
                    }
         | 
| 10029 | 
            +
                }
         | 
| 10030 | 
            +
             | 
| 10031 | 
            +
                function defaultMethodFactory(methodName, level, loggerName) {
         | 
| 10032 | 
            +
                    /*jshint validthis:true */
         | 
| 10033 | 
            +
                    return realMethod(methodName) ||
         | 
| 10034 | 
            +
                           enableLoggingWhenConsoleArrives.apply(this, arguments);
         | 
| 10035 | 
            +
                }
         | 
| 10036 | 
            +
             | 
| 10037 | 
            +
                var logMethods = [
         | 
| 10038 | 
            +
                    "trace",
         | 
| 10039 | 
            +
                    "debug",
         | 
| 10040 | 
            +
                    "info",
         | 
| 10041 | 
            +
                    "warn",
         | 
| 10042 | 
            +
                    "error"
         | 
| 10043 | 
            +
                ];
         | 
| 10044 | 
            +
             | 
| 10045 | 
            +
                function Logger(name, defaultLevel, factory) {
         | 
| 10046 | 
            +
                  var self = this;
         | 
| 10047 | 
            +
                  var currentLevel;
         | 
| 10048 | 
            +
                  var storageKey = "loglevel";
         | 
| 10049 | 
            +
                  if (name) {
         | 
| 10050 | 
            +
                    storageKey += ":" + name;
         | 
| 10051 | 
            +
                  }
         | 
| 10052 | 
            +
             | 
| 10053 | 
            +
                  function persistLevelIfPossible(levelNum) {
         | 
| 10054 | 
            +
                      var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
         | 
| 10055 | 
            +
             | 
| 10056 | 
            +
                      // Use localStorage if available
         | 
| 10057 | 
            +
                      try {
         | 
| 10058 | 
            +
                          window.localStorage[storageKey] = levelName;
         | 
| 10059 | 
            +
                          return;
         | 
| 10060 | 
            +
                      } catch (ignore) {}
         | 
| 10061 | 
            +
             | 
| 10062 | 
            +
                      // Use session cookie as fallback
         | 
| 10063 | 
            +
                      try {
         | 
| 10064 | 
            +
                          window.document.cookie =
         | 
| 10065 | 
            +
                            encodeURIComponent(storageKey) + "=" + levelName + ";";
         | 
| 10066 | 
            +
                      } catch (ignore) {}
         | 
| 10067 | 
            +
                  }
         | 
| 10068 | 
            +
             | 
| 10069 | 
            +
                  function getPersistedLevel() {
         | 
| 10070 | 
            +
                      var storedLevel;
         | 
| 10071 | 
            +
             | 
| 10072 | 
            +
                      try {
         | 
| 10073 | 
            +
                          storedLevel = window.localStorage[storageKey];
         | 
| 10074 | 
            +
                      } catch (ignore) {}
         | 
| 10075 | 
            +
             | 
| 10076 | 
            +
                      if (typeof storedLevel === undefinedType) {
         | 
| 10077 | 
            +
                          try {
         | 
| 10078 | 
            +
                              var cookie = window.document.cookie;
         | 
| 10079 | 
            +
                              var location = cookie.indexOf(
         | 
| 10080 | 
            +
                                  encodeURIComponent(storageKey) + "=");
         | 
| 10081 | 
            +
                              if (location) {
         | 
| 10082 | 
            +
                                  storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
         | 
| 10083 | 
            +
                              }
         | 
| 10084 | 
            +
                          } catch (ignore) {}
         | 
| 10085 | 
            +
                      }
         | 
| 10086 | 
            +
             | 
| 10087 | 
            +
                      // If the stored level is not valid, treat it as if nothing was stored.
         | 
| 10088 | 
            +
                      if (self.levels[storedLevel] === undefined) {
         | 
| 10089 | 
            +
                          storedLevel = undefined;
         | 
| 10090 | 
            +
                      }
         | 
| 10091 | 
            +
             | 
| 10092 | 
            +
                      return storedLevel;
         | 
| 10093 | 
            +
                  }
         | 
| 10094 | 
            +
             | 
| 10095 | 
            +
                  /*
         | 
| 10096 | 
            +
                   *
         | 
| 10097 | 
            +
                   * Public API
         | 
| 10098 | 
            +
                   *
         | 
| 10099 | 
            +
                   */
         | 
| 10100 | 
            +
             | 
| 10101 | 
            +
                  self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
         | 
| 10102 | 
            +
                      "ERROR": 4, "SILENT": 5};
         | 
| 10103 | 
            +
             | 
| 10104 | 
            +
                  self.methodFactory = factory || defaultMethodFactory;
         | 
| 10105 | 
            +
             | 
| 10106 | 
            +
                  self.getLevel = function () {
         | 
| 10107 | 
            +
                      return currentLevel;
         | 
| 10108 | 
            +
                  };
         | 
| 10109 | 
            +
             | 
| 10110 | 
            +
                  self.setLevel = function (level, persist) {
         | 
| 10111 | 
            +
                      if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
         | 
| 10112 | 
            +
                          level = self.levels[level.toUpperCase()];
         | 
| 10113 | 
            +
                      }
         | 
| 10114 | 
            +
                      if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
         | 
| 10115 | 
            +
                          currentLevel = level;
         | 
| 10116 | 
            +
                          if (persist !== false) {  // defaults to true
         | 
| 10117 | 
            +
                              persistLevelIfPossible(level);
         | 
| 10118 | 
            +
                          }
         | 
| 10119 | 
            +
                          replaceLoggingMethods.call(self, level, name);
         | 
| 10120 | 
            +
                          if (typeof console === undefinedType && level < self.levels.SILENT) {
         | 
| 10121 | 
            +
                              return "No console available for logging";
         | 
| 10122 | 
            +
                          }
         | 
| 10123 | 
            +
                      } else {
         | 
| 10124 | 
            +
                          throw "log.setLevel() called with invalid level: " + level;
         | 
| 10125 | 
            +
                      }
         | 
| 10126 | 
            +
                  };
         | 
| 10127 | 
            +
             | 
| 10128 | 
            +
                  self.setDefaultLevel = function (level) {
         | 
| 10129 | 
            +
                      if (!getPersistedLevel()) {
         | 
| 10130 | 
            +
                          self.setLevel(level, false);
         | 
| 10131 | 
            +
                      }
         | 
| 10132 | 
            +
                  };
         | 
| 10133 | 
            +
             | 
| 10134 | 
            +
                  self.enableAll = function(persist) {
         | 
| 10135 | 
            +
                      self.setLevel(self.levels.TRACE, persist);
         | 
| 10136 | 
            +
                  };
         | 
| 10137 | 
            +
             | 
| 10138 | 
            +
                  self.disableAll = function(persist) {
         | 
| 10139 | 
            +
                      self.setLevel(self.levels.SILENT, persist);
         | 
| 10140 | 
            +
                  };
         | 
| 10141 | 
            +
             | 
| 10142 | 
            +
                  // Initialize with the right level
         | 
| 10143 | 
            +
                  var initialLevel = getPersistedLevel();
         | 
| 10144 | 
            +
                  if (initialLevel == null) {
         | 
| 10145 | 
            +
                      initialLevel = defaultLevel == null ? "WARN" : defaultLevel;
         | 
| 10146 | 
            +
                  }
         | 
| 10147 | 
            +
                  self.setLevel(initialLevel, false);
         | 
| 10148 | 
            +
                }
         | 
| 10149 | 
            +
             | 
| 10150 | 
            +
                /*
         | 
| 10151 | 
            +
                 *
         | 
| 10152 | 
            +
                 * Package-level API
         | 
| 10153 | 
            +
                 *
         | 
| 10154 | 
            +
                 */
         | 
| 10155 | 
            +
             | 
| 10156 | 
            +
                var defaultLogger = new Logger();
         | 
| 10157 | 
            +
             | 
| 10158 | 
            +
                var _loggersByName = {};
         | 
| 10159 | 
            +
                defaultLogger.getLogger = function getLogger(name) {
         | 
| 10160 | 
            +
                    if (typeof name !== "string" || name === "") {
         | 
| 10161 | 
            +
                      throw new TypeError("You must supply a name when creating a logger.");
         | 
| 10162 | 
            +
                    }
         | 
| 10163 | 
            +
             | 
| 10164 | 
            +
                    var logger = _loggersByName[name];
         | 
| 10165 | 
            +
                    if (!logger) {
         | 
| 10166 | 
            +
                      logger = _loggersByName[name] = new Logger(
         | 
| 10167 | 
            +
                        name, defaultLogger.getLevel(), defaultLogger.methodFactory);
         | 
| 10168 | 
            +
                    }
         | 
| 10169 | 
            +
                    return logger;
         | 
| 10170 | 
            +
                };
         | 
| 10171 | 
            +
             | 
| 10172 | 
            +
                // Grab the current global log variable in case of overwrite
         | 
| 10173 | 
            +
                var _log = (typeof window !== undefinedType) ? window.log : undefined;
         | 
| 10174 | 
            +
                defaultLogger.noConflict = function() {
         | 
| 10175 | 
            +
                    if (typeof window !== undefinedType &&
         | 
| 10176 | 
            +
                           window.log === defaultLogger) {
         | 
| 10177 | 
            +
                        window.log = _log;
         | 
| 10178 | 
            +
                    }
         | 
| 10179 | 
            +
             | 
| 10180 | 
            +
                    return defaultLogger;
         | 
| 10181 | 
            +
                };
         | 
| 10182 | 
            +
             | 
| 10183 | 
            +
                return defaultLogger;
         | 
| 10184 | 
            +
            }));
         | 
| 10184 10185 |  | 
| 10185 10186 | 
             
            },{}],61:[function(_dereq_,module,exports){
         | 
| 10186 10187 | 
             
            (function (global){
         | 
| @@ -11569,7 +11570,7 @@ process.umask = function() { return 0; }; | |
| 11569 11570 |  | 
| 11570 11571 | 
             
            },{}],67:[function(_dereq_,module,exports){
         | 
| 11571 11572 | 
             
            (function (global){
         | 
| 11572 | 
            -
            /*! https://mths.be/punycode v1.4. | 
| 11573 | 
            +
            /*! https://mths.be/punycode v1.4.1 by @mathias */
         | 
| 11573 11574 | 
             
            ;(function(root) {
         | 
| 11574 11575 |  | 
| 11575 11576 | 
             
            	/** Detect free variables */
         | 
| @@ -12057,7 +12058,7 @@ process.umask = function() { return 0; }; | |
| 12057 12058 | 
             
            		 * @memberOf punycode
         | 
| 12058 12059 | 
             
            		 * @type String
         | 
| 12059 12060 | 
             
            		 */
         | 
| 12060 | 
            -
            		'version': '1. | 
| 12061 | 
            +
            		'version': '1.4.1',
         | 
| 12061 12062 | 
             
            		/**
         | 
| 12062 12063 | 
             
            		 * An object of methods to convert from JavaScript's internal character
         | 
| 12063 12064 | 
             
            		 * representation (UCS-2) to Unicode code points, and back.
         | 
| @@ -19133,7 +19134,7 @@ function extend() { | |
| 19133 19134 | 
             
            },{}],98:[function(_dereq_,module,exports){
         | 
| 19134 19135 | 
             
            module.exports={
         | 
| 19135 19136 | 
             
              "name": "twilio-ip-messaging",
         | 
| 19136 | 
            -
              "version": "0.10. | 
| 19137 | 
            +
              "version": "0.10.1",
         | 
| 19137 19138 | 
             
              "description": "A library for Twilio IP messaging",
         | 
| 19138 19139 | 
             
              "main": "lib/index.js",
         | 
| 19139 19140 | 
             
              "repository": {
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: twilio_ip_messaging_rails
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.5
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Matt Aliabadi
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2016-04- | 
| 11 | 
            +
            date: 2016-04-13 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         |