Skip to content

Commit

Permalink
Trying install_ifs
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Powell <thomas.powell@progress.com>
  • Loading branch information
tpowell-progress committed Aug 15, 2024
1 parent 64b0836 commit 02d23d4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
1 change: 1 addition & 0 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
21 changes: 21 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 0 additions & 13 deletions berkshelf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 02d23d4

Please sign in to comment.