tomas-stefano/jeckle — pull request #31 by mateusg (2014-10-08 21:11:35+00:00)
Title: Middleware definition through DSL

Solves #14

Example:
```
Jeckle::Setup.register(:my_super_api) do |api|
api.base_uri = 'http://my-super-api.com.br'
api.headers = { 'Content-Type' => 'application/json' }
api.logger = Logger.new(STDOUT)
api.basic_auth = { username: 'steven_seagal', password: 'youAlwaysLose' }
api.namespaces = { prefix: 'api', version: 'v1' }
api.params = { hello: 'world' }

api.middlewares do
request :json
response :json
response :raise_error
end
end
```

More info: https://github.com/tomas-stefano/jeckle/wiki/DSL-Definition