Skip to content

Commit

Permalink
Require Ruby 2.7 or later
Browse files Browse the repository at this point in the history
We support N-1 and Ohai will support Ruby 3 and 2.7

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 committed Jan 5, 2021
1 parent d6ccd99 commit f9cd19e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
11 changes: 5 additions & 6 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,28 @@ steps:
docker:
image: ruby:2.7-buster

- label: run-specs-ruby-2.6
- label: run-specs-ruby-2.7
command:
- .expeditor/run_linux_tests.sh rspec
expeditor:
executor:
docker:
image: ruby:2.6-buster
image: ruby:2.7-buster

- label: run-specs-ruby-2.7
- label: run-specs-ruby-3.0
command:
- .expeditor/run_linux_tests.sh rspec
expeditor:
executor:
docker:
image: ruby:2.7-buster
image: ruby:3.0-buster

- label: run-specs-windows
command:
# we need the ruby 2.7 version of bundler, the 2.5/2.6 versions cannot pull our Gemfile correctly
- gem install bundler
- bundle install --jobs=7 --retry=3 --without=profile
- bundle exec rake spec
expeditor:
executor:
docker:
host_os: windows
image: rubydistros/windows-2019:2.7
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require: rubocop-performance

AllCops:
NewCops: enable
TargetRubyVersion: 2.5
TargetRubyVersion: 2.7
Exclude:
- "spec/data/**/*"
- "vendor/**/*"
Expand Down
6 changes: 1 addition & 5 deletions ohai.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.email = "[email protected]"
s.homepage = "https://github.com/chef/ohai/"

s.required_ruby_version = ">= 2.6"
s.required_ruby_version = ">= 2.7"

s.add_dependency "chef-config", ">= 12.8", "< 18"
s.add_dependency "chef-utils", ">= 16.0", "< 18"
Expand All @@ -26,10 +26,6 @@ Gem::Specification.new do |s|
s.add_dependency "plist", "~> 3.1"
s.add_dependency "train-core"
s.add_dependency "wmi-lite", "~> 1.0"
# Note for ohai developers: If chef-config causes you grief, try:
# bundle install --with development
# this should work as long as chef is a development dependency in Gemfile.
#

s.bindir = "bin"
s.executables = %w{ohai}
Expand Down

0 comments on commit f9cd19e

Please sign in to comment.