jugyo / earthquake

Twitter terminal client with streaming API support.
MIT License
661 stars 94 forks source link

Set initial config perms 0600, it holds secrets #120

Closed bemurphy closed 12 years ago

bemurphy commented 12 years ago

Since the config file holds secret keys for oauth, I figured it was best written default the first time with 0600 perms.

no6v commented 12 years ago

Thank you for noticing this. I agree with this patch even though I prefer using mode: "w", perm: 0600 style :).

I think this File instance could be closed immediately by giving (empty) block or close explicitly. How do you feel? Is that GC job?

bemurphy commented 12 years ago

Hmm, I wasn't aware File.open could be passed the perm in a hash. If so, that's probably more explicit.

As for closing it, I'd favor explicit .close over an empty block; it would confuse a reader less. I will drop both in an additional commit.

no6v commented 12 years ago

Does "w" leave alone? or {mode: "w"} ? But that is not essential. Now, everything is reasonable for me, thanks. @jugyo, can I merge this?

no6v commented 12 years ago

Sorry for my misreading. mode: is there exactly!

jugyo commented 12 years ago

It was merged. I think 0600 is best.

Thanks!