CARVIEW |
Select Language
HTTP/2 200
server: nginx
date: Sun, 17 Aug 2025 20:57:08 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Wed, 12 Aug 2009 08:06:41 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 168ms
x-archive-orig-etag: "0cfadeee74ddbce06bbc8284e6822f78"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 24750
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Wed, 12 Aug 2009 08:06:43 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 04 Apr 2009 04:01:12 GMT", ; rel="prev memento"; datetime="Sat, 08 Aug 2009 20:33:57 GMT", ; rel="memento"; datetime="Wed, 12 Aug 2009 08:06:43 GMT", ; rel="next memento"; datetime="Fri, 18 Sep 2009 06:55:28 GMT", ; rel="last memento"; datetime="Fri, 18 Sep 2009 06:55:28 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_11_20090811182134_crawl101.gpg-c/52_11_20090812080538_crawl101.arc.gz
server-timing: captures_list;dur=0.772688, exclusion.robots;dur=0.031686, exclusion.robots.policy;dur=0.019671, esindex;dur=0.012261, cdx.remote;dur=5.952214, LoadShardBlock;dur=414.309987, PetaboxLoader3.datanode;dur=942.097192, PetaboxLoader3.resolve;dur=153.454719, load_resource;dur=838.147386
x-app-server: wwwb-app200
x-ts: 200
x-tr: 1341
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app200; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
josh's rack-mount at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Run the following if you haven't already:
gem sources -a https://gems.github.com
Install the gem(s):
sudo gem install josh-rack-mount
Description: | Stackable dynamic tree based Rack router edit |
Homepage: | https://josh.github.com/rack-mount edit |
Public Clone URL: |
git://github.com/josh/rack-mount.git
Give this clone URL to anyone.
git clone git://github.com/josh/rack-mount.git
|
Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:josh/rack-mount.git
|
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Tue May 26 14:23:53 -0700 2009 | replace internal nested set with multimap [josh] |
![]() |
MIT-LICENSE | Tue Feb 17 12:23:12 -0800 2009 | first commit [josh] |
![]() |
README.rdoc | Sun Jul 26 19:52:35 -0700 2009 | new generate api for generating isolated condit... [josh] |
![]() |
Rakefile | Sat Jul 25 17:06:13 -0700 2009 | stop tracking rack router tests [josh] |
![]() |
lib/ | Thu Aug 06 20:57:04 -0700 2009 | no need to freeze garbage produced by key split... [josh] |
![]() |
rack-mount.gemspec | Sun Jul 26 14:12:31 -0700 2009 | add multimap dependency [josh] |
![]() |
rails/ | Fri Jul 31 16:41:12 -0700 2009 | drop condition wrapper [josh] |
![]() |
test/ | Thu Aug 06 19:40:49 -0700 2009 | freeze isn't everything [josh] |
README.rdoc
Rack::Mount
A stackable dynamic tree based Rack router.
Rack::Mount supports Rack’s Cascade style of trying several routes until it finds one that is not a 404. This allows multiple routes to be nested or stacked on top of each other. Since the application endpoint can trigger the router to continue matching, middleware can be used to add arbitrary conditions to any route. This allows you to route based on other request attributes, session information, or even data dynamically pulled from a database.
Usage
Rack::Mount provides a plugin API to build custom DSLs on top of.
The API is extremely minimal and only 3 methods are exposed as the public API.
Rack::Mount::RouteSet#add_route: | builder method for adding routes to the set |
Rack::Mount::RouteSet#call: | Rack compatible recognition and dispatching method |
Rack::Mount::RouteSet#url: | generates path from identifiers or significant keys |
Example
require 'rack/mount' Routes = Rack::Mount::RouteSet.new do |set| # add_route takes a rack application and conditions to match with # conditions may be strings or regexps # See Rack::Mount::RouteSet#add_route for more options. set.add_route FooApp, :method => 'get' :path => %{/foo} end # The route set itself is a simple rack app you mount run Routes
This feature is coming soon. Sit tight!