From f960289c42f23d57f35280e29ff65ed143346988 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Wed, 16 Aug 2017 10:30:33 +0200 Subject: [PATCH] Linting --- Rakefile | 3 ++- lib/mixlib/log.rb | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index f5fa61f..4507bdd 100644 --- a/Rakefile +++ b/Rakefile @@ -39,5 +39,6 @@ GitHubChangelogGenerator::RakeTask.new :changelog do |config| config.future_release = Mixlib::Log::VERSION config.enhancement_labels = "enhancement,Enhancement,New Feature,Feature".split(",") config.bug_labels = "bug,Bug,Improvement,Upstream Bug".split(",") - config.exclude_labels = "duplicate,question,invalid,wontfix,no_changelog,Exclude From Changelog,Question,Discussion".split(",") + config.exclude_labels = ["duplicate", "question", "invalid", "wontfix", + "no_changelog", "Exclude From Changelog", "Question", "Discussion"] end diff --git a/lib/mixlib/log.rb b/lib/mixlib/log.rb index 8c996ff..ccbeded 100644 --- a/lib/mixlib/log.rb +++ b/lib/mixlib/log.rb @@ -24,7 +24,8 @@ module Mixlib module Log @logger, @loggers = nil - LEVELS = { debug: Logger::DEBUG, info: Logger::INFO, warn: Logger::WARN, error: Logger::ERROR, fatal: Logger::FATAL }.freeze + LEVELS = { debug: Logger::DEBUG, info: Logger::INFO, + warn: Logger::WARN, error: Logger::ERROR, fatal: Logger::FATAL }.freeze LEVEL_NAMES = LEVELS.invert.freeze def reset! @@ -62,9 +63,8 @@ def use_log_devices(other) @loggers = other @logger = other.first else - msg = "#use_log_devices takes a Mixlib::Log object or array of log devices. " \ + raise ArgumentError, "#use_log_devices takes a Mixlib::Log object or array of log devices. " \ "You gave: #{other.inspect}" - raise ArgumentError, msg end @configured = true end