Allow routing to arbitrary Rack applications

This builds off of @kainosnoema's work in #49 and allows routing to Rack
applications using HTTP verbs:

```ruby
class HelloWorld
  def call(env)
    [200, { 'Content-Type' => 'text/plain'}, ['Hello, world!']]
  end
end

class API < Crepe::API
  scope :hello
    get HelloWorld.new
  end

  # Or...
  get :hello, to: HelloWorld.new
end
```

As long as it responds to `call`, it's fair game. However, a few notes:

 * One potential syntax could be `get hello: HelloWorld.new`. The current
   implementation of `Crepe::API.route` will end up tossing
   `{:hello=>#<HelloWorld:0x007ff226e7b060}` into the `**options` hash.
   Because that path can be totally aribtrary, parsing that out would get
   quite tricky. Because of this, I haven't supported that syntax.
 * This is really the same as `mount HelloWorld.new, at: :hello, method: :get`.
   Do we care about supporting/documenting both?

Signed-off-by: David Celis <me@davidcel.is>
Merge pull request #51 from davidcelis/rack-app-routes

Allow routing to arbitrary Rack applications
Direct .scope documentation to .route

Signed-off-by: David Celis <me@davidcel.is>
Rename Crepe::API.scope to config

The naming behind `scope` is, I think, a bit confusing. The real result
of a `scope` is that you end up with a more fine-grained configuration
for the duration of a block. In fact, it simply calls `scoped` on the
current namespace's Config object. The additional fact that `scope`
doesn't even need to accept a block or namespace argument makes me think
we should rename it to `config`. For instance, you can simply call it to
set configuration options in the current namespace:

```ruby
class API < Crepe::API
  config separators: %w[ / . ? # ]

  # ...
end
```

I think that the name `config` is more descriptive of what the method is
actually doing: altering the Config object for a block or the current
namespace. We can leave `scope` in as an alias (as I've currently done)
or remove it entirely.

It's also worth mentioning that I can't really think of a good case for
using `config` to set a configuration option without a block, since it
usually makes sense to do in a call to `namespace` with options (I think
`namespace` is more readable than `scope` or `config` in instances where
a namespace argument is provided). So perhaps we should leave that
undocumented until we have more configuration options or can think of a
more compelling case than `separators`.

Signed-off-by: David Celis <me@davidcel.is>
Merge pull request #52 from davidcelis/rename-scope

Rename Crepe::API.scope to config
Split up API.config and API.scope

Config needn't take a namespace, so let's trickle things down to a new
dedicated method.

Let's also get rid of the excess "resource" alias. We can revisit it as
an option in a plugin that simplifies RESTful scaffolding.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Fix confusion between config/namespace/scope

Ideally:

 - .config doesn't take a namespace explicitly
 - .namespace requires a namespace
 - .scope is interchangeable

In favor of avoiding extra code, let's alias scope to namespace and not
require namespace to have one.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Remove indentation under private and protected methods

We've talked about this change for awhile, but we should really make it before
doing any other major refactoring to make diffs and rebasing a little cleaner.

Signed-off-by: Evan Owen <kainosnoema@gmail.com>
Merge pull request #54 from crepe/remove-visibility-indentation

Remove indentation under private and protected methods
Merge pull request #53 from crepe/scope-namespace-cleanup

Fix confusion between config/namespace/scope
WIP: 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>