]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/ruby/attributes/default.rb
Use ruby 3.1 on Debian
[chef.git] / cookbooks / ruby / attributes / default.rb
index 39e975e0660cf3f95ef6c72585bcb8ced9c73886..eefaf22470bfc4397761f340ebc9c6eed1eeb047 100644 (file)
@@ -1,6 +1,9 @@
-default[:ruby][:version] = if node[:lsb][:release].to_f < 20.04
-                             "2.5"
-                           else
+default[:ruby][:version] = if platform?("debian")
+                             "3.1"
+                           elsif node[:lsb][:release].to_f < 22.04
                              "2.7"
+                           else
+                             "3.0"
                            end
+default[:ruby][:gem] = "/usr/bin/gem#{node[:ruby][:version]}"
 default[:ruby][:bundle] = "/usr/bin/bundle#{node[:ruby][:version]}"