diff options
-rwxr-xr-x | Gemfile | 6 | ||||
-rw-r--r-- | Rakefile | 2 | ||||
-rw-r--r-- | lib/mixlib/log/formatter.rb | 2 | ||||
-rw-r--r-- | spec/mixlib/log/child_spec.rb | 4 | ||||
-rw-r--r-- | spec/mixlib/log/formatter_spec.rb | 2 | ||||
-rw-r--r-- | spec/mixlib/log_spec.rb | 4 |
6 files changed, 11 insertions, 9 deletions
@@ -1,3 +1,4 @@ + source "https://rubygems.org" gemspec @@ -10,7 +11,8 @@ end group :test do gem "chefstyle" - gem "cucumber" + 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 @@ -18,6 +20,6 @@ end group :debug do gem "pry" gem "pry-byebug" - gem "pry-stack_explorer" + gem "pry-stack_explorer", "~> 0.4.0" # pin until we drop ruby < 2.6 gem "rb-readline" end @@ -39,7 +39,7 @@ rescue LoadError end begin - require "yard" + require "yard" unless defined?(YARD) YARD::Rake::YardocTask.new(:docs) rescue LoadError puts "yard is not available. bundle install first to make sure all dependencies are installed." diff --git a/lib/mixlib/log/formatter.rb b/lib/mixlib/log/formatter.rb index 680836f..9041ff6 100644 --- a/lib/mixlib/log/formatter.rb +++ b/lib/mixlib/log/formatter.rb @@ -16,7 +16,7 @@ # limitations under the License. require "logger" -require "time" +require "time" unless defined?(Time.zone_offset) module Mixlib module Log diff --git a/spec/mixlib/log/child_spec.rb b/spec/mixlib/log/child_spec.rb index eef2ce9..182b86c 100644 --- a/spec/mixlib/log/child_spec.rb +++ b/spec/mixlib/log/child_spec.rb @@ -15,8 +15,8 @@ # limitations under the License. # -require "tempfile" -require "stringio" +require "tempfile" unless defined?(Tempfile) +require "stringio" unless defined?(StringIO) require "spec_helper" RSpec.describe Mixlib::Log::Child do diff --git a/spec/mixlib/log/formatter_spec.rb b/spec/mixlib/log/formatter_spec.rb index 16e45af..ee7de09 100644 --- a/spec/mixlib/log/formatter_spec.rb +++ b/spec/mixlib/log/formatter_spec.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require "time" +require "time" unless defined?(Time.zone_offset) require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper")) RSpec.describe Mixlib::Log::Formatter do diff --git a/spec/mixlib/log_spec.rb b/spec/mixlib/log_spec.rb index 5366dcd..db638eb 100644 --- a/spec/mixlib/log_spec.rb +++ b/spec/mixlib/log_spec.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "tempfile" -require "stringio" +require "tempfile" unless defined?(Tempfile) +require "stringio" unless defined?(StringIO) require "spec_helper" class LoggerLike |