
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
= Rack::Mount
A stackable dynamic tree based Rack router.
Rack::Mount supports Rack's +X-Cascade+ convention to continue trying routes if the response returns +pass+. 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#generate:: generates a route condition 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 # # valid conditions methods are any method on Rack::Request # the values to match against may be strings or regexps # # See Rack::Mount::RouteSet#add_route for more options. set.add_route FooApp, { :request_method => 'GET', :path_info => %r{^/foo$} }, {}, :foo end
run Routes
Routes.generate(:path_info, :foo) #=> "/foo"
FAQs
Unknown package
We found that rack-mount demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.