Add the ability to override the default handler class

This way, you can subclass Endpoint and configure your API to use it as
the default.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Decouple API from Endpoint

Endpoint DSL methods have been moved to the Endpoint class, and the
Endpoint class will automatically be subclassed in new APIs and at every
change in scope. APIs delegate missing class methods to Endpoint
configuration.

This could allow Endpoint to become a simple protocol that could be
swapped out for a completely custom implementation.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Merge pull request #50 from crepe/custom-endpoint-subclass

Decouple/Override Endpoint
Move #helper to API, simplify #let on endpoint

Calling #helper directly on Endpoint doesn't make much sense, since
you can simply define methods if you've subclassed Endpoint. It's
really only something that's used as an API DSL method.

Now that we're class_eval'ing the helper block directly on the
endpoint subclass, we can support defining lets in the helper block.

Signed-off-by: Stephen Celis <stephen.celis@gmail.com>
Signed-off-by: Evan Owen <kainosnoema@gmail.com>
Simplify calling of let! using before callback and to_proc

Signed-off-by: Evan Owen <kainosnoema@gmail.com>
Rename API.config[:handler] to API.config[:endpoint]

"handler" is a little too vague and easily confused with the
endpoint handler block.

Signed-off-by: Evan Owen <kainosnoema@gmail.com>
Rename Endpoint.handle to Endpoint.respond

Just a bit friendlier, especially when subclassing:

    class UserEndpoint < Crepe::Endpoint
      respond { User.all }
    end

Signed-off-by: Evan Owen <kainosnoema@gmail.com>
Merge pull request #58 from crepe/renaming

Rename a couple endpoint config and class method names
Alignment

Signed-off-by: Stephen Celis <stephen@stephencelis.com>