lotus/router — pull request #25 by jodosha (2014-11-05 10:01:23+00:00)
Title: Unify namespaced routes syntax

Until now there was two ways to namespace a route:

```ruby
router = Lotus::Router.new do
# First way
get '/login', to: ->(env) { ... }, prefix: '/backend'

# Second way
namespace 'dashboard' do
get '/users', to: ->(env) { ... }
end
end
```

In the example above, the available routes would be: `/backend/login` and `/dashboard/users`.
Theoretically they are equivalent, but @janko-m discovered some inconsistencies for the first syntax, which was poorly covered by myself. :sob: This made me to reconsider this feature.

Because I want to simplify both our and developers lives, I want that Lotus has only one way to achieve things.
I'm suggesting to remove the `:prefix` syntax for the following reasons:

1. It doesn't work.
2. To make this to work would require an effort and requires to add more code to the inner router and resolver.
3. Namespace works properly and keeping this allowed to remove code :v:
4. Simplifies routes definitions. Eg. `Lotus::Router#get` will have **one less** option. Easier code, easier to remember :+1:
5. Namespace encourages DRY code. Instead of repeating dozen times `:prefix`, developers will have only **one** `namespace` block where to define the nested routes.
6. Code blocks will make easier human recognition in huge routing files. Instead of seeking for dozens `:prefix` options one block `namespace` block will help to keep all the routes together.
7. It's not used by developers (see below).

This pull request will remove the code that supports `:prefix` without any deprecation.
This syntax was present in the first release of `Lotus::Router`, which has been released on Jan 2014. Until now, nobody reported this issue, except for @janko-m who is studying the code of the framework.

We're currently on a version under the 1.0. According to SemVer 2.0 we are allowed to make breaking changes at this point in time.

Ref #24