scoutapp/scout-plugins — pull request #159 by MrTravisB (2014-08-05 16:09:10+00:00)
Title: Update elasticsearch cluster status to support basic auth as well as SSL

None of the elasticsearch plugins currently support authentication or SSL. If this is approved, I'll apply the same change to the other 2 elasticsearch plugins.

Changes:
- *Changed "elasticsearch_host" and "elasticsearch_port" options to just "host" and "port" for brevity sake.
- Added "username" and "password" options. Default is `nil`.
- If only one of "username" or "password" is given, return an error.
- Create a `Net::HTTP` object rather immediately make call using `Net::HTTP.get`.
- If "username" and "password" are set, set basic auth credentials.
- If host scheme is HTTPS, set `use_ssl` to true.

Please do review carefully. Ruby is not my first language (or even top 10). I've tested and done everything I can.

* Will changing these option names break current users? Will those settings automatically migrate? This is a needed change just figured while I was here I'd clean it up a bit.