puppetlabs/razor-server — pull request #165 by daniel-pittman (2014-03-27 23:02:39+00:00)
Title: Migrate to a separate "command" class

Commands were previously defined with a trivial DSL in the app.rb file, which
worked reasonably well while we had a fairly small and simple set of commands.

With the addition of a validation framework, though, this began to get
cumbersome, and as we extend the set of features that are "about" commands,
rather than commands themselves (eg: help, documentation, browsing), this
becomes harder and harder to keep sensibly structured.

The goal of this series of changes is to move away from a single file
definition into something more, well, OO-based: a single class per command,
defining the basic behaviour of an individual request.

This also allows us to attach metadata about the command to the same place,
such as schema definition for validation, help generation and text, and
so forth.

https://tickets.puppetlabs.com/browse/RAZOR-179

Signed-off-by: Daniel Pittman