hayesdavis / grackle

Lightweight Ruby library for the Twitter API that goes with the flow.
228 stars 36 forks source link

Use stderr instead of stdout, allow silencing the message #34

Open pete opened 10 years ago

pete commented 10 years ago

For scripts that pipe their output, it's better to put warnings like the "Download a cacerts.pem" into standard error instead of standard output, especially if they come from a library.

The second commit is slightly more speculative. It allows silencing the message by setting Grackle::Transport.be_wildly_insecure which, hopefully, is a scary enough name to ensure that it won't be carelessly used. (It certainly beats, e.g., overriding initialize in the client to set @ssl_warning_shown or creative use of IO.dup().)