aspring/racker — pull request #5 by tdg5 (2014-10-04 17:00:22+00:00)
Title: Remove quiet CLI option

Builds on #3 and #4 to remove the quiet option from the CLI interface.

I may be pushing my luck here, but to give you some sense of my vision, I'd like to see racker support multiple Writer adapters.

Right now, the only Writer adapter in racker is hardcoded into `Racker::Processer#execute!` and it writes the compiled JSON to an output file, and in this case `puts`-ing to STDOUT is fine. However, one of the other Writer adapters I am interested in would allow for writing the compiled JSON to STDOUT, in which case invocations of `puts` are going to cause weird noise.

Ultimately, I don't think `puts`-ing has to be entirely removed, but it should not be invoked by the core of Racker. This would allow for a FileWriter that could still be verbose while an StdOutWriter could rely solely on the logs for communicating events.

An alternative option would be to make it so the usage of some Writers forced the quiet flag, but that seems kind of contrary to [POLA](https://en.wikipedia.org/wiki/Principle_of_least_astonishment). Another alternative might be to replace the quiet flag with a verbose flag, and default to silence. It's also not unreasonable to relegate all feedback to the log.

My goal in adding a StdOutWriter would be to make it unnecessary to materialize intermediary json templates by making something like the following possible:
```bash
$ racker template1.rb template2.rb - | packer build -
```
It would also reduces the number of Writer specific conditionals that would be required in the internals of `Racker::Processor#execute!` to make such a change possible.

Definitely open to feedback on other ways to approach making this happen.