Refactor everything.

Loads of changes:

* Complete refactor/restructure.
* Renderers now autoload from `/renderers` dir, one file per renderer.
* `Accepts` / `Content-Type` now dynamic from above.
* Operations similar from `/operations` dir, one per operation. 
* `/operations` resource now dynamic from above.
* Express app now in FOAAS class, separate from server. FOAAS contains own version number.
* Specs for renderers/operations.
I mean fucking branch, but I'm currently in a bar this side of the world :)
On 28 Dec 2014 02:28, "Tom Cully" <tomhughcully@gmail.com> wrote:

> @petedmarsh awesome, PR to my fork?
> On 28 Dec 2014 02:26, "petedmarsh" <notifications@github.com> wrote:
>
>> In lib/renderers/xml.coffee
>> <https://github.com/tomdionysus/foaas/pull/57#discussion-diff-22292544>:
>>
>> > @@ -0,0 +1,16 @@
>> > +escapeXML = (s) ->
>> > +  s.replace(/([&<>'"])/g, (c) ->
>> > +    '&' + { '&': 'amp', '<': 'lt', '>': 'gt', "'": 'apos', '"': 'quot'}[c] + ';'
>> > +  )
>> > +
>> > +module.exports =
>> > +  name: 'XML'
>> > +  mime: 'application/xml'
>> > +
>>
>> @maetl <https://github.com/maetl> you're right, it's deliberately over
>> complicated - what better way to wrap a "fuck you" than in "fuck you" XML
>> :).
>>
>> I think that the xml namespace declaration is valid here (<foaas:response
>> xmlns:foaas="http://foaas.com/fuckoff">), if more verbose than it needs
>> to be.
>>
>> I've found an XML escaping library on NPM which looks like it will do the
>> job: https://www.npmjs.com/package/xml-escape.
>>
>> —
>> Reply to this email directly or view it on GitHub
>> <https://github.com/tomdionysus/foaas/pull/57/files#r22292544>.
>>
>