mdsol/crichton-representors — pull request #16 by jcarres-mdsol (2014-05-29 14:11:13+00:00)
Title: Feature/no media type

This PR is aimed at making a simpler implementation of the serializer magic.
There is a lot of cleanup still to do specially in the specs but this was all done in a hurry so today you can take a look at this and tell me if I am deleting too much or not.

The changes are:
- Make serialization much easier
- Do not include it into Representor to avoid polluting it, instead add a to_media_type method that will call it.
- Delete stuff related to be able to render in different media types like .json and .yaml. We may need it but not sure if should be done in the same class versus specialized classes. In any case it can come in a PR later instead of the big PR we are reviewing these days

In the future I want to rename serialization as Serializer so we will have a pair Deserializer and Serializer and this will work:
```Ruby
expect(Serializer.build(:hal, Deserializer.build(:hal, document).to_representor).to_media_type).to eq(document)
```
I think the factory classes are the easiest way to use this library and noone should know about the HalSerializer or HalDeserializer classes.

Also I need to dry up the FormatSerializer and FormatDeserializer classes so we only have one.

@fosdev @sheavalentine-mdsol @brutski please review