soveran/cuba — pull request #27 by vic (2013-12-03 03:56:36+00:00)
Title: Only set response status to 200 if ever written to response.

Cuba should not have have that "tricky behaviour" as stated on
the current README.md file.

If you have a Cuba app like:

```ruby
on get do
on "hello" do
res.wirte "world"
end
end
```

Content is only written for `GET /hello` so if you request
`GET /` Cuba shouldn't set the status code to 200 unless user
explicitly wrote something to the response or explicitly set
the response status to anything other than 404.

This commit makes a change to Cuba to set status 200 only then
a `res.write` is performed, having the status to fallback to 404.

I guess we should change the documentation to reflect this,
we could still use some of the examples on the README.md to
demo some of Cuba composition features, but having this status
issue fixed adheres to the principle of least astonishment.