silkapp/rest — pull request #42 by DNNX (2014-07-02 15:43:42+00:00)
Title: Fix Ruby client generator

I'm not very familiar with Haskell, so the code might be not quite perfect, feel free to comment.

I added the MissingH dependency, because it contains a useful function `replace` in `Data.List.Utils` module. If anybody knows how to replace a substring without adding extra dependency - let me know.

I tested the generated client - it works, so this pull request fixes issues mentioned in https://github.com/silkapp/rest/issues/36 .

```
$ cabal run rest-example-gen -- --ruby > client.rb

$ ruby -r ./client.rb -e "p RestexampleApi::Api.new('http://localhost:3000').Post.list"

Fix url encoding when this is going to be used[{"offset"=>0, "count"=>2, "items"=>[{"createdTime"=>"2014-04-01T13:37:00.000Z", "content"=>"Just wanted to tell the world!", "author"=>"erik", "id"=>1, "title"=>"Rest is awesome"}, {"createdTime"=>"2014-03-31T15:34:00.000Z", "content"=>"Hello world!", "author"=>"adam", "id"=>0, "title"=>"First post"}]}, #]
```