summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2018-03-22 17:12:59 +0000
committerGitHub <noreply@github.com>2018-03-22 17:12:59 +0000
commite636ae3c638776277f7e9dd52cb2515a1695982a (patch)
tree1e686456d96c14468e77b46edadefaf36cb03b7a
parent9f6f40b1af90fa76b580f1c6163bf3015ca46fdc (diff)
parent80558e9a5bc2454600a406efd69bd827dc7cd1f7 (diff)
downloadmixlib-log-e636ae3c638776277f7e9dd52cb2515a1695982a.tar.gz
Merge pull request #34 from chef/tm/chefstyle9
fix chefstyle
-rw-r--r--features/steps/log.rb8
-rw-r--r--lib/mixlib/log.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/features/steps/log.rb b/features/steps/log.rb
index 615cd94..25026dd 100644
--- a/features/steps/log.rb
+++ b/features/steps/log.rb
@@ -16,11 +16,11 @@
# limitations under the License.
#
-Given /^a base log level of '(.+)'$/ do |level|
+Given(/^a base log level of '(.+)'$/) do |level|
Logit.level = level.to_sym
end
-When /^the message '(.+)' is sent at the '(.+)' level$/ do |message, level|
+When(/^the message '(.+)' is sent at the '(.+)' level$/) do |message, level|
case level.to_sym
when :debug
Logit.debug(message)
@@ -37,11 +37,11 @@ When /^the message '(.+)' is sent at the '(.+)' level$/ do |message, level|
end
end
-Then /^the regex '(.+)' should be logged$/ do |regex_string|
+Then(/^the regex '(.+)' should be logged$/) do |regex_string|
regex = Regexp.new(regex_string, Regexp::MULTILINE)
expect(regex.match(@output)).not_to be_nil
end
-Then /^nothing should be logged$/ do
+Then(/^nothing should be logged$/) do
expect(@output).to eq ""
end
diff --git a/lib/mixlib/log.rb b/lib/mixlib/log.rb
index c605148..cd219ae 100644
--- a/lib/mixlib/log.rb
+++ b/lib/mixlib/log.rb
@@ -189,7 +189,7 @@ module Mixlib
# via public API. In order to reduce amount of impact and
# handle only File type log devices I had to use this method
# to get access to it.
- next unless logdev = logger.instance_variable_get(:"@logdev")
+ next unless (logdev = logger.instance_variable_get(:"@logdev"))
loggers_to_close << logger if logdev.filename
end
loggers_to_close