npolar/icelastic — pull request #25 by cnrdh (2014-10-28 10:19:32+00:00)
Title: Flexible feed

Supports flexible responses

JSON
ResponseWriter::Feed (format=json)
* Allows a block to be passed to #build
* HAL _links (variant=hal)
* Atom-style links (variant=atom)
* Array (variant=array)

Client and Rack::Icelastic middleware
Pluggable response writers, defaults are injected from Default.writers

Example of injecting a custom [CDL](https://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#CDL-Syntax) response writer
This means that Rack::Icelastic now supports injecting custom writers

```ruby
writers = Icelastic::Default.writers
writers << {"format" => "cdl", "writer" => My::ElasticsearchCDLWriter, "from" => "elasticsearch", "type" => "text/plain"}

use ::Rack::Icelastic, {
:url => "http://localhost:9200",
:index => "oceanography",
:type => "point",
:writers => writers
}
```