snmaynard / redis-audit

287 stars 67 forks source link

changes to make argument order definable + add in Redis URL #33

Closed teknogeek0 closed 9 years ago

teknogeek0 commented 9 years ago

We leverage Redis in a few ways today, and one thing that we do in pretty much every instance is make use of Redis AUTH (regardless of how its not the best security out there). redis-audit as it was didn't make it easy for someone to pass in a password, and so I went down the road of using optparse to allow a user to specify the fields in a certain order, or just to pass in a URL which could include the password. There are a few possible connection parameter methodologies out there, but I felt like this was the quickest route without breaking the existing usage of the tool.

As noted in the README the previous syntax is still supported so as to not break it for existing users. I also ran into an issue where some of our systems are ruby 2.X, and some are 1.9.X. My Gemfile foo is a bit weak and so just removing any pinning and testing on both types of systems made sense.

Lastly I attempted to add some sane defaults on the chance that someone uses the newer defined argument syntax, but doesn't use all options.

Hope you find this valuable!

Thanks

snmaynard commented 9 years ago

Thanks @teknogeek0!

teknogeek0 commented 9 years ago

Quite welcome! Thanks for the merge!