Merge pull request #6 from maxf/master

2 small fixes to json example
Fix .ruby-version file

The file was misnamed so wasn't having any effect.
Merge pull request #7 from alphagov/fix_ruby_version_file

Fix .ruby-version file
Basic controller to accept a court

Includes a couple of tests for the happy path of a named court. For now,
we're only planning to do the minimum amount of validation necessary to
send the court to the content store.
Fix the capitalisation of the app's top module
Send a court to the publishing API

This is as basic as humanly possible while still sending something valid
to the publishing API (lumping everything into the controller rather
than adding a separate model layer, for example), but it works.
Stop the tests making real HTTP requests

That would be bad.
Require a slug to be present in the request JSON

Return 422 if it isn't present. We need the slug to construct the
base_path for the publishing API.
Require a name to be present in the request JSON

The content-store validates that title is present for renderable content.
Return 400 if the request JSON is unparseable
Include the published URL in the response

We're explicitly calling to_s on the published URL because Rails
serializes it as the hash of its elements otherwise.
Parse request body in a before filter
Use symbols in hash keys
Use single quotes everywhere possible in our code

ie everywhere except where we're using string interpolation, or raw
JSON, or an occasional spec description which includes quotes.

* WARNING: personal opinions may be present*

I find single quotes easier to read in general, and like to be able to
see at a glance from the quotes whether or not a particular string uses
interpolation. We've been following this rule in Transition for some time,
only using double quotes where necessary.

This does contradict our style guide, which comes down in favour of
double quotes, or at least not using both near each other:

    https://github.com/alphagov/styleguides/blob/f88150845037cae27f5c23d666e43f1081fc96f7/ruby.md#strings
Use the have_http_status matcher instead of be_

This has the advantage of being more explicit in the tests, and also
gives more informative output for test failures: you see the actual
value, rather than just 'false is not true'-type errors.
Merge pull request #8 from alphagov/court-publishing

Court publishing
Clarify PUT step in README
Check that Content-Type is application/json

This is the original commit from the HMRC manuals API which disabled
ParamsParser - the other reasons given there will apply here soon, but
for now I've rewritten the comment to be more applicable to our current
situation:

    https://github.com/alphagov/hmrc-manuals-api/commit/61e4a4dbac267e20c16462ab8e27306d295a76d1
Introduce a put_json request helper for tests

This sets the Content-Type header to application/json and converts
a hash to JSON for the body, so that the tests themselves are much
cleaner.

This is also taken from the HMRC manuals API:

    https://github.com/alphagov/hmrc-manuals-api/blob/4f74b181a406424b954836465d2bac0f76edce60/spec/support/json_request_helpers.rb#L2-L9
Check that the client accepts JSON

We are only supporting JSON responses to PUT requests, so check
beforehand that the client will accept JSON and return 406 (Not
Acceptable) if it doesn't.