-
Notifications
You must be signed in to change notification settings - Fork 526
Upgrade to Ruby 3.3.4 #60329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Ruby 3.3.4 #60329
Changes from all commits
4ea2cac
b8efdac
3b08a92
c2afbb1
98a6fca
2a85afd
e37d4ea
cdb9cda
346468a
30f28ed
ca474c4
fca7ba2
13e355f
998f918
86c00f1
fa47a9e
ade3f94
fc84ba9
f07b5ec
6c9611a
8924b8a
99cc85c
168acbd
2568561
00f4bc1
fddc4b0
5b2cf11
9621c8b
445b360
d9d9569
7981927
985e818
9ac1087
8bef80c
36cfd74
25218bf
d97eba8
4a4709b
f058b6e
1589f00
ef71860
951d22a
c6b78b3
98af791
95fef89
acd278a
2ff9e36
78436fc
b58b39b
fe3059d
caa6da9
9154bcf
b02c146
a75d3e0
31c2597
85422d5
449f971
90ec147
4c4233c
9868287
9a9f659
1a352ab
6ee76ad
d995478
a094937
906d8d2
36f45c4
2c8771d
bb0855f
9db69f7
e1184ca
8c2be14
24bd100
c79315c
b1626b1
be974c7
c5c0408
d5fbf13
4d8b948
f85b5c4
aaec90c
3284fb8
a0a26f8
81eea5f
470546d
cd04709
58ad4ca
b398a68
33fe94c
1512017
c79ae80
1c1026d
0801f17
37235ce
0ac52f8
cfb26cb
b5893be
3c9d985
9aa7e82
3ff783f
9f96c30
993d990
5fd8967
9cc9c97
2ac4472
1aac17a
a361288
e12776d
c9b7cdf
04d3117
0710b42
0d83426
5c2a549
15bcc00
6c5438c
2dde88d
f6087d9
b2f5e0e
0fb6208
ca18d24
c646f5c
be7ceeb
b02e1b9
8c68cc0
58e2e6e
ab1f114
35fc8a7
51d8355
97ccd8c
b01fb79
fc3f158
de5b4ea
7184070
64ab568
a21cffe
db5e222
3049762
8903d72
3dc61e5
322659b
6e1d3c9
d2bae4c
f186a73
3e20a1a
333dc82
6ea1191
dfe5457
7182e62
cdba549
0885a3f
30f1e31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.0.5 | ||
| 3.3.4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1135,7 +1135,7 @@ DEPENDENCIES | |
| youtube-dl.rb | ||
|
|
||
| RUBY VERSION | ||
| ruby 3.0.5p211 | ||
| ruby 3.3.4p94 | ||
|
|
||
| BUNDLED WITH | ||
| 2.3.22 | ||
| 2.5.17 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.0.5 | ||
| 3.3.4 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| source 'https://rubygems.org' | ||
|
|
||
| ruby '3.0.5' | ||
| ruby '3.3.4' | ||
|
|
||
| gem 'berkshelf' | ||
| gem 'chef', '17.6.18' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -800,7 +800,7 @@ DEPENDENCIES | |
| test-kitchen | ||
|
|
||
| RUBY VERSION | ||
| ruby 3.0.5p211 | ||
| ruby 3.3.4p94 | ||
|
|
||
| BUNDLED WITH | ||
| 2.3.22 | ||
| 2.5.17 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| default['cdo-ruby'] = { | ||
| version: '3.0.5', | ||
| rubygems_version: '3.3.22', | ||
| bundler_version: '2.3.22', | ||
| rake_version: '13.0.1' | ||
| version: '3.3.4', | ||
| rubygems_version: '3.5.17 ', | ||
snickell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| rake_version: '13.2.1' | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,14 +6,14 @@ | |
|
|
||
| # 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 | ||
| RUBY_BUILD_VERSION = '20240727'.freeze | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each ruby-build version knows how to build certain versions of Ruby. Thus, when you upgrade Ruby you gotta upgrade Ruby Build.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I debated myself here whether to split this out into the "pre-upgrade" PR. I think its actually safer to consider the This way we go from |
||
|
|
||
| remote_file '/tmp/ruby-build.tar.gz' do | ||
| remote_file "/tmp/ruby-build-#{RUBY_BUILD_VERSION}.tar.gz" do | ||
| source "https://github.com/rbenv/ruby-build/archive/refs/tags/v#{RUBY_BUILD_VERSION}.tar.gz" | ||
| action :create_if_missing | ||
| end | ||
|
|
||
| archive_file '/tmp/ruby-build.tar.gz' do | ||
| archive_file "/tmp/ruby-build-#{RUBY_BUILD_VERSION}.tar.gz" do | ||
snickell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| destination '/tmp/ruby-build' | ||
| overwrite :auto | ||
| end | ||
|
|
@@ -25,7 +25,8 @@ | |
| end | ||
|
|
||
| # Install dependencies require for ruby-build to succeed | ||
| apt_package %w(zlib1g-dev) | ||
| # List taken from: https://github.com/rbenv/ruby-build/wiki#ubuntudebianmint | ||
| apt_package %w(autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Required to build new version of ruby-build. |
||
|
|
||
| execute 'install ruby with ruby build' do | ||
| # Target /usr/local; it might make sense to install ruby itself to /usr as | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| require_relative '../../../shared/helper_spec' | ||
|
|
||
| file_exist '/usr/local/bin/ruby' | ||
| cmd 'ruby -v', '3.0.5' | ||
| cmd 'gem -v', '3.3.22' | ||
| cmd 'bundler -v', '2.3.22' | ||
| cmd 'ruby -v', '3.3.4' | ||
| cmd 'gem -v', '3.5.17' | ||
| cmd 'bundler -v', '2.5.17' | ||
snickell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Monkey patch the `state_machine` gem (a dependency of `eyes_selenium`) to | ||
| # support Ruby >= 3.2. This gem was replaced with `state_machines` in | ||
| # `eyes_selenium` v6.0.4, so the patch can be removed once we upgrade. | ||
| begin | ||
| require 'state_machine/integrations/base' | ||
|
|
||
| module StateMachine | ||
| module Integrations | ||
| module Base | ||
| module ClassMethods | ||
| # Patch the original `locale_path` method; replace deprecated | ||
| # `File.exists?` with modern `File.exist?` | ||
| # | ||
| # See https://github.com/pluginaweek/state_machine/blob/v1.2.0/lib/state_machine/integrations/base.rb#L78C24-L82C12 | ||
| def locale_path | ||
| path = "#{File.dirname(__FILE__)}/#{integration_name}/locale.rb" | ||
| path if File.exist?(path) | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end | ||
| rescue LoadError | ||
| # state_machine gem is only installed in test and development environments | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Psych 4 is the YAML parser in Ruby 3.1 and has significantly different behavior (a looooot of the breakage was due to Psych 4), in this case, it returns double quotes rather than single quotes. Change cleared with Artem here: #60329 (comment)
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change to test output is triggered by the Ruby upgrade, so it needs to stay in this branch and can't be split into the pre-upgrade PR