Skip to content

Commit

Permalink
0.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdave committed Oct 13, 2014
1 parent 0f932fb commit 34c17b1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Subroute is lightweight, weighing in at under 300 bytes minified and gzipped.

## Downloads

*Latest Stable Release: 0.4.3*
*Latest Stable Release: 0.4.5*

* Minified: [backbone.subroute.min.js](https://raw.github.com/ModelN/backbone.subroute/0.4.3/dist/backbone.subroute.min.js)
* Development (Uncompressed, Comments): [backbone.subroute.js](https://raw.github.com/ModelN/backbone.subroute/0.4.3/backbone.subroute.js)
* Full Release (Tests, Examples): [0.4.2.zip](https://github.com/ModelN/backbone.subroute/archive/0.4.3.zip).
* Minified: [backbone.subroute.min.js](https://raw.github.com/ModelN/backbone.subroute/0.4.5/dist/backbone.subroute.min.js)
* Development (Uncompressed, Comments): [backbone.subroute.js](https://raw.github.com/ModelN/backbone.subroute/0.4.5/backbone.subroute.js)
* Full Release (Tests, Examples): [0.4.5.zip](https://github.com/ModelN/backbone.subroute/archive/0.4.5.zip).

*Unreleased Edge Version (master)*

Expand Down Expand Up @@ -119,9 +119,9 @@ Let's say that you've got a section of your web app multiple pieces of functiona
```
var BooksRouter = Backbone.SubRoute.extend({
routes: {
"" : "showBookstoreHomepage",
"search" : "searchBooks",
"view/:bookId" : "viewBookDetail",
"" : "showBookstoreHomepage",
"search" : "searchBooks",
"view/:bookId" : "viewBookDetail",
},
showBookstoreHomepage: function() {
// ...module-specific code
Expand Down Expand Up @@ -215,13 +215,18 @@ The test specs can also be run online [here](http://modeln.github.com/backbone.s

## Version History

### 0.4.5
*Released 13 October 2014*

* Actually [export the router](https://github.com/ModelN/backbone.subroute/pull/44) when used as CommonJS module (Thanks, [xMartin](https://github.com/xMartin)!)

### 0.4.4
*Released 1 September 2014*

* Add official bower support
* Add grunt-version to dev dependencies

### 0.4.3
### 0.4.3
*Released 9 May 2014*

* Fix [issue 38](https://github.com/ModelN/backbone.subroute/issues/38) due to minified dist file being out-of-sync from latest source.
Expand Down Expand Up @@ -253,7 +258,7 @@ The test specs can also be run online [here](http://modeln.github.com/backbone.s
### 0.3.1
*Released 26 October 2012*

* Fixed [Issue #13](https://github.com/ModelN/backbone.subroute/issues/13). This was an IE8-only issue where manually
* Fixed [Issue #13](https://github.com/ModelN/backbone.subroute/issues/13). This was an IE8-only issue where manually
including a trailing slash in a subroute prefix caused a double slash to appear in the fully-qualified route.
Thanks to [@mikesnare](https://github.com/mikesnare) for logging the issue and providing the fix!
* Added Jasmine test specs for above case
Expand Down
12 changes: 6 additions & 6 deletions backbone.subroute.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// backbone-subroute 0.4.4
// backbone-subroute 0.4.5
//
// Copyright (C) 2012 Dave Cadwallader, Model N, Inc.
// Copyright (C) 2012 Dave Cadwallader, Model N, Inc.
// Distributed under the MIT License
//
// Documentation and full license available at:
Expand Down Expand Up @@ -30,7 +30,7 @@

// SubRoute instances may be instantiated using a prefix with or without a trailing slash.
// If the prefix does *not* have a trailing slash, we need to insert a slash as a separator
// between the prefix and the sub-route path for each route that we register with Backbone.
// between the prefix and the sub-route path for each route that we register with Backbone.
this.separator = (prefix.slice(-1) === "/") ? "" : "/";

// if you want to match "books" and "books/" without creating separate routes, set this
Expand All @@ -48,7 +48,7 @@
hash = Backbone.history.getHash();
}

// Trigger the subroute immediately. this supports the case where
// Trigger the subroute immediately. this supports the case where
// a user directly navigates to a URL with a subroute on the first page load.
// Check every element, if one matches, break. Prevent multiple matches
_.every(this.routes, function(key, route) {
Expand All @@ -75,7 +75,7 @@
Backbone.Router.prototype.navigate.call(this, route, options);
},
route: function(route, name, callback) {
// strip off any leading slashes in the sub-route path,
// strip off any leading slashes in the sub-route path,
// since we already handle inserting them when needed.
if (route.substr(0) === "/") {
route = route.substr(1, route.length);
Expand All @@ -97,7 +97,7 @@
// remove the un-prefixed route from our routes hash
delete this.routes[route];

// add the prefixed-route. note that this routes hash is just provided
// add the prefixed-route. note that this routes hash is just provided
// for informational and debugging purposes and is not used by the actual routing code.
this.routes[_route] = name;

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backbone.subroute",
"version": "0.4.4",
"version": "0.4.5",
"main": "dist/backbone.subroute.min.js",
"ignore": [
"spec",
Expand Down
2 changes: 1 addition & 1 deletion dist/backbone.subroute.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "backbone.subroute",
"description": "Backbone.subroute extends the functionality of Backbone.router such that each of an application's modules can define its own module-specific routes.",
"version": "0.4.4",
"version": "0.4.5",
"homepage": "https://github.com/ModelN/backbone.subroute",
"author": {
"name": "Dave Cadwallader",
Expand Down Expand Up @@ -34,16 +34,16 @@
"grunt": "~0.4",
"grunt-cli": "~0.1",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-jasmine": "^0.7.0",
"grunt-contrib-jasmine": "^0.8.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.5.1",
"grunt-contrib-uglify": "^0.6.0",
"grunt-jsbeautifier": "~0.2.2",
"grunt-template-jasmine-istanbul": "^0.3.0",
"grunt-template-jasmine-requirejs": "^0.2.0",
"grunt-version": "^0.3.0",
"jasmine-sinon": "^0.4.0",
"sinon": "^1.10.3",
"underscore": "^1.6.0",
"grunt-version": "^0.3.0"
"underscore": "^1.6.0"
},
"keywords": [
"backbone",
Expand Down

0 comments on commit 34c17b1

Please sign in to comment.