Skip to content

Conversation

@arielvalentin
Copy link
Contributor

Prior to this change, the RUBY_REQUIREMENT file was used to keep Ruby versions in sync, however toys will not detect a change to gem since the gemspec file was unaltered.

Rather than modify toys to be more flexible in this case, it will be easier to update the Ruby requirement in each gemspec using a script.

The script will write out diagnostic output of the gemspecs that were changed. E.g.

$> bin/update-ruby-version 3.2

Updating Ruby version requirement to: >= 3.2
Finding gemspec files...
Found 62 gemspec files to update:
Updated: helpers/mysql/opentelemetry-helpers-mysql.gemspec
Updated: helpers/sql/opentelemetry-helpers-sql.gemspec
Updated: helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec
Updated: helpers/sql-processor/opentelemetry-helpers-sql-processor.gemspec
Updated: instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec
...
Updated: resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec
Updated: sampler/xray/opentelemetry-sampler-xray.gemspec

Summary:
- Total files found: 62
- Successfully updated: 62

Done! All gemspecs have been updated to require Ruby >= 3.2

Prior to this change, the RUBY_REQUIREMENT file was used to keep Ruby versions in sync,
however toys will not detect a change to gem since the gemspec file was unaltered.

Rather than modify toys to be more flexible in this case, it will be easier to update the Ruby requirement
in each gemspec using a script.

The script will write out diagnostic output of the gemspecs that were changed. E.g.

```ruby

$> bin/update-ruby-version 3.2

Updating Ruby version requirement to: >= 3.2
Finding gemspec files...
Found 62 gemspec files to update:
Updated: helpers/mysql/opentelemetry-helpers-mysql.gemspec
Updated: helpers/sql/opentelemetry-helpers-sql.gemspec
Updated: helpers/sql-obfuscation/opentelemetry-helpers-sql-obfuscation.gemspec
Updated: helpers/sql-processor/opentelemetry-helpers-sql-processor.gemspec
Updated: instrumentation/action_mailer/opentelemetry-instrumentation-action_mailer.gemspec
...
Updated: resources/google_cloud_platform/opentelemetry-resource-detector-google_cloud_platform.gemspec
Updated: sampler/xray/opentelemetry-sampler-xray.gemspec

Summary:
- Total files found: 62
- Successfully updated: 62

Done! All gemspecs have been updated to require Ruby >= 3.2

```
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This looks good to me. Requesting changes to add a section in the CONTRIBUTING.md file with instructions on how to use the script.

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@arielvalentin arielvalentin merged commit af463bc into open-telemetry:main Oct 29, 2025
64 checks passed
@arielvalentin arielvalentin deleted the fix-ruby-releases branch October 29, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants