Cleanup to match best practices in ruby and shell#98
Cleanup to match best practices in ruby and shell#98teancom wants to merge 1 commit intologstash-plugins:mainfrom
Conversation
|
The CI build failed but it appears like it was due to connectivity issues. Is that something that just needs to be kicked off again? |
lib/logstash/inputs/http.rb
Outdated
|
|
||
| # The host or ip to bind | ||
| config :host, :validate => :string, :default => "0.0.0.0" | ||
| config :host, validate: :string, default: '0.0.0.0' |
There was a problem hiding this comment.
we tend to stick to => notation for hashes in the logstash and logstash plugins codebase
|
Thanks for the PR @teancom, I have restarted the tests in travis |
lib/logstash/inputs/http.rb
Outdated
|
|
||
| def ssl_key_configured? | ||
| !!(@ssl_certificate && @ssl_key) | ||
| !(@ssl_certificate && @ssl_key).nil? |
There was a problem hiding this comment.
let's skip these changes, IMO it's debatable which one of !!expr or !(expr).nil? is better
|
|
||
| def encoding_handled?(env) | ||
| ['gzip', 'deflate'].include? env['HTTP_CONTENT_ENCODING'] | ||
| %w[gzip deflate].include? env['HTTP_CONTENT_ENCODING'] |
There was a problem hiding this comment.
I'd rather stick with an array here, personal preference
|
|
||
| if [[ -f "ci/run.sh" ]]; then | ||
| echo "Running custom build script in: `pwd`/ci/run.sh" | ||
| echo "Running custom build script in: $(pwd)/ci/run.sh" |
There was a problem hiding this comment.
if we're indenting these lines we should indent the remaining ones in the block
Cleanup both ruby and shell scripts to match various linters' suggestions. Mostly using the new hash syntax, as well as small readability changes. Additionally, update gitignore to not accidentally add in the output from running `rake vendor`
9832fb0 to
f7e38cd
Compare
|
I reverted/cleaned up the issues you found, squashed, and repushed. Let me know if it looks better now. Thank you for taking the time to review! |
Cleanup both ruby and shell scripts to match various linters'
suggestions. Mostly using the new hash syntax, as well as small
readability changes. Additionally, update gitignore to not accidentally
add in the output from running
rake vendorThis was done as a "slate-cleaning" and a way to learn the repo before starting any of the issues marked "hacktober".