From d2a4611d1ecc8e631ab955017ae1d3f5a0a4c010 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 17 Mar 2014 00:43:13 -0700 Subject: [PATCH] Update vendor/backbone and vendor/requirejs. --- vendor/backbone/backbone.js | 13 ++++++------- vendor/backbone/test/router.js | 17 ++++++++++++++++- vendor/requirejs/LICENSE | 2 +- vendor/requirejs/require.js | 12 ++++++------ 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/vendor/backbone/backbone.js b/vendor/backbone/backbone.js index 3f7952b52..24a550a0a 100644 --- a/vendor/backbone/backbone.js +++ b/vendor/backbone/backbone.js @@ -1,4 +1,4 @@ -// Backbone.js 1.1.1 +// Backbone.js 1.1.2 // (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Backbone may be freely distributed under the MIT license. @@ -17,9 +17,8 @@ // Next for Node.js or CommonJS. jQuery may not be needed as a module. } else if (typeof exports !== 'undefined') { - var _ = require('underscore'), $; - try { $ = require('jquery'); } catch(e) {} - factory(root, exports, _, $); + var _ = require('underscore'); + factory(root, exports, _); // Finally, as a browser global. } else { @@ -42,7 +41,7 @@ var splice = array.splice; // Current version of the library. Keep in sync with `package.json`. - Backbone.VERSION = '1.1.1'; + Backbone.VERSION = '1.1.2'; // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns // the `$` variable. @@ -1293,7 +1292,7 @@ return optional ? match : '([^/?]+)'; }) .replace(splatParam, '([^?]*?)'); - return new RegExp('^' + route + '(?:\\?(.*))?$'); + return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$'); }, // Given a route, and a URL fragment that it matches, return the array of @@ -1450,7 +1449,7 @@ // but possibly useful for unit testing Routers. stop: function() { Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl); - clearInterval(this._checkUrlInterval); + if (this._checkUrlInterval) clearInterval(this._checkUrlInterval); History.started = false; }, diff --git a/vendor/backbone/test/router.js b/vendor/backbone/test/router.js index 37b7699bb..57e138d78 100644 --- a/vendor/backbone/test/router.js +++ b/vendor/backbone/test/router.js @@ -788,7 +788,22 @@ } } }); - var router = new Router; + new Router; + Backbone.history.start({pushState: true}); + }); + + test('newline in route', 1, function() { + location.replace('http://example.com/stuff%0Anonsense?param=foo%0Abar'); + Backbone.history.stop(); + Backbone.history = _.extend(new Backbone.History, {location: location}); + var Router = Backbone.Router.extend({ + routes: { + 'stuff\nnonsense': function() { + ok(true); + } + } + }); + new Router; Backbone.history.start({pushState: true}); }); diff --git a/vendor/requirejs/LICENSE b/vendor/requirejs/LICENSE index de4ee2963..668ac9161 100644 --- a/vendor/requirejs/LICENSE +++ b/vendor/requirejs/LICENSE @@ -6,7 +6,7 @@ provided below. The "New" BSD License: ---------------------- -Copyright (c) 2010-2013, The Dojo Foundation +Copyright (c) 2010-2014, The Dojo Foundation All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/requirejs/require.js b/vendor/requirejs/require.js index e7bc14d36..24b061e62 100644 --- a/vendor/requirejs/require.js +++ b/vendor/requirejs/require.js @@ -1,5 +1,5 @@ /** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.10 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. + * @license RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ @@ -12,7 +12,7 @@ var requirejs, require, define; (function (global) { var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.1.10', + version = '2.1.11', commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, jsSuffixRegExp = /\.js$/, @@ -141,7 +141,7 @@ var requirejs, require, define; throw err; } - //Allow getting a global that expressed in + //Allow getting a global that is expressed in //dot notation, like 'a.b.c'. function getGlobal(value) { if (!value) { @@ -567,7 +567,7 @@ var requirejs, require, define; mod.usingExports = true; if (mod.map.isDefine) { if (mod.exports) { - return mod.exports; + return (defined[mod.map.id] = mod.exports); } else { return (mod.exports = defined[mod.map.id] = {}); } @@ -583,7 +583,7 @@ var requirejs, require, define; config: function () { return getOwn(config.config, mod.map.id) || {}; }, - exports: handlers.exports(mod) + exports: mod.exports || (mod.exports = {}) }); } } @@ -1502,7 +1502,7 @@ var requirejs, require, define; /** * Called to enable a module if it is still in the registry * awaiting enablement. A second arg, parent, the parent module, - * is passed in for context, when this method is overriden by + * is passed in for context, when this method is overridden by * the optimizer. Not shown here to keep code compact. */ enable: function (depMap) {