Skip to content

Commit

Permalink
added globs to readme, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
kieran committed Feb 19, 2012
1 parent f2815b8 commit a87cf5e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Readme.md
Expand Up @@ -63,6 +63,24 @@ router.match( '/products/:id(.:format)', 'GET' )
.to( 'products.show' ) .to( 'products.show' )
``` ```


### Globs (they also capture slashes)

```javascript
router.match( '/*path', 'GET' )
.to( 'errors.notFound' )

router.first( '/somewhere/that/four-oh-fours', 'GET' )
// -> { controller:'errors', action:'notFound', path:'somewhere/that/four-oh-fours' }


router.match( '/*path(.:format)', 'GET' )
.to( 'errors.notFound' )

router.first( '/somewhere/that/four-oh-fours.json', 'GET' )
// -> { controller:'errors', action:'notFound', path:'somewhere/that/four-oh-fours', format:'json' }

```

### Match conditions ### Match conditions


```javascript ```javascript
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{ {
"name": "barista", "name": "barista",
"description": "URL router & generator, similar to Rails / merb", "description": "URL router & generator, similar to Rails / merb",
"version": "0.0.4", "version": "0.0.5",
"author": "Kieran Huggins <kieran@kieran.ca>", "author": "Kieran Huggins <kieran@kieran.ca>",
"repository": "git://github.com/kieran/barista", "repository": "git://github.com/kieran/barista",
"main": "./index.js", "main": "./index.js",
Expand Down

0 comments on commit a87cf5e

Please sign in to comment.