Home

Awesome

The Amazing Mustermann

Build Status Coverage Status Code Climate Gem Version Inline docs Documentation License Badges

This repository contains multiple projects (each installable as separate gems).

Git versions with Bundler

You can easily use the latest edge version from GitHub of any of these gems via Bundler:

git 'https://github.com/rkh/mustermann.git' do
  gem 'mustermann'
  gem 'mustermann-rails'
end

<a name="-pattern-types"></a>

Pattern Types

The identity, regexp and sinatra types are included in the mustermann gem, all the other types have their own gems.

<table> <thead> <tr> <th>Type</th> <th>Example</th> <th>Compatible with</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <th><a href="mustermann-contrib/README.md#-mustermann-cake"><tt>cake</tt></a></th> <td><tt>/:prefix/**</tt></td> <td><a href="http://cakephp.org/">CakePHP</a></td> <td></td> </tr> <tr> <th><a href="mustermann-contrib/README.md#-mustermann-express"><tt>express</tt></a></th> <td><tt>/:prefix+/:id(\d+)</tt></td> <td> <a href="http://expressjs.com/">Express</a>, <a href="https://pillarjs.github.io/">pillar.js</a> </td> <td></td> </tr> <tr> <th><a href="mustermann-contrib/README.md#-mustermann-flask"><tt>flask</tt></a></th> <td><tt>/&lt;prefix&gt;/&lt;int:id&gt;</tt></td> <td> <a href="http://flask.pocoo.org/">Flask</a>, <a href="http://werkzeug.pocoo.org/">Werkzeug</a> </td> <td></td> </tr> <tr> <th><a href="mustermann/README.md#-identity-pattern"><tt>identity</tt></a></th> <td><tt>/image.png</tt></td> <td>any software using strings</td> <td> Exact string matching (no parameter parsing). </td> </tr> <tr> <th><a href="mustermann-contrib/README.md#-mustermann-pyramid"><tt>pyramid</tt></a></th> <td><tt>/{prefix:.*}/{id}</tt></td> <td> <a href="http://www.pylonsproject.org/projects/pyramid/about">Pyramid</a>, <a href="http://www.pylonsproject.org/projects/pylons-framework/about">Pylons</a> </td> <td></td> </tr> <tr> <th><a href="mustermann-contrib/README.md#-mustermann-rails"><tt>rails</tt></a></th> <td><tt>/:slug(.:ext)</tt></td> <td> <a href="http://rubyonrails.org/">Ruby on Rails</a>, <a href="https://github.com/rails/journey">Journey</a>, <a href="https://github.com/joshbuddy/http_router">HTTP Router</a>, <a href="http://hanamirb.org">Hanami</a>, <a href="http://scalatra.org/">Scalatra</a> (if <a href="http://scalatra.org/2.3/guides/http/routes.html#toc_248">configured</a>), <a href="https://github.com/alisnic/nyny">NYNY</a></td> <td></td> </tr> <tr> <th><a href="mustermann/README.md#-regexp-pattern"><tt>regexp</tt></a></th> <td><tt>/(?&lt;slug&gt;[^\/]+)</tt></td> <td> <a href="https://github.com/kkos/oniguruma">Oniguruma</a>, <a href="https://github.com/k-takata/Onigmo">Onigmo<a>, regular expressions </td> <td> Created when you pass a regexp to <tt>Mustermann.new</tt>.<br> Does not support expanding or generating templates. </td> </tr> <tr> <th><a href="mustermann-contrib/README.md#-mustermann-shell"><tt>shell</tt></a></th> <td><tt>/*.{png,jpg}</tt></td> <td>Unix Shell (bash, zsh)</td> <td>Does not support expanding or generating templates.</td> </tr> <tr> <th><a href="mustermann-contrib/README.md#-mustermann-simple"><tt>simple</tt></a></th> <td><tt>/:slug.:ext</tt></td> <td> <a href="http://www.sinatrarb.com/">Sinatra</a> (1.x), <a href="http://scalatra.org/">Scalatra</a>, <a href="http://perldancer.org/">Dancer</a>, <a href="http://twitter.github.io/finatra/">Finatra</a>, <a href="http://sparkjava.com/">Spark</a>, <a href="https://github.com/rc1/RCRouter">RCRouter</a>, <a href="https://github.com/kissjs/kick.js">kick.js</a> </td> <td> Implementation is a direct copy from Sinatra 1.3.<br> It is the predecessor of <tt>sinatra</tt>. Does not support expanding or generating templates. </td> </tr> <tr> <th><a href="mustermann/README.md#-sinatra-pattern"><tt>sinatra</tt></a></th> <td><tt>/:slug(.:ext)?</tt></td> <td> <a href="http://www.sinatrarb.com/">Sinatra</a> (2.x), <a href="http://padrinorb.com/">Padrino</a> (>= 0.13.0), <a href="https://github.com/namusyaka/pendragon">Pendragon</a>, <a href="https://github.com/kenichi/angelo">Angelo</a> </td> <td> <u>This is the default</u> and the only type "invented here".<br> It is a superset of <tt>simple</tt> and has a common subset with <tt>template</tt> (and others). </td> </tr> <tr> <th><a href="mustermann-contrib/README.md#-mustermann-uri-template"><tt>uri-template</tt></a></th> <td><tt>/{+pre}/{page}{?q}</tt></td> <td> <a href="https://tools.ietf.org/html/rfc6570">RFC 6570</a>, <a href="http://jsonapi.org/">JSON API</a>, <a href="http://tools.ietf.org/html/draft-nottingham-json-home-02">JSON Home Documents</a> and <a href="https://code.google.com/p/uri-templates/wiki/Implementations">many more</a> </td> <td>Standardized URI templates, can be <a href="mustermann/README.md#-generating-templates">generated</a> from most other types.</td> </tr> </tbody> </table>

Any software using Mustermann is obviously compatible with at least one of the above.

Requirements

Mustermann depends on tool (which has been extracted from Mustermann and Sinatra 2.0), and a Ruby 2.2+ compatible Ruby implementation.

It is known to work on MRI 2.2 through 2.7. JRuby and Rubinius support is unknown.

If you need Ruby 1.9 support, you might be able to use the unofficial mustermann19 gem based on namusyaka's fork.

Release History

Mustermann follows Semantic Versioning 2.0. Anything documented in the README or via YARD and not declared private is part of the public API.

Stable Releases

Development Releases