Skip to content

Commit

Permalink
RuboCop: 0.49.1, which uses chefstyle 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
olleolleolle committed Aug 17, 2017
1 parent b317039 commit 54950e8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ gemspec
group :development do
gem "bundler"
gem "rdoc"
gem "rubocop", "~> 0.49.1"
end
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = "spec/**/*_spec.rb"
end

task default: [:style, :spec, :features]
task default: %i[style spec features]

# For rubygems-test
task test: :spec
Expand Down
4 changes: 2 additions & 2 deletions lib/mixlib/log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def level(new_level = nil)

# Define the standard logger methods on this class programmatically.
# No need to incur method_missing overhead on every log call.
[:debug, :info, :warn, :error, :fatal].each do |method_name|
%i[debug info warn error fatal].each do |method_name|
class_eval(<<-METHOD_DEFN, __FILE__, __LINE__)
def #{method_name}(msg=nil, &block)
loggers.each {|l| l.#{method_name}(msg, &block) }
Expand All @@ -127,7 +127,7 @@ def #{method_name}(msg=nil, &block)
# Note that we *only* query the default logger (@logger) and not any other
# loggers that may have been added, even though it is possible to configure
# two (or more) loggers at different log levels.
[:debug?, :info?, :warn?, :error?, :fatal?].each do |method_name|
%i[debug? info? warn? error? fatal?].each do |method_name|
class_eval(<<-METHOD_DEFN, __FILE__, __LINE__)
def #{method_name}
logger.#{method_name}
Expand Down
2 changes: 1 addition & 1 deletion spec/mixlib/log_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def initialize
@messages = ""
end

[:debug, :info, :warn, :error, :fatal].each do |method_name|
%i[debug info warn error fatal].each do |method_name|
class_eval(<<-E)
def #{method_name}(message)
@messages << message
Expand Down

0 comments on commit 54950e8

Please sign in to comment.