Skip to content

v0.12.0 - Update to vault-ruby 0.20 and remove EOL version support#155

Merged
chrisarcand merged 15 commits intomainfrom
update-ruby-rails-versions
Feb 4, 2026
Merged

v0.12.0 - Update to vault-ruby 0.20 and remove EOL version support#155
chrisarcand merged 15 commits intomainfrom
update-ruby-rails-versions

Conversation

@chrisarcand
Copy link
Member

@chrisarcand chrisarcand commented Feb 4, 2026

Summary

This PR updates vault-ruby to 0.20 and removes support for EOL versions of Ruby, Rails, and Vault. It also restores Rails version matrix testing that was accidentally dropped during the CircleCI→GitHub Actions migration.

For quick and easy review, also includes the v0.12.0 bump, so these changes are immediately going out in a release.

Breaking Changes

  • vault-ruby: Updated from ~> 0.19 to ~> 0.20
  • Ruby: Minimum version raised from 3.1 to 3.2 (Ruby 3.1 reaches EOL March 31, 2025)
  • Rails: Minimum version raised from 5.0 to 7.0 (Rails 6.1 and earlier are EOL)

Test Matrix Changes

Ruby versions

  • Testing: 3.2, 3.3, 3.4, 4.0 (removed 3.1)
  • Gemspec: Requires Ruby >= 3.2

Rails versions

  • Restored: Rails matrix testing (accidentally dropped in April 2023 during CircleCI→GHA migration)
  • Testing: 7.2, 8.0, 8.1 (only currently supported versions)
  • Gemspec: Requires ActiveSupport >= 7.0
  • Gemfile default: Changed from 6.0.0 to 7.2.0

Vault versions

Test combinations: 4 Ruby × 3 Rails × 4 Vault = 48 jobs

Dependency Updates

  • vault-ruby: ~> 0.19 → ~> 0.20
  • sqlite3: ~> 1.3.6 → >= 1.4 (required for Rails 7+)
  • ruby/setup-ruby: v1.221.0 → v1.288.0 (for Ruby 4.0 support)

Code Cleanup

Removed obsolete Rails 5/6 compatibility code:

  • represent_boolean_as_integer setting (Rails 7+ deprecation)
  • Old change tracking API checks (Rails 5.1/5.2/6.0)
  • Rails 5.0 static file serving compatibility checks
  • Rails 3.0 params wrapper compatibility checks

Rails 7.2+ Compatibility Fixes

  • Fixed anonymous class tests to explicitly set table_name
  • Updated assets initializer to handle optional Sprockets (Rails 7+)

CI Improvements

  • Added clearer job names: "Ruby X.X / Rails X.X / Vault X.X.X"
  • Tests now run on all branch pushes
  • Updated ruby/setup-ruby for Ruby 4.0 support

Documentation

  • Added version requirements to README (Ruby 3.2+, Rails 7.0+, Vault 1.16+)
  • Updated CHANGELOG with all changes

References

- Drop Ruby 3.1 (EOL March 31, 2025), add Ruby 4.0
- Restore Rails matrix testing (accidentally dropped in CircleCI->GHA migration)
- Test only currently supported Rails versions: 7.2, 8.0, 8.1
- Update Vault versions to current supported releases:
  - 1.16.13 (previous LTS, extended support ending soon)
  - 1.19.13 (current LTS)
  - 1.20.7 (N-1 standard)
  - 1.21.2 (latest standard)
- Update Gemfile default Rails version from 6.0.0 to 7.2.0
- Remove Rails 6-specific sqlite3 pinning
- Update gemspec to require Ruby >= 3.2 and ActiveSupport >= 7.0
- Pass RAILS_VERSION environment variable to CI matrix
- Update ruby/setup-ruby from v1.221.0 to v1.288.0 for Ruby 4.0 support
- Add job names showing Ruby/Rails/Vault versions for better CI visibility
This setting was removed in Rails 7+ as SQLite now always uses
integers (0/1) for boolean values. Since we're only testing
Rails 7.2+, this configuration is no longer needed.
Since we now require Rails 7.0+, removed all EOL version checks:

1. spec/dummy/config/environments/test.rb (lines 19-25)
   Removed: if config.respond_to?(:public_file_server) check and else branch
   Justification: config.public_file_server was introduced in Rails 5.0.
   The old serve_static_files API was deprecated in Rails 5.0 and removed
   in Rails 5.1. Since we require Rails 7.0+, we can safely use
   public_file_server directly.
   Reference: https://guides.rubyonrails.org/5_0_release_notes.html

