ManageIQ / azure-armrest

Ruby interface for Azure using the new REST API
Apache License 2.0
15 stars 36 forks source link

Update log setter #385

Closed djberg96 closed 5 years ago

djberg96 commented 5 years ago

At the moment the Azure::Armrest::Configuration.log= method will bomb if you try to set it to something that's neither a string nor a Logger instance.

For example, if you try to assign it to a Syslogger instance you will get a no implicit conversion of Syslogger into String error because it tries to pass it to Logger.new.

This PR just flips the logic so that only Strings are treated specially, everything else is passed directly.

miq-bot commented 5 years ago

Checked commits https://github.com/djberg96/azure-armrest/compare/849139777542394198382cfee0aa8ccc5d1a1615~...f1c989df2eab0da76379026b4357a6c34b0f2cc9 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 2 files checked, 2 offenses detected

lib/azure/armrest/configuration.rb