SUSE/machinery — pull request #22 by cornelius (2014-08-01 20:50:00+00:00)
Title: Os refactoring

This refactors the representation of operating systems, so they can be used in the code in a more native way. It simplifies code and tests.

There are still a few things, which should be further refactored:

* The list of available operating systems is hard-coded in the SystemDescription class. This needs to be made dynamic and based on the available Os subclasses.
* The `check_build_compatible_host` method is currently in the unspecific `helper.rb` file. It should move to a more specific place, probably to a `LocalSystem.can_build(os_object)` method.
* The formatting of the error message for incompatible build hosts could be improved by adding some line breaks and putting out the list of supported systems as an actual list
* The `Os` objects are currently returned from the `SystemDescription.os_object` method. This should be merged with the `SystemDescription.os` method, which returns the `os` scope. This is the most challenging part. We need to introduce actual rich data model classes for this.

All these refactorings are out of the scope of this pull request.