RiotGames/ridley — pull request #287 by iroller (2014-11-16 08:11:46+00:00)
Title: Use pretty json format for metadata.json

Chef suggests using `knife diff` for comparing local repo and chef server.

To compare cookbooks uploaded with ridley we need to compile metadata.json first.

There's already a knife command for it:
`knife cookbook metadata from file metadata.rb`

It generates metadata.json using pretty json format.
So I suggest generating pretty jsons for metadata.rb when uploading so we can use `knife diff` against it and see nice diffs.

Note:
There's still a difference between ridley's and knife's JSON.pretty_generate since knife is using https://github.com/opscode/ffi-yajl.
`ffi-yajl` adds an extra new line in empty hashes and `json` doesn't. It seems to be ffi-yajl's problem to me.