Create basic test suite for simple requests
Enable coverage for test runs
Expand tests to cover preflight requests
Update todo in the documentation
Provide shortcut target for running common test
Add configuration for Travis CI
Merge pull request #3 from danielwhite/tests

Provide a test suite for simple and preflight requests
Replace 'R16B01' with 'R16B' in travis configuration

For some reason, this OTP release is not available at the moment.
Fix typo in travis configuration

Erlang releases should have been a list.  For some reason
`travis-lint` did not complain about this problem.
Fix accidental change back to using R16B01 for Travis CI
Remove unnecessary match when checking allowed headers

If none are allowed _and_ headers are requested, then the first check
will fail anyway.
Simplify default cases for optional callbacks

Instead of handling 'no_call' everywhere, provide a means of
specifying a default value instead.  This achieves the same
functionality in most cases without the extra cases to handle.
Simplify interface for policy callbacks

The behaviour already makes it clear that the module is intended for
cross-origin policy definitions.  As such, it is clearer if every
callback is not prefixed with 'cors_'.

This ends up with policies being stylisticly similar to the
cowboy_rest handler.
Remove {shutdown, Req} as valid return for cowboy_cors_policy:policy_init/1

Right now, I'm not sure there is a genuine need for this, so removed
until such a time this has a definite use case.
Bump version due to interface changes
Merge pull request #4 from danielwhite/tighten-interface

Tighten the interface for policies
Simplify exposed_headers logic
Return 204 from test handler instead of 200

This is intended to make it possible to more easily determine a
pre-flight response from a response that reached the handler.
Fix the handling differences between simple and pre-flight requests

As a result, one test was changed as we were incorrectly processing
OPTIONS requests without the `Access-Control-Request-Methods` header
as a pre-flight request.

Note that the setting of the `Access-Control-Allow-Origin` and
`Access-Control-Allow-Credentials` in a different order to the spec
doesn't change the final outcome.
Do not forward pre-flight requests to handlers

This request is only used by the client to determine if it is allowed
to send a cross-origin request.  In the case of OPTIONS, then the
client will send a second OPTIONS request that should then be served
by the handler.

In the meantime, the preflight tests for a default policy have been
abandoned because it is unclear whether or not to pass a request to
the handler when the origin does not match.