guardian/frontend — pull request #4778 by janua (2014-06-19 11:34:10+00:00)
Title: Start pressing draft collection

This PR introduces the pressing of draft collections coming from the draft Content API.

At the moment, this is pressing draft off the `LIVE` Content API, meaning there is no draft content anywhere yet. But we will soon switch over the draft pressing and `facia-tool` to use the draft Content API.

For draft, we now have two instances of things (traits/objects);

- `LiveContentApi` and `DraftContentApi`; both `ContentApiClient`
- A `LiveCollections` and `DraftCollections` objects both extending `ParseCollection`; this is where all the requesting for the items is done. Each uses the appropriate Content API client
- `FaciaJsonDraft` and `FrontJsonLive` for the reading of the `pressed.json` files
- `FaciaController` and `FaciaDraftController` for the serving of the `pressed.json` files

#### Draft objects
Some of the objects are only available in `facia-tool` and `preview` so that no one could misuse them.

- `DraftContentApi` only exists in `facia-tool`
- `FaciaDraftController` and `FrontJsonDraft` only exist in `preview`

#### Other
I have also taken the opportunity to refactor:
- Start using new types for pressing via `PressCommand` and `PressResult`. There is some logic that I will start moving into these objects.
- `FaciaController`(s) now go straight to `FrontPress` instead of going through `FrontPressJob`
- `FrontPressJob` logic moved to `FrontPress` where it belongs, and this cleaned up using `PressCommand`.
- `FaciaToolDraftPressSwitch` for switching on and off the pressing of the `pressed.json`
- Move more data into `CollectionMeta`. (`Collection` should probably just hold a `CollectionMeta` object)

##### Caution
The address within the bucket has now changed. If this went out in the current state, there would be nothing to serve for `facia` because it would be trying to serve from a `/live/` namespace from the bucket. I will copy the prod data over at deploy time. This would be fixed quite quickly automatically anyway via the cron jobs; ~3 minutes.

@robertberry @stephanfowler