diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index cf4a4f691..cef93c499 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -25,6 +25,7 @@ steps: - label: "Integration Ubuntu 22.04 :ruby: 3.1" commands: - cd /workdir + - rm -f .bundle/config - apt-get update -y - apt-get install -y graphviz - bundle config set --local path 'vendor/bundle' diff --git a/Gemfile b/Gemfile index 8e2158bb6..d2a2a3ad6 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,27 @@ group :build do gem "rake", ">= 10.1" end +ruby_version = Gem::Version.new(RUBY_VERSION) + +r310 = Gem::Version.new("3.1.0") +r300 = Gem::Version.new("3.0.0") + +install_if -> { ruby_version >= r310 } do + gem "minitar", "~> 1.0" + gem "chef", ">= 18.0.0" +end + +install_if -> { (r300...r310) === ruby_version } do + gem "minitar", "~> 0.12" + gem "chef", "~> 17.0" +end + +install_if -> { ruby_version < r300 } do + gem "minitar", "~> 0.12" + gem "chef", ">= 15.7.32" +end + + group :development do gem "aruba", "~> 0.10" # Stay below 1 until aruba/in_process monkeypatching stops gem "debug" diff --git a/berkshelf.gemspec b/berkshelf.gemspec index 5682d82e1..1db280774 100644 --- a/berkshelf.gemspec +++ b/berkshelf.gemspec @@ -39,19 +39,6 @@ Gem::Specification.new do |s| s.add_dependency "chef-cleanroom", "~> 1.0" - if ruby_version >= Gem::Version.new("3.1.0") - s.add_dependency "minitar", "~> 1.0" - s.add_dependency "chef", ">= 18.0.0" - else - s.add_dependency "minitar", "~> 0.12" - - if ruby_version >= Gem::Version.new("3.0.0") - s.add_dependency "chef", "~> 17.0" # needed for --skip-syntax-check - else - s.add_dependency "chef", ">= 15.7.32" - end - end - s.add_dependency "retryable", ">= 2.0", "< 4.0" s.add_dependency "solve", "~> 4.0" s.add_dependency "thor", ">= 0.20", "< 1.3.0"