CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 03 Sep 2025 02:23:15 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100110001242
location: https://web.archive.org/web/20100110001242/https://github.com/josh/rack-mount
server-timing: captures_list;dur=0.517462, exclusion.robots;dur=0.019372, exclusion.robots.policy;dur=0.008693, esindex;dur=0.010194, cdx.remote;dur=5.085174, LoadShardBlock;dur=259.835905, PetaboxLoader3.datanode;dur=118.524947, PetaboxLoader3.resolve;dur=87.039934
x-app-server: wwwb-app204
x-ts: 302
x-tr: 293
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app204; 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=()
HTTP/2 200
server: nginx
date: Wed, 03 Sep 2025 02:23:16 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sun, 10 Jan 2010 00:12:42 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "7b9681833293f0b11b1b62f32c28bfca"
x-archive-orig-x-runtime: 88ms
x-archive-orig-content-length: 23681
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 10 Jan 2010 00:12:42 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sun, 05 Jul 2009 06:02:48 GMT", ; rel="prev memento"; datetime="Sun, 06 Dec 2009 03:59:38 GMT", ; rel="memento"; datetime="Sun, 10 Jan 2010 00:12:42 GMT", ; rel="next memento"; datetime="Thu, 11 Feb 2010 16:19:13 GMT", ; rel="last memento"; datetime="Fri, 27 Jun 2025 06:01:09 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: 51_13_20100109204637_crawl103_IndexOnly-c/51_13_20100110001226_crawl101.arc.gz
server-timing: captures_list;dur=0.502081, exclusion.robots;dur=0.020723, exclusion.robots.policy;dur=0.010633, esindex;dur=0.009755, cdx.remote;dur=76.066498, LoadShardBlock;dur=205.304335, PetaboxLoader3.datanode;dur=136.848764, PetaboxLoader3.resolve;dur=169.017081, load_resource;dur=189.463370
x-app-server: wwwb-app204
x-ts: 200
x-tr: 528
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
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
josh / rack-mount
- Source
- Commits
- Network (4)
- Issues (0)
- Graphs
-
Branch:
master
name | age | message | |
---|---|---|---|
![]() |
LICENSE | Fri Oct 09 21:46:15 -0700 2009 | just LICENSE [josh] |
![]() |
README.rdoc | Thu Nov 12 20:26:07 -0800 2009 | fix syntax error in readme [josh] |
![]() |
Rakefile | Thu Dec 24 09:02:55 -0800 2009 | no mg [josh] |
![]() |
benchmark/ | Thu Dec 03 22:28:47 -0800 2009 | avoid double parsing regexp on construction [josh] |
![]() |
lib/ | Sat Jan 09 08:24:37 -0800 2010 | update reginald [josh] |
![]() |
rack-mount.gemspec | Sat Jan 09 08:25:08 -0800 2010 | 0.4.2 release [josh] |
![]() |
test/ | Thu Dec 24 13:24:33 -0800 2009 | fix marshaling after optimizations are in place [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!