diff --git a/.travis.yml b/.travis.yml index c8e76d5a8..b9d6964b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,5 @@ node_js: - 0.6 - 0.8 before_script: - - "curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/bestiejs/lodash/git/blobs/aa29a2ecf6f51d4da5a2a418c0d4ea0e368ee80d | tar xvz -C vendor" - - "curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/bestiejs/lodash/git/blobs/9869c4443fb22598235d1019fcc8245be41e8889 | tar xvz -C vendor" + - "curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/bestiejs/lodash/git/blobs/a2787b470c577cee2404d186c562dd9835f779f5 | tar xvz -C vendor" + - "curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/bestiejs/lodash/git/blobs/3390b259e04829538e4d3635d12b317dd6103eca | tar xvz -C vendor" diff --git a/build/post-install.js b/build/post-install.js index 7b995b206..28f008b01 100644 --- a/build/post-install.js +++ b/build/post-install.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -;(function () { +;(function() { 'use strict'; /** Load Node modules */ @@ -17,10 +17,10 @@ var vendorPath = path.join(basePath, 'vendor'); /** The Git object ID of `closure-compiler.tar.gz` */ - var closureId = 'aa29a2ecf6f51d4da5a2a418c0d4ea0e368ee80d'; + var closureId = 'a2787b470c577cee2404d186c562dd9835f779f5'; /** The Git object ID of `uglifyjs.tar.gz` */ - var uglifyId = '9869c4443fb22598235d1019fcc8245be41e8889'; + var uglifyId = '3390b259e04829538e4d3635d12b317dd6103eca'; /** The media type for raw blob data */ var mediaType = 'application/vnd.github.v3.raw'; diff --git a/test/test-build.js b/test/test-build.js index c60c770da..8fb370697 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -561,7 +561,7 @@ }); }); - asyncTest('debug custom', function () { + asyncTest('debug custom', function() { var start = _.once(QUnit.start); build(['-d', '-s', 'backbone'], function(source, filePath) { equal(path.basename(filePath, '.js'), 'lodash.custom'); @@ -577,7 +577,7 @@ }); }); - asyncTest('minified custom', function () { + asyncTest('minified custom', function() { var start = _.once(QUnit.start); build(['-m', '-s', 'backbone'], function(source, filePath) { equal(path.basename(filePath, '.js'), 'lodash.custom.min'); diff --git a/vendor/backbone/backbone.js b/vendor/backbone/backbone.js index d1ce4f538..50deb5922 100644 --- a/vendor/backbone/backbone.js +++ b/vendor/backbone/backbone.js @@ -988,8 +988,8 @@ } }; - // Cached regex for cleaning leading hashes and slashes. - var routeStripper = /^[#\/]|\s+$/; + // Cached regex for stripping a leading hash/slash and trailing space. + var routeStripper = /^[#\/]|\s+$/g; // Cached regex for stripping leading and trailing slashes. var rootStripper = /^\/+|\/+$/g; diff --git a/vendor/backbone/test/router.js b/vendor/backbone/test/router.js index 32d4ff4c3..f9327fcc3 100644 --- a/vendor/backbone/test/router.js +++ b/vendor/backbone/test/router.js @@ -497,4 +497,9 @@ $(document).ready(function() { strictEqual(history.getFragment('fragment '), 'fragment'); }); + test("#1820 - Leading slash and trailing space.", 1, function() { + var history = new Backbone.History; + strictEqual(history.getFragment('/fragment '), 'fragment'); + }); + });