summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-08-21 11:37:07 -0700
committerGitHub <noreply@github.com>2020-08-21 11:37:07 -0700
commitad6f224d294adc96d3bb60f66521b6f4ca2d150a (patch)
tree1542e681d887d2cb1b2ad3c193fed98d6280d9a5
parent244c1d477bacdfc1a61ebda418bf70b88c17f2e1 (diff)
parenta5c7bb6f3ac6b423c48bbfc71aa8df709b80253c (diff)
downloadmixlib-log-ad6f224d294adc96d3bb60f66521b6f4ca2d150a.tar.gz
Merge pull request #60 from chef/requires
Signed-off-by: Tim Smith <tsmith@chef.io>
-rwxr-xr-xGemfile6
-rw-r--r--Rakefile2
-rw-r--r--lib/mixlib/log/formatter.rb2
-rw-r--r--spec/mixlib/log/child_spec.rb4
-rw-r--r--spec/mixlib/log/formatter_spec.rb2
-rw-r--r--spec/mixlib/log_spec.rb4
6 files changed, 11 insertions, 9 deletions
diff --git a/Gemfile b/Gemfile
index 190313e..259b272 100755
--- a/Gemfile
+++ b/Gemfile
@@ -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
diff --git a/Rakefile b/Rakefile
index 5442c99..3939fd3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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