diff --git a/Gemfile b/Gemfile index 259b272..7fe0cf8 100755 --- a/Gemfile +++ b/Gemfile @@ -10,9 +10,9 @@ group :docs do end group :test do + gem "activesupport", "< 6" # this dep can be removed when we drop Ruby 2.4 support gem "chefstyle" gem "cucumber", "< 5" # remove the version pin when we drop Ruby 2.4 support - gem "activesupport", "< 6" # this dep can be removed when we drop Ruby 2.4 support gem "rake" gem "rspec", "~> 3.7" end diff --git a/lib/mixlib/log.rb b/lib/mixlib/log.rb index cfffb48..e2eb7eb 100644 --- a/lib/mixlib/log.rb +++ b/lib/mixlib/log.rb @@ -118,7 +118,7 @@ def level(new_level = nil) if new_level.nil? LEVEL_NAMES[logger.level] else - self.level = (new_level) + self.level = new_level end end diff --git a/mixlib-log.gemspec b/mixlib-log.gemspec index 3f51174..310bc2b 100644 --- a/mixlib-log.gemspec +++ b/mixlib-log.gemspec @@ -1,4 +1,4 @@ -$:.unshift File.expand_path("../lib", __FILE__) +$:.unshift File.expand_path("lib", __dir__) require "mixlib/log/version" Gem::Specification.new do |gem| diff --git a/spec/mixlib/log/formatter_spec.rb b/spec/mixlib/log/formatter_spec.rb index ee7de09..d06ea51 100644 --- a/spec/mixlib/log/formatter_spec.rb +++ b/spec/mixlib/log/formatter_spec.rb @@ -17,7 +17,7 @@ # require "time" unless defined?(Time.zone_offset) -require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper")) +require File.expand_path(File.join(__dir__, "..", "..", "spec_helper")) RSpec.describe Mixlib::Log::Formatter do before(:each) do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e8a1bb1..e48f1af 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,7 +18,7 @@ # $TESTING = true -$:.push File.join(File.dirname(__FILE__), "..", "lib") +$:.push File.join(__dir__, "..", "lib") require "rspec" require "mixlib/log"