Having the jekyll assets here is a mistake, because they need to be versioned
separately to the spec: we keep old versions of the spec, but they sometimes
need to be restyled to match the latest website.
There are a few parts to this:
* when we generate the spec for a particular git sha, also run the script which
turns our yaml api descriptions into a swagger json file.
* tweak serveSpec to add another header when serving the generated json.
* add a link to the generated index which will (via js hackery) redirect to our
hosted swagger UI at http://matrix.org/docs/api/client-server, with a "url"
query-param pointing at the generated json.
Also, factor makeTempDir out of gitClone, so that we can give clearer log lines.
We're licensing hte spec under ASLv2. Add the LICENSE file, and add the
short-form to as much of the source as is practical right now (adding it to
json source is a massive pita).
Fix the speculator so that it doesn't blow up when it finds subdirs in the gen
directory.
(It doesn't handle the html diff very well in the case that the subdirs don't
match, but it's hard to do much about that)
I want to change the URLs for the spec sections on the website from
<version>/<section>.html to <section>/<version>.html, to better reflect how we
do the versioning.
This puts each bit of spec in its own directory, updates the index to point to
the right place, and fixes continuserv to deal with directories as well as
files.
This will probably require fixes to the speculator too, but I'll have to come
back to that.
Make the argument to dump-swagger.py be the name of the output file rather than
the output dir, and give it a sensible default.
Also, use the absolute path to the output file, so that the output path is
relative to the user's cwd rather than the templating dir.
rather than trying to watch half the filesystem, be a bit more conservative in
what we put watches on. This means that we don't end up dying with "No space on
device" (thanks for that, Linux.)