turboladen / tailor

A RubyGem that allows for checking standard styling of Ruby files.
146 stars 18 forks source link

Cli results and Output file #131

Closed leandronsp closed 11 years ago

leandronsp commented 11 years ago

Hi @turboladen!

First scenario: I want to be able getting the cli results as a hash. I need to manipulate them for an appropriate application. Then I created a new method on CLI that returns the critc.problems. Just that.

Second scenario: Sometimes I want to be able printing the report into a yaml file. So I've created a new formatter for that. As a plus we can pass a output-file option on command-line or at config instantiation.

Tailor::CLI.new(
%w(--config-file=.tailor --output-file=my-file.yaml)
lib_to_analyze)

Tailor::CLI.new(
%w(--config-file=.tailor --output-file=my-file42.yaml)
other_lib_to_analyze)

This would be great for me, and, I guess, for us! Can you check, please?

I didn't update the README yet. Let me know if all it's ok. Thanks for advance!

turboladen commented 11 years ago

Hey, this is great! Everything looks in good shape--great tests too. If you, wouldn't mind, updating the README would be great, and then I'll merge everything in. Thanks @leandronsp!

leandronsp commented 11 years ago

up