2. spec/dummy/config/initializers/wrap_parameters.rb (line 11)
   Removed: if respond_to?(:wrap_parameters) check
   Justification: wrap_parameters was introduced in Rails 3.1 (August 2011).
   This check was only needed for Rails 3.0 compatibility. Since we require
   Rails 7.0+, this method is always available.
   Reference: https://api.rubyonrails.org/v7.0/classes/ActionController/ParamsWrapper.html

3. spec/dummy/config/initializers/assets.rb (line 7)
   Removed: if Rails.application.config.respond_to?(:assets) check
   Justification: The assets config has been available since Rails 3.1 with
   the asset pipeline. This check was for Rails 3.0 compatibility. Even in
   Rails 7+ (where asset pipeline is optional), the config still exists.
   Reference: https://guides.rubyonrails.org/asset_pipeline.html

4. lib/vault/encrypted_model.rb (lines 332-340)
   Removed: Version checks for Rails 5.1, 5.2, and 6.0 change tracking APIs
   Justification: Rails 5.1 introduced saved_change_to_attribute?. Rails 5.2
   added previous_changes_include? for deprecation transition. Rails 6.0
   standardized on previous_changes.include?(). The old attribute_changed?
   API was deprecated in Rails 5.1 and removed in Rails 6.0. Since we require
   Rails 7.0+, we can use only previous_changes.include?(attribute).
   Reference: https://api.rubyonrails.org/v7.0/classes/ActiveModel/Dirty.html
   Migration guide: https://github.com/rails/rails/blob/v6.0.0/guides/source/6_0_release_notes.md
In Rails 7+, the asset pipeline (Sprockets) became optional and must be
explicitly added via the sprockets-rails gem. The config.assets object
only exists when Sprockets is loaded.

The previous commit incorrectly removed this check based on the assumption
that config.assets would always be available. This was true in Rails 3.1-6.x
where Sprockets was always included, but Rails 7+ made it optional.

Reference: https://guides.rubyonrails.org/7_0_release_notes.html
(search for 'Sprockets is now an optional dependency')
…ibility

Rails 7.0+ requires sqlite3 >= 1.4. The previous constraint of ~> 1.3.6 was
causing bundler to activate sqlite3-1.3.13 which is incompatible with Rails 7.2+.

Error message: "can't activate sqlite3 (>= 1.4), already activated sqlite3-1.3.13"

Changed: s.add_development_dependency "sqlite3", "~> 1.3.6"
To: s.add_development_dependency "sqlite3", ">= 1.4"

Reference: https://guides.rubyonrails.org/7_0_release_notes.html
The sqlite3 1.4+ series includes performance improvements and better Ruby 3+ compatibility.
Rails 7.2+ changed ActiveRecord::Base#table_name behavior for anonymous
classes. Previously, anonymous classes would attempt to derive a table name,
but now they raise an error: "Class name cannot be blank. You need to supply
a name argument when anonymous class given"

Added explicit table_name assignment to the anonymous test class to fix:
  self.table_name = "people"

This allows the tests to work with Rails 7.2+ while maintaining compatibility
with the existing database schema.

Error details:
  ArgumentError: Class name cannot be blank. You need to supply a name
  argument when anonymous class given
  # activemodel-7.2.3/lib/active_model/naming.rb:169

Reference: rails/rails#45282
Updated the vault gem dependency from ~> 0.19 to ~> 0.20 to use the
newly released vault-ruby 0.20.0.
This project is no longer maintained by the Vault team, so this
team-specific workflow can be removed.
Replaced placeholder comment with actual code ownership assignment
to @hashicorp/team-tf-principals, matching the vault-ruby project.
- Update VERSION to 0.12.0
- Update CHANGELOG with release date (February 4, 2026)
- Move vault-ruby update to BREAKING CHANGES section
- Add sqlite3 dependency update to IMPROVEMENTS
- Fix Vault version numbers to match actual community releases
@chrisarcand chrisarcand changed the title Update to vault-ruby 0.20 and remove EOL version support v0.12.0 - Update to vault-ruby 0.20 and remove EOL version support Feb 4, 2026
@chrisarcand chrisarcand merged commit 95327ed into main Feb 4, 2026
99 checks passed
@chrisarcand chrisarcand deleted the update-ruby-rails-versions branch February 4, 2026 21:58
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