Skip to content

Commit

Permalink
Merge pull request #50690 from code-dot-org/remove-cdo-ruby-old_version
Browse files Browse the repository at this point in the history
Remove `cdo-ruby::old_version` Chef Attribute
  • Loading branch information
Hamms committed Mar 22, 2023
2 parents abc1440 + ff97ae2 commit 7071b26
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion cookbooks/cdo-ruby/README.md
Expand Up @@ -11,7 +11,6 @@ This cookbook uses [`ruby-build`](https://github.com/rbenv/ruby-build#readme) in
## Attributes

- `node['cdo-ruby']['version']`: Ruby version. See `ruby-build --definitions` for available options
- `node['cdo-ruby']['old_version']`: Old version of Ruby to be uninstalled. Optional, and soon to be deprecated.
- `node['cdo-ruby']['rubygems_version']`: Updates the version of [RubyGems](https://rubygems.org/) installed.
- `node['cdo-ruby']['bundler_version']`: Updates the version of [Bundler](http://bundler.io/) installed.
- `node['cdo-ruby']['rake_version']`: Updates the version of [Rake](https://ruby.github.io/rake/) installed.
1 change: 0 additions & 1 deletion cookbooks/cdo-ruby/attributes/default.rb
@@ -1,6 +1,5 @@
default['cdo-ruby'] = {
version: '2.7.5',
old_version: '2.7',
rubygems_version: '3.3.22',
bundler_version: '2.3.22',
rake_version: '13.0.1'
Expand Down
16 changes: 0 additions & 16 deletions cookbooks/cdo-ruby/recipes/ruby-build.rb
Expand Up @@ -4,22 +4,6 @@
# https://www.ruby-lang.org/en/documentation/installation/#ruby-build
# https://github.com/rbenv/ruby-build#readme

# Remove old Ruby version packages if present.
# TODO: remove this (and the old_version attribute) once all existing servers
# have been updated
if (old = node['cdo-ruby']['old_version'])
include_recipe 'apt'
%W[
ruby#{old}-dev
ruby#{old}
].each do |pkg|
apt_package pkg do
action :purge
notifies :run, 'execute[apt-get autoremove]', :immediately
end
end
end

# Arbitrarily use the latest version of ruby build at time this code was
# written; this probably doesn't matter, but we need to pick something.
RUBY_BUILD_VERSION = '20221225'.freeze
Expand Down

0 comments on commit 7071b26

Please sign in to comment.