The Amazing Mustermann

Build Status Coverage Status Code Climate Dependency Status 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

Pattern Types

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

Type Example Compatible with Notes
cake /:prefix/** CakePHP
express /:prefix+/:id(\d+) Express, pillar.js
flask /<prefix>/<int:id> Flask, Werkzeug
identity /image.png any software using strings Exact string matching (no parameter parsing).
pyramid /{prefix:.*}/{id} Pyramid, Pylons
rails /:slug(.:ext) Ruby on Rails, Journey, HTTP Router, Lotus, Scalatra (if configured)
regexp /(?<slug>[^\/]+) Oniguruma, Onigmo, regular expressions Created when you pass a regexp to Mustermann.new.
Does not support expanding or generating templates.
shell /*.{png,jpg} Unix Shell (bash, zsh) Does not support expanding or generating templates.
simple /:slug.:ext Sinatra (1.x), Scalatra, Dancer, HttpRouter (go) Implementation is a direct copy from Sinatra 1.3.
It is the predecessor of sinatra. Does not support expanding or generating templates.
sinatra /:slug(.:ext)? Sinatra (2.x), Padrino (>= 0.13.0), Pendragon, Angelo This is the default and the only type "invented here".
It is a superset of simple and has a common subset with template (and others).
uri-template /{+pre}/{page}{?q} RFC 6570, JSON API, JSON Home Documents and many more Standardized URI templates, can be generated from most other types.

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

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

There have been no stable releases yet. The code base is considered solid but I only know of a small number of actual production usage. As there has been no stable release yet, the API might still change, though I consider this unlikely.

Development Releases

  • Mustermann 0.3.1 (2014-09-12)
  • Mustermann 0.3.0 (2014-08-18)
    • More Infos: RubyGems.org, RubyDoc.info, GitHub.com
    • Add regexp pattern.
    • Add named splats to Sinatra patterns.
    • Add Mustermann::Mapper.
    • Improve duck typing support.
    • Improve documentation.
  • Mustermann 0.2.0 (2013-08-24)
    • More Infos: RubyGems.org, RubyDoc.info, GitHub.com
    • Add first class expander objects.
    • Add params casting for expander.
    • Add simple router and rack router.
    • Add weak equality map to significantly improve performance.
    • Fix Ruby warnings.
    • Improve documentation.
    • Refactor pattern validation, AST transformations.
    • Increase test coverage (from 100%+ to 100%++).
    • Improve JRuby compatibility.
    • Work around bug in 2.0.0-p0.
  • Mustermann 0.1.0 (2013-05-12)
    • More Infos: RubyGems.org, RubyDoc.info, GitHub.com
    • Add Pattern#expand for generating strings from patterns.
    • Add better internal API for working with the AST.
    • Improved documentation.
    • Avoids parsing the path twice when used as Sinatra extension.
    • Better exceptions for unknown pattern types.
    • Better handling of edge cases around extend.
    • More specs to ensure API stability.
    • Largely rework internals of Sinatra, Rails and Template patterns.
  • Mustermann 0.0.1 (2013-04-27)

Upcoming Releases

  • Mustermann 0.4.0 (next release with new features)
    • Add Pattern#to_proc.
    • Add Pattern#|, Pattern#& and Pattern#^.
    • Add Pattern#peek, Pattern#peek_size, Pattern#peek_match and Pattern#peek_params.
    • Add Mustermann::StringScanner.
    • Add Pattern#to_templates.
    • Add | syntax to sinatra templates.
    • Add template style placeholders to sinatra templates.
    • Add cake, express, flask and pyramid patterns.
    • Allow passing in additional value behavior directly to Pattern#expand.
  • Mustermann 1.0.0 (before Sinatra 2.0)
    • First stable release